Please use user@hbase for future correspondence.

Here is related code from ZooKeeperWatcher (NPE seems to have come from the
for loop):

  public List<String> getMetaReplicaNodes() throws KeeperException {
    List<String> childrenOfBaseNode = ZKUtil.listChildrenNoWatch(this,
baseZNode);
    List<String> metaReplicaNodes = new ArrayList<String>(2);
    String pattern =
conf.get("zookeeper.znode.metaserver","meta-region-server");
    for (String child : childrenOfBaseNode) {

ZKUtil.listChildrenNoWatch() would return null if the base znode doesn't
exist.

The error message you mentioned still exists:

hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java:
           + "There could be a mismatch with the one configured in the
master.";
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/MetaTableLocator.java:
           + "There could be a mismatch with the one configured in the
master.";

With zookeeper.znode.parent  properly set, do you still experience NPE with
your code ?

Thanks

On Fri, May 27, 2016 at 5:53 AM, Pablo Leira <ple...@denodo.com> wrote:

> Hi,
>
> I have just updated a client of hbase from version 0.96.2-hadoop2 to 1.2.1
> (hbase-client).
> With the old version with the property zookeeper.znode.parent of the file
> hbase-site.xml bad configured (p.e. with the value "hbase" instead of
> "hbase-secure"
> our "hbase-unsecure" )  . I was obtaining the following error:
>
> “The node /hbase (/hbase-unsecure or /hbase-secure) is not in ZooKeeper. It
> should have been written by the master. Check the value configured in
> 'zookeeper.znode.parent'. There could be a mismatch with the one configured
> in the master.“
>
>
> But with the new version I was obtaining the following trace:
>
> java.lang.RuntimeException: java.lang.NullPointerException at
>
> org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:208)
> at
> org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:326)
> at
>
> org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:301)
> at
>
> org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:166)
> at
> org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:161)
> at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:794) at
>
> org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.java:602)
> at
>
> org.apache.hadoop.hbase.MetaTableAccessor.tableExists(MetaTableAccessor.java:366)
> at
> org.apache.hadoop.hbase.client.HBaseAdmin.tableExists(HBaseAdmin.java:403)
> at
>
> com.denodo.connect.hadoop.hbase.HBaseConnector.doRun(HBaseConnector.java:198)
> at
>
> com.denodo.connect.hadoop.hdfs.wrapper.AbstractSecureHadoopWrapper.run(AbstractSecureHadoopWrapper.java:110)
> at com.denodo.vdb.misc.datasource.MyDataSource$1$1.doRun(Unknown Source) at
> com.denodo.vdb.engine.wrapper.raw.my.MyAccessImpl.doRun(Unknown Source) at
> com.denodo.vdb.engine.wrapper.RawAccess.run(Unknown Source) at
> com.denodo.vdb.engine.thread.g.a(Unknown Source) at
> com.denodo.vdb.engine.thread.ReusableThread.run(Unknown Source) Caused by:
> java.lang.NullPointerException at
>
> org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.getMetaReplicaNodes(ZooKeeperWatcher.java:489)
> at
>
> org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:558)
> at
>
> org.apache.hadoop.hbase.client.ZooKeeperRegistry.getMetaRegionLocation(ZooKeeperRegistry.java:61)
> at
>
> org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateMeta(ConnectionManager.java:1211)
> at
>
> org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1178)
> at
>
> org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.getRegionLocations(RpcRetryingCallerWithReadReplicas.java:305)
> at
>
> org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:156)
> at
>
> org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:60)
> at
>
> org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:200)
> ... 15 more
>
>
> This is my code:
>
>
> final Configuration hbaseConfig = getHBaseConfig(inputValues); /**
> Connection to the cluster. A single connection shared by all application
> threads. */ Connection connection = null; /** A lightweight handle to a
> specific table. Used from a single thread. */ Table table = null; try {
> final TableName tableName =
> TableName.valueOf(inputValues.get(ParameterNaming.CONF_TABLE_NAME));
> connection = ConnectionFactory.createConnection(hbaseConfig); Admin admin =
> connection.getAdmin(); if (!admin.tableExists(tableName)) {
>
>
> The last line where the exception is thrown.
>
> Are there any way to obtain a exception more specific than
> NullPointerException, because in the previous version this exception it was
> more descriptive. Or maybe my code is not correct.
>
> Thanks
> Regards
> Pablo
>

Reply via email to