AnsweredAssumed Answered

hbase table creation error

Question asked by mdameen23 on Aug 25, 2015
Latest reply on Aug 26, 2015 by keysbotzum
Hi,

I'm new to MapR and and evaluating few use cases related to HBase using the MapR sandbox (MapR-Sandbox-For-Hadoop-5.0.0-vmware)

Following dependency added to pom.


            <dependency>
                <groupId>org.apache.hbase</groupId>
                <artifactId>hbase</artifactId>
                <version>0.94.13-mapr-1401-m7-3.1.0</version>
            </dependency>


I have a method that is checking for a table and creating it if not present.

The provided table name is "MyViews"

        try {
            hConfig = HBaseConfiguration.create();
            hConfig.set("hbase.zookeeper.quorum", "maprdemo");
            hConfig.set("hbase.zookeeper.property.clientPort", "5181");
            admin = new HBaseAdmin(hConfig);
            logger.info("Checking table: " + tableName);
            if (admin.tableExists(tableName)) {
                logger.info("table '" + tableName + "' exists");
                return;
            }
            HTableDescriptor table = new HTableDescriptor(tableName);
            HColumnDescriptor family = new HColumnDescriptor(Bytes.toBytes("views"));
            table.addFamily(family);
            admin.createTable(table);
            logger.info("table: '" + tableName + "' created");
        } catch (Exception ex) {
            logger.info("Exception while check table: " + ex.toString());
        }


The table doesn't create and I get the following exception.

The same code seems to work fine if I provide the table name as "/user/root/MyViews"

I don't need a MapR db table. Does creation of standard HBase tables work via the API?


----------


DEBUG com.demo.HBaseExample.App.main() com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils - init

DEBUG com.demo.HBaseExample.App.main() com.mapr.baseutils.JVMProperties - Setting JVM property zookeeper.saslprovider to com.mapr.security.simplesasl.SimpleSaslProvider

DEBUG com.demo.HBaseExample.App.main() com.mapr.baseutils.JVMProperties - Setting JVM property zookeeper.sasl.clientconfig to Client_simple

DEBUG com.demo.HBaseExample.App.main() com.mapr.baseutils.JVMProperties - Setting JVM property java.security.auth.login.config to /opt/mapr/conf/mapr.login.conf

INFO com.demo.HBaseExample.App.main() com.demo.HBaseExample.HBaseUtils - Checking table: my_views

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.security.UserGroupInformation - HADOOP_SECURITY_AUTHENTICATION is set to: simple

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.security.UserGroupInformation - Login configuration entry is hadoop_simple

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.security.Groups -  Creating new Groups object

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.util.NativeCodeLoader - Trying to load the custom-built native-hadoop library...

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.util.NativeCodeLoader - Failed to load native-hadoop, java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

WARN com.demo.HBaseExample.App.main() org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

INFO com.demo.HBaseExample.App.main() org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback - Falling back to shell based

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback - Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.security.Groups - Group mapping impl=org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback; cacheTimeout=300000

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.security.UserGroupInformation - Loading login configuration for app: hadoop_simple

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.security.login.HadoopLoginModule - priority principal search list is [class javax.security.auth.kerberos.KerberosPrincipal]

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.security.login.HadoopLoginModule - additional principal search list is [class com.sun.security.auth.UnixPrincipal, class com.sun.security.auth.NTUserPrincipal]

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.security.UserGroupInformation - Found no authentication principals in subject. Simple?

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.security.UserGroupInformation - Found no authentication principals in subject. Simple?

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.hbase.zookeeper.ZKUtil - hconnection opening connection to ZooKeeper with ensemble (maprdemo:5181)

INFO com.demo.HBaseExample.App.main() org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper - The identifier of this process is 28497@maprdemo

INFO com.demo.HBaseExample.App.main(maprdemo:5181) org.apache.zookeeper.Login - successfully logged in.

DEBUG com.demo.HBaseExample.App.main()-EventThread org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher - hconnection Received ZooKeeper Event, type=None, state=SyncConnected, path=null

DEBUG com.demo.HBaseExample.App.main()-EventThread org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher - hconnection-0x14f641844ff0035 connected

DEBUG com.demo.HBaseExample.App.main()-EventThread org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher - hconnection-0x14f641844ff0035 Received ZooKeeper Event, type=None, state=SaslAuthenticated, path=null

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.hbase.zookeeper.ZKUtil - hconnection-0x14f641844ff0035 Retrieved 42 byte(s) of data from znode /hbase/hbaseid; data=PBUF\x0A$3046f3a6-98de-4a5f-b...

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.hbase.zookeeper.ZKUtil - hconnection-0x14f641844ff0035 Set watcher on existing znode /hbase/master

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.hbase.zookeeper.ZKUtil - hconnection-0x14f641844ff0035 Retrieved 29 byte(s) of data from znode /hbase/master and set watcher; PBUF\x0A\x15\x0A\x08maprdemo\...

**DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.hbase.zookeeper.ZKUtil - hconnection-0x14f641844ff0035 /hbase/root-region-server does not exist. Watcher is set.**

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.ipc.HBaseRPC - Using RpcEngine: org.apache.hadoop.hbase.ipc.WritableRpcEngine

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.ipc.HBaseClient - The ping interval is60000ms.

**INFO com.demo.HBaseExample.App.main() com.demo.HBaseExample.HBaseUtils - Exception while check table: java.lang.IllegalArgumentException: Not a host:port pair: PBUF

maprdemo������)**

INFO com.demo.HBaseExample.App.main() com.demo.HBaseExample.HBaseUtils - Increment on: my_views -> id1 views:total_views

DEBUG com.demo.HBaseExample.App.main() org.apache.hadoop.hbase.zookeeper.ZKUtil - hconnection-0x14f641844ff0035 Unable to get data of znode /hbase/root-region-server because node does not exist (not an error)







Outcomes