hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Håvard Wahl Kongsgård <haavard.kongsga...@gmail.com>
Subject Re: Scala and Hbase, hbase-default.xml file seems to be for and old version of HBase (null)
Date Thu, 02 May 2013 08:21:51 GMT
..aha I used scala 2.9.2, works fine with 2.10.1, so must be an old scala
bug. but thanks anyway :)

-Håvard


On Wed, May 1, 2013 at 5:24 PM, Michael Segel <michael_segel@hotmail.com>wrote:

> What about deflating the jar, to get the file and to put it manually on
> the classpath?
>
> At least it will help in terms of debugging the underlying problem.
>
> On May 1, 2013, at 3:24 AM, Håvard Wahl Kongsgård <
> haavard.kongsgaard@gmail.com> wrote:
>
> > 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
> > <michael_segel@hotmail.com> 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 <
> haavard.kongsgaard@gmail.com> 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 <shahab.yunus@gmail.com>
> 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 <
> >>>> haavard.kongsgaard@gmail.com> 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.14.jar:/usr/lib/hbase/lib/jsp-api-2.1-6.1.14.jar:/usr/lib/hbase/lib/jsp-api-2.1.jar:/usr/lib/hbase/lib/jsr305-1.3.9.jar:/usr/lib/hbase/lib/junit-4.10-HBASE-1.jar:/usr/lib/hbase/lib/kfs-0.3.jar:/usr/lib/hbase/lib/libthrift-0.9.0.jar:/usr/lib/hbase/lib/log4j-1.2.17.jar:/usr/lib/hbase/lib/management-api-3.0.0-b012.jar:/usr/lib/hbase/lib/metrics-core-2.1.2.jar:/usr/lib/hbase/lib/netty-3.2.4.Final.jar:/usr/lib/hbase/lib/paranamer-2.3.jar:/usr/lib/hbase/lib/protobuf-java-2.4.0a.jar:/usr/lib/hbase/lib/servlet-api-2.5-6.1.14.jar:/usr/lib/hbase/lib/servlet-api-2.5.jar:/usr/lib/hbase/lib/slf4j-api-1.6.1.jar:/usr/lib/hbase/lib/snappy-java-1.0.4.1.jar:/usr/lib/hbase/lib/stax-api-1.0.1.jar:/usr/lib/hbase/lib/xmlenc-0.52.jar:/usr/lib/hbase/lib/zookeeper.jar:/etc/hadoop/conf:/usr/lib/hadoop/lib/*:/usr/lib/hadoop/.//*:/usr/lib/hbase/hbase.jar:/usr/lib/hbase/lib/zookeeper.jar:/usr/lib/hbase/conf:/usr/lib/hadoop-hdfs/./:/usr/lib/hadoop-hdfs/lib/*:/usr/lib/hadoop-hdfs/.//*:/usr/lib/hadoop-yarn/lib/*:/usr/lib/hadoop-yarn/.//*:
> >>>>>
> >>>>>
> >>>>>
> >>>>> -Håvard
> >>>>> --
> >>>>> Håvard Wahl Kongsgård
> >>>>> Data Scientist
> >>>>> Faculty of Medicine &
> >>>>> Department of Mathematical Sciences
> >>>>> NTNU
> >>>>>
> >>>>> http://havard.dbkeeping.com/
> >>>
> >>>
> >>>
> >>> --
> >>> Håvard Wahl Kongsgård
> >>> Data Scientist
> >>> Faculty of Medicine &
> >>> Department of Mathematical Sciences
> >>> NTNU
> >>>
> >>> http://havard.dbkeeping.com/
> >>>
> >
> >
> >
> > --
> > Håvard Wahl Kongsgård
> > Data Scientist
> > Faculty of Medicine &
> > Department of Mathematical Sciences
> > NTNU
> >
> > http://havard.dbkeeping.com/
> >
>
>


-- 
Håvard Wahl Kongsgård
Data Scientist
Faculty of Medicine &
Department of Mathematical Sciences
NTNU

http://havard.dbkeeping.com/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message