0

尝试连接到我的 hbase/hadoop 本地单用户服务器,在执行“HBaseAdmin.tableExists”后出现此错误:

13/05/15 11:37:19 INFO zookeeper.ZooKeeper: Session: 0x13ea8c917d00005 closed
java.lang.NullPointerException
    at org.apache.hadoop.hbase.client.ServerCallable.withRetries(ServerCallable.java:176)
    at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:216)
    at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:131)
    at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:531)
    at org.apache.hadoop.hbase.catalog.MetaReader.fullScan(MetaReader.java:536)
    at org.apache.hadoop.hbase.catalog.MetaReader.tableExists(MetaReader.java:309)
    at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:248)
    at com.mycompany.db_hbase_metrics.App.creatTable(App.java:41)
    at com.mycompany.db_hbase_metrics.App.main(App.java:142)

我在下面包含了完整的 Netbeans 构建/运行日志:

NetBeans: JPDA Listening Start...
JPDA Address: valhalla:44539
Port:44539
cd /home/mcurry/NetBeansProjects/db_hbase_metrics; JAVA_HOME=/usr/lib/jvm/default-java /home/mcurry/netbeans-7.3/java/maven/bin/mvn "-Dexec.args=-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=44539 -classpath %classpath com.mycompany.db_hbase_metrics.App" -Dexec.executable=/usr/lib/jvm/default-java/bin/java -Djpda.listen=true -Djpda.address=44539 process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
Scanning for projects...

------------------------------------------------------------------------
Building db_hbase_metrics 1.0-SNAPSHOT
------------------------------------------------------------------------

[resources:resources]
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory /home/mcurry/NetBeansProjects/db_hbase_metrics/src/main/resources

[compiler:compile]
Nothing to compile - all classes are up to date

[exec:exec]
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:host.name=localhost
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:java.version=1.6.0_27
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Sun Microsystems Inc.
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:java.home=/usr/lib/jvm/java-6-openjdk-amd64/jre
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:java.class.path=/home/mcurry/NetBeansProjects/db_hbase_metrics/target/classes:/home/mcurry/.m2/repository/com/martiansoftware/jsap/2.1/jsap-2.1.jar:/home/mcurry/.m2/repository/org/ini4j/ini4j/0.5.2/ini4j-0.5.2.jar:/home/mcurry/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/home/mcurry/.m2/repository/org/apache/hbase/hbase-client/0.95.0/hbase-client-0.95.0.jar:/home/mcurry/.m2/repository/org/apache/hbase/hbase-common/0.95.0/hbase-common-0.95.0.jar:/home/mcurry/.m2/repository/com/google/guava/guava/12.0.1/guava-12.0.1.jar:/home/mcurry/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/home/mcurry/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/home/mcurry/.m2/repository/org/slf4j/slf4j-api/1.4.3/slf4j-api-1.4.3.jar:/home/mcurry/.m2/repository/org/slf4j/slf4j-log4j12/1.4.3/slf4j-log4j12-1.4.3.jar:/home/mcurry/.m2/repository/org/apache/hbase/hbase-protocol/0.95.0/hbase-protocol-0.95.0.jar:/home/mcurry/.m2/repository/com/google/protobuf/protobuf-java/2.4.1/protobuf-java-2.4.1.jar:/home/mcurry/.m2/repository/org/apache/zookeeper/zookeeper/3.4.5/zookeeper-3.4.5.jar:/home/mcurry/.m2/repository/org/cloudera/htrace/htrace/1.50/htrace-1.50.jar:/home/mcurry/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar:/home/mcurry/.m2/repository/io/netty/netty/3.5.9.Final/netty-3.5.9.Final.jar:/home/mcurry/.m2/repository/org/apache/hadoop/hadoop-core/1.1.2/hadoop-core-1.1.2.jar:/home/mcurry/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/home/mcurry/.m2/repository/xmlenc/xmlenc/0.52/xmlenc-0.52.jar:/home/mcurry/.m2/repository/com/sun/jersey/jersey-core/1.8/jersey-core-1.8.jar:/home/mcurry/.m2/repository/com/sun/jersey/jersey-json/1.8/jersey-json-1.8.jar:/home/mcurry/.m2/repository/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar:/home/mcurry/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar:/home/mcurry/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.3-1/jaxb-impl-2.2.3-1.jar:/home/mcurry/.m2/repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar:/home/mcurry/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:/home/mcurry/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/home/mcurry/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.7.1/jackson-core-asl-1.7.1.jar:/home/mcurry/.m2/repository/org/codehaus/jackson/jackson-jaxrs/1.7.1/jackson-jaxrs-1.7.1.jar:/home/mcurry/.m2/repository/org/codehaus/jackson/jackson-xc/1.7.1/jackson-xc-1.7.1.jar:/home/mcurry/.m2/repository/com/sun/jersey/jersey-server/1.8/jersey-server-1.8.jar:/home/mcurry/.m2/repository/asm/asm/3.1/asm-3.1.jar:/home/mcurry/.m2/repository/commons-io/commons-io/2.1/commons-io-2.1.jar:/home/mcurry/.m2/repository/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar:/home/mcurry/.m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar:/home/mcurry/.m2/repository/org/apache/commons/commons-math/2.1/commons-math-2.1.jar:/home/mcurry/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar:/home/mcurry/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/home/mcurry/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar:/home/mcurry/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar:/home/mcurry/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/home/mcurry/.m2/repository/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar:/home/mcurry/.m2/repository/commons-net/commons-net/1.4.1/commons-net-1.4.1.jar:/home/mcurry/.m2/repository/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar:/home/mcurry/.m2/repository/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211.jar:/home/mcurry/.m2/repository/tomcat/jasper-runtime/5.5.12/jasper-runtime-5.5.12.jar:/home/mcurry/.m2/repository/tomcat/jasper-compiler/5.5.12/jasper-compiler-5.5.12.jar:/home/mcurry/.m2/repository/org/mortbay/jetty/jsp-api-2.1/6.1.14/jsp-api-2.1-6.1.14.jar:/home/mcurry/.m2/repository/org/mortbay/jetty/servlet-api-2.5/6.1.14/servlet-api-2.5-6.1.14.jar:/home/mcurry/.m2/repository/org/mortbay/jetty/jsp-2.1/6.1.14/jsp-2.1-6.1.14.jar:/home/mcurry/.m2/repository/ant/ant/1.6.5/ant-1.6.5.jar:/home/mcurry/.m2/repository/commons-el/commons-el/1.0/commons-el-1.0.jar:/home/mcurry/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.8.8/jackson-mapper-asl-1.8.8.jar:/home/mcurry/.m2/repository/com/github/stephenc/findbugs/findbugs-annotations/1.3.9-1/findbugs-annotations-1.3.9-1.jar
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:java.library.path=/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk-amd64/jre/../lib/amd64:/usr/lib/jvm/default-java/jre/lib/amd64:/usr/lib/jvm/default-java/jre/lib/i386::/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:os.version=3.5.0-28-generic
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:user.name=mcurry
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:user.home=/home/mcurry
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Client environment:user.dir=/home/mcurry/NetBeansProjects/db_hbase_metrics
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection-0x5adf48c4
13/05/15 11:35:19 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
13/05/15 11:35:19 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is hconnection-0x5adf48c4
13/05/15 11:35:19 INFO zookeeper.ClientCnxn: Socket connection established to localhost/127.0.0.1:2181, initiating session
13/05/15 11:35:19 INFO zookeeper.ClientCnxn: Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x13ea8c917d00004, negotiated timeout = 40000
13/05/15 11:35:19 INFO client.HConnectionManager$HConnectionImplementation: ClusterId is 7978c1ad-f3d1-4ec4-bf4e-f39eb316bccd
13/05/15 11:35:19 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=catalogtracker-on-hconnection-0x5adf48c4
13/05/15 11:35:19 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is catalogtracker-on-hconnection-0x5adf48c4
13/05/15 11:35:19 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
13/05/15 11:35:19 INFO zookeeper.ClientCnxn: Socket connection established to localhost/127.0.0.1:2181, initiating session
13/05/15 11:35:19 INFO zookeeper.ClientCnxn: Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x13ea8c917d00005, negotiated timeout = 40000
13/05/15 11:37:19 WARN client.ServerCallable: Received exception, tries=0, numRetries=10 message=null
13/05/15 11:37:19 INFO zookeeper.ZooKeeper: Session: 0x13ea8c917d00005 closed
java.lang.NullPointerException
    at org.apache.hadoop.hbase.client.ServerCallable.withRetries(ServerCallable.java:176)
    at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:216)
    at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:131)
    at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:531)
    at org.apache.hadoop.hbase.catalog.MetaReader.fullScan(MetaReader.java:536)
    at org.apache.hadoop.hbase.catalog.MetaReader.tableExists(MetaReader.java:309)
    at org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:248)
    at com.mycompany.db_hbase_metrics.App.creatTable(App.java:41)
    at com.mycompany.db_hbase_metrics.App.main(App.java:142)
13/05/15 11:37:19 INFO zookeeper.ClientCnxn: EventThread shut down
------------------------------------------------------------------------

更多日志:

2013-05-15 12:18:03,966 INFO org.apache.zookeeper.server.NIOServerCnxnFactory: Accepted socket connection from /127.0.0.1:55850
2013-05-15 12:18:03,969 INFO org.apache.zookeeper.server.ZooKeeperServer: Client attempting to establish new session at /127.0.0.1:55850
2013-05-15 12:18:03,973 INFO org.apache.zookeeper.server.ZooKeeperServer: Established session 0x13ea8c917d00008 with negotiated timeout 40000 for client /127.0.0.1:55850
2013-05-15 12:18:04,030 INFO org.apache.zookeeper.server.NIOServerCnxnFactory: Accepted socket connection from /127.0.0.1:55851
2013-05-15 12:18:04,030 INFO org.apache.zookeeper.server.ZooKeeperServer: Client attempting to establish new session at /127.0.0.1:55851
2013-05-15 12:18:04,035 INFO org.apache.zookeeper.server.ZooKeeperServer: Established session 0x13ea8c917d00009 with negotiated timeout 40000 for client /127.0.0.1:55851
2013-05-15 12:20:04,056 INFO org.apache.zookeeper.server.PrepRequestProcessor: Processed session termination for sessionid: 0x13ea8c917d00009
2013-05-15 12:20:04,060 INFO org.apache.zookeeper.server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:55851 which had sessionid 0x13ea8c917d00009
2013-05-15 12:20:04,384 WARN org.apache.zookeeper.server.NIOServerCnxn: caught end of stream exception
EndOfStreamException: Unable to read additional data from client sessionid 0x13ea8c917d00008, likely client has closed socket
    at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:220)
    at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208)
    at java.lang.Thread.run(Thread.java:722)
2013-05-15 12:20:04,385 INFO org.apache.zookeeper.server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:55850 which had sessionid 0x13ea8c917d00008
2013-05-15 12:20:46,000 INFO org.apache.zookeeper.server.ZooKeeperServer: Expiring session 0x13ea8c917d00008, timeout of 40000ms exceeded
2013-05-15 12:20:46,000 INFO org.apache.zookeeper.server.PrepRequestProcessor: Processed session termination for sessionid: 0x13ea8c917d00008
2013-05-15 12:22:32,123 DEBUG org.apache.hadoop.hbase.io.hfile.LruBlockCache: Stats: total=1.98 MB, free=239.7 MB, max=241.69 MB, blocks=1, accesses=28, hits=27, hitRatio=96.42%, , cachingAccesses=28, cachingHits=27, cachingHitsRatio=96.42%, , evictions=0, evicted=0, evictedPerRun=NaN
2013-05-15 12:22:34,181 DEBUG org.apache.hadoop.hbase.regionserver.LogRoller: Hlog roll period 3600000ms elapsed
2013-05-15 12:22:34,194 DEBUG org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogWriter: using new createWriter -- HADOOP-6840
2013-05-15 12:22:34,194 DEBUG org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogWriter: Path=hdfs://localhost:54310/hbase/.logs/localhost,53378,1368631352115/localhost%2C53378%2C1368631352115.1368634954182, syncFs=true, hflush=false, compression=false
2013-05-15 12:22:34,207 INFO org.apache.hadoop.hbase.regionserver.wal.HLog: Roll /hbase/.logs/localhost,53378,1368631352115/localhost%2C53378%2C1368631352115.1368631354118, entries=7, filesize=1771.  for /hbase/.logs/localhost,53378,1368631352115/localhost%2C53378%2C1368631352115.1368634954182
2013-05-15 12:22:40,420 INFO org.apache.hadoop.hbase.master.LoadBalancer: Skipping load balancing because balanced cluster; servers=1 regions=1 average=1.0 mostloaded=1 leastloaded=1
2013-05-15 12:22:40,420 INFO org.apache.hadoop.hbase.master.LoadBalancer: Skipping load balancing because balanced cluster; servers=1 regions=1 average=1.0 mostloaded=1 leastloaded=1
2013-05-15 12:22:40,420 INFO org.apache.hadoop.hbase.master.LoadBalancer: Skipping load balancing because balanced cluster; servers=1 regions=1 average=1.0 mostloaded=1 leastloaded=1
2013-05-15 12:22:40,424 DEBUG org.apache.hadoop.hbase.client.ClientScanner: Creating scanner over .META. starting at key ''
2013-05-15 12:22:40,424 DEBUG org.apache.hadoop.hbase.client.ClientScanner: Advancing internal scanner to startKey at ''
2013-05-15 12:22:40,431 DEBUG org.apache.hadoop.hbase.client.ClientScanner: Finished with scanning at {NAME => '.META.,,1', STARTKEY => '', ENDKEY => '', ENCODED => 1028785192,}
2013-05-15 12:22:40,432 DEBUG org.apache.hadoop.hbase.master.CatalogJanitor: Scanned 3 catalog row(s) and gc'd 0 unreferenced parent region(s)

更多信息:

mcurry@valhalla:/usr/local/hadoop$ jps
7398 NameNode
12258 Jps
9485 HMaster
10144 Main
8033 JobTracker
7941 SecondaryNameNode
8302 TaskTracker
7662 DataNode
4

0 回答 0