Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Scala and Hbase, hbase-default.xml file seems to be for and old version of HBase (null)


Copy link to this message
-
Re: Scala and Hbase, hbase-default.xml file seems to be for and old version of HBase (null)
yes, true according to the docs.

however, there still something strange with the classpath

import org.apache.hadoop.hbase.HBaseConfiguration
import org.apache.hadoop.hbase.client.{HBaseAdmin,HTable,Put,Get}
import org.apache.hadoop.hbase.util.Bytes
val conf = new HBaseConfiguration()
val admin = new HBaseAdmin(conf)

java.lang.RuntimeException: Socket Factory class not found:
java.lang.ClassNotFoundException: Class
org.apache.hadoop.net.StandardSocketFactory not found
at org.apache.hadoop.net.NetUtils.getSocketFactoryFromProperty(NetUtils.java:138)
at org.apache.hadoop.net.NetUtils.getDefaultSocketFactory(NetUtils.java:118)
at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:364)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:682)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:121)
at .<init>(<console>:11)
at .<clinit>(<console>)
at .<init>(<console>:11)
at .<clinit>(<console>)
at $print(<console>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:704)
at scala.tools.nsc.interpreter.IMain$Request$$anonfun$14.apply(IMain.scala:920)
at scala.tools.nsc.interpreter.Line$$anonfun$1.apply$mcV$sp(Line.scala:43)
at scala.tools.nsc.io.package$$anon$2.run(package.scala:25)
at java.lang.Thread.run(Thread.java:662)
org.apache.hadoop.net.StandardSocketFactory is in the classpath and
available visible via import *

-Håvard

On Tue, Apr 30, 2013 at 12:46 PM, Michel Segel
<[EMAIL PROTECTED]> wrote:
> Isn't the defaults now embedded in the base jars?
>
> Sent from a remote device. Please excuse any typos...
>
> Mike Segel
>
> On Apr 29, 2013, at 11:55 PM, Håvard Wahl Kongsgård <[EMAIL PROTECTED]> wrote:
>
>> Nope.. the system is clean only CDH4 on it. And I can't find
>> hbase-default.xml on the system.
>>
>> However, I solved this issue my downloading
>>
>> http://hbase_master:60010/conf, renaming it to hbase-default.xml and
>> adding that to the classpath
>>
>> So maybe a bug in CDH4.
>>
>> On Mon, Apr 29, 2013 at 11:36 PM, Shahab Yunus <[EMAIL PROTECTED]> wrote:
>>> This usually means that the hbase-default.xml could not be found on the
>>> classpath (hbase-default is no longer included in conf folder anymore.) It
>>> should be included in the classpath and it will have the correct version
>>> which is populated when the jar is compiled/build. Have you verified that
>>> there aren't any old hbase jars in your classpath (that did not have
>>> hbase-default.xml packaged) that are being loaded first?
>>>
>>> Regards,
>>> Shahab
>>>
>>>
>>> On Mon, Apr 29, 2013 at 1:04 PM, Håvard Wahl Kongsgård <
>>> [EMAIL PROTECTED]> wrote:
>>>
>>>> Hi, I get the following error with scala
>>>> HBaseConfiguration.create()
>>>> java.lang.RuntimeException: hbase-default.xml file seems to be for and
>>>> old version of HBase (null), this version is 0.94.2-cdh4.2.1
>>>>
>>>> the classpath is set path base on what I found with
>>>>
>>>> ax | grep regionserver
>>>>
>>>> -classpath
>>>> /usr/lib/hbase/conf:/usr/lib/jvm/java-6-sun/lib/tools.jar:/usr/lib/hbase:/usr/lib/hbase/hbase-0.94.2-cdh4.2.1-security.jar:/usr/lib/hbase/hbase-0.94.2-cdh4.2.1-security-tests.jar:/usr/lib/hbase/hbase.jar:/usr/lib/hbase/lib/activation-1.1.jar:/usr/lib/hbase/lib/aopalliance-1.0.jar:/usr/lib/hbase/lib/asm-3.2.jar:/usr/lib/hbase/lib/avro-1.7.3.jar:/usr/lib/hbase/lib/commons-beanutils-1.7.0.jar:/usr/lib/hbase/lib/commons-beanutils-core-1.8.0.jar:/usr/lib/hbase/lib/commons-cli-1.2.jar:/usr/lib/hbase/lib/commons-codec-1.4.jar:/usr/lib/hbase/lib/commons-collections-3.2.1.jar:/usr/lib/hbase/lib/commons-configuration-1.6.jar:/usr/lib/hbase/lib/commons-daemon-1.0.3.jar:/usr/lib/hbase/lib/commons-digester-1.8.jar:/usr/lib/hbase/lib/commons-el-1.0.jar:/usr/lib/hbase/lib/commons-httpclient-3.1.jar:/usr/lib/hbase/lib/commons-io-2.1.jar:/usr/lib/hbase/lib/commons-lang-2.5.jar:/usr/lib/hbase/lib/commons-logging-1.1.1.jar:/usr/lib/hbase/lib/commons-net-3.1.jar:/usr/lib/hbase/lib/core-3.1.1.jar:/usr/lib/hbase/lib/gmbal-api-only-3.0.0-b023.jar:/usr/lib/hbase/lib/grizzly-framework-2.1.1.jar:/usr/lib/hbase/lib/grizzly-framework-2.1.1-tests.jar:/usr/lib/hbase/lib/grizzly-http-2.1.1.jar:/usr/lib/hbase/lib/grizzly-http-server-2.1.1.jar:/usr/lib/hbase/lib/grizzly-http-servlet-2.1.1.jar:/usr/lib/hbase/lib/grizzly-rcm-2.1.1.jar:/usr/lib/hbase/lib/guava-11.0.2.jar:/usr/lib/hbase/lib/guice-3.0.jar:/usr/lib/hbase/lib/guice-servlet-3.0.jar:/usr/lib/hbase/lib/high-scale-lib-1.1.1.jar:/usr/lib/hbase/lib/httpclient-4.1.3.jar:/usr/lib/hbase/lib/httpcore-4.1.3.jar:/usr/lib/hbase/lib/jackson-core-asl-1.8.8.jar:/usr/lib/hbase/lib/jackson-jaxrs-1.8.8.jar:/usr/lib/hbase/lib/jackson-mapper-asl-1.8.8.jar:/usr/lib/hbase/lib/jackson-xc-1.8.8.jar:/usr/lib/hbase/lib/jamon-runtime-2.3.1.jar:/usr/lib/hbase/lib/jasper-compiler-5.5.23.jar:/usr/lib/hbase/lib/jasper-runtime-5.5.23.jar:/usr/lib/hbase/lib/javax.inject-1.jar:/usr/lib/hbase/lib/javax.servlet-3.0.jar:/usr/lib/hbase/lib/jaxb-api-2.1.jar:/usr/lib/hbase/lib/jaxb-impl-2.2.3-1.jar:/usr/lib/hbase/lib/jersey-client-1.8.jar:/usr/lib/hbase/lib/jersey-core-1.8.jar:/usr/lib/hbase/lib/jersey-grizzly2-1.8.jar:/usr/lib/hbase/lib/jersey-guice-1.8.jar:/usr/lib/hbase/lib/jersey-json-1.8.jar:/usr/lib/hbase/lib/jersey-server-1.8.jar:/usr/lib/hbase/lib/jersey-test-framework-core-1.8.jar:/usr/lib/hbase/lib/jersey-test-framework-grizzly2-1.8.jar:/usr/lib/hbase/lib/jets3t-0.6.1.jar:/usr/lib/hbase/lib/jettison-1.1.jar:/usr/lib/hbase/lib/jetty-6.1.26.cloudera.2.jar:/usr/lib/hbase/lib/jetty-util-6.1.26.cloudera.2.jar:/usr/lib/hbase/lib/jruby-complete-1.6.5.jar:/usr/lib/hbase/lib/jsch-0.1.42.jar:/usr/lib/hbase/lib/jsp-2.1-6.1.1