hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jiajun chen <cjjvict...@gmail.com>
Subject Re: How to debug/run HBase in eclipse
Date Tue, 22 Nov 2011 06:49:25 GMT
I got it. Thank you very much ! and there is another question:

I hava started HMaster in eclipse . but exceptions as follows occurred when
excute this line :
this.fs = FileSystem.get(this.conf)
that's because the cluster which hava 4 RegionServer/DataNode used
hadoop-core-0.20.2-cdh3u0.jar, but now I am running in eclipse as another
RegionServer which used 0.20-append-r1056497.jar.

11/11/22 14:29:21 ERROR regionserver.HRegionServer: Failed init
java.io.IOException: Call to
test1.namenode.uc.uuwatch.com/192.168.0.186:9000 failed on local exception:
java.io.EOFException
    at org.apache.hadoop.ipc.Client.wrapException(Client.java:775)
    at org.apache.hadoop.ipc.Client.call(Client.java:743)
    at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:220)
    at $Proxy6.getProtocolVersion(Unknown Source)
    at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:359)
    at
org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:113)
    at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:215)
    at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:177)
    at
org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:82)
    at
org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1378)
    at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:66)
    at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1390)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:196)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:95)
    at
org.apache.hadoop.hbase.regionserver.HRegionServer.handleReportForDutyResponse(HRegionServer.java:875)
    at
org.apache.hadoop.hbase.regionserver.HRegionServer.tryReportForDuty(HRegionServer.java:1481)
    at
org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:571)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.io.EOFException
    at java.io.DataInputStream.readInt(DataInputStream.java:392)
    at
org.apache.hadoop.ipc.Client$Connection.receiveResponse(Client.java:501)
    at org.apache.hadoop.ipc.Client$Connection.run(Client.java:446)


I want to change the jar of hadoop-core in pom.xml.

    <hadoop.version>0.20-append-r1056497</hadoop.version>
changed to
    <hadoop.version>hadoop-core-0.20.2-cdh3u0</hadoop.version>

But maven hava errors and I can't compile the source of HBase.

11/22/11 2:47:31 PM ULAT: Missing artifact
org.apache.hadoop:hadoop-core:jar:hadoop-core-0.20.2-cdh3u0:compile
11/22/11 2:47:31 PM ULAT: Missing artifact
org.apache.hadoop:hadoop-test:jar:hadoop-core-0.20.2-cdh3u0:test
11/22/11 2:47:31 PM ULAT: Maven Builder: AUTO_BUILD
11/22/11 2:47:31 PM ULAT: [WARN] The POM for
org.apache.hadoop:hadoop-core:jar:hadoop-core-0.20.2-cdh3u0 is missing, no
dependency information available
11/22/11 2:47:31 PM ULAT: [WARN] The POM for
org.apache.hadoop:hadoop-test:jar:hadoop-core-0.20.2-cdh3u0 is missing, no
dependency information available


2011/11/22 Jonathan Hsieh <jon@cloudera.com>

> Jiajun,
>
> Sorry if i wasn't clear.  First to 'mvn eclipse:eclipse'.  Then in eclipse
> remove 'src/test/resources' from you build path.  Also you may need go
> "clean out" your project by going to "project", "clean..." and then
> selecting your hbase build
>
> You should be able to then run HMaster, or any of the other servers/utils.
>
> Jon.
>
> On Mon, Nov 21, 2011 at 7:39 AM, jiajun chen <cjjvictory@gmail.com> wrote:
>
> > The eclipse setup generated with 'mvn eclipse:eclipse' has a build path
> > that has hbase setup in a "unit testing mode".  This is great if you want
> > to run unit tests inside of eclipse but not good if you want to get the
> > actual hbase servers (master, regionserver, external utils like bulk
> load,
> > hfile, etc)  running and debuggable.
> >
> > So,what should I do if I want to  get the  hbase servers running and
> > debuggable in eclipse ?
> >
> > On Mon, Nov 21, 2011 at 11:16 PM, Jonathan Hsieh <jon@cloudera.com>
> wrote:
> >
> > > I've found that if you remove 'src/test/resources' from your build
> path,
> > > things will work out better for the server testing cases.  The "testing
> > > mode" settings live in the hbase-site.xml file in that dir.
> > >
> > > You can do this by right clicking on the package in package explorer,
> > Build
> > > Path, remove from build path.
> > >
> > > The eclipse setup generated with 'mvn eclipse:eclipse' has a build path
> > > that has hbase setup in a "unit testing mode".  This is great if you
> want
> > > to run unit tests inside of eclipse but not good if you want to get the
> > > actual hbase servers (master, regionserver, external utils like bulk
> > load,
> > > hfile, etc)  running and debuggable.
> > >
> > > Jon
> > >
> > > On Sun, Nov 20, 2011 at 5:40 PM, 陈加俊 <cjjvictory@gmail.com> wrote:
> > >
> > > > I run HRegionServer whith program arguments that is start in eclipse.
> > > >
> > > > 2011-11-21 09:35:12,384 WARN  [main]
> > > > regionserver.HRegionServerCommandLine(56): Not starting a distinct
> > region
> > > > server because hbase.cluster.distributed is false
> > > >
> > > > but the following contents in $HBAE_HOME/conf/hbase-site.xml :
> > > >
> > > > <property>
> > > >    <name>hbase.cluster.distributed</name>
> > > >    <value>true</value>
> > > >    <description>The mode the cluster will be in. Possible values
are
> > > >      false: standalone and pseudo-distributed setups with managed
> > > Zookeeper
> > > >      true: fully-distributed with unmanaged Zookeeper Quorum (see
> > > > hbase-env.sh)
> > > >    </description>
> > > >  </property>
> > > >
> > >
> > >
> > >
> > > --
> > > // Jonathan Hsieh (shay)
> > > // Software Engineer, Cloudera
> > > // jon@cloudera.com
> > >
> >
> >
> >
> > --
> >
> > 陈加俊  项目经理
> > 优讯时代(北京)网络技术有限公司
> > 优讯网 www.uuwatch.com
> >
> > 地址:北京市海淀区上地信息路2号D栋412
> >
> > 电话:010-82895510
> > 传真:010-82896636
> > 手机:15110038983
> > 电邮:*cjjvictory@gmail.com*
> >
>
>
>
> --
> // Jonathan Hsieh (shay)
> // Software Engineer, Cloudera
> // jon@cloudera.com
>



-- 

陈加俊  项目经理
优讯时代(北京)网络技术有限公司
优讯网 www.uuwatch.com

地址:北京市海淀区上地信息路2号D栋412

电话:010-82895510
传真:010-82896636
手机:15110038983
电邮:*cjjvictory@gmail.com*

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