hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petrucci Andreas <petrucci_2...@hotmail.com>
Subject Cannot add rows in an HBase Table
Date Wed, 06 Oct 2010 15:06:38 GMT

Hello there, i have compiled the HBase source code and i;m running locally the HMaster. However
when i try to create a table and insert rows with an HBaseClient there are some problems.
I would appreciate your help , thanks in advance.

HBaseClient :
   
    Configuration config = new HBaseConfiguration().create(); 
    HBaseAdmin admin = new HBaseAdmin(config);
    System.out.println("Is Master running?? " + admin.isMasterRunning());
    try{    
        admin.createTable(new HTableDescriptor("myLittleHBaseTable"));
    }catch(org.apache.hadoop.hbase.TableExistsException e){
        System.out.println("Propably the requested table already exists!!");
    }
    try{
        admin.addColumn("myLittleHBaseTable", new HColumnDescriptor(Bytes.toBytes("myLittleFamily")));
    }catch(org.apache.hadoop.hbase.InvalidFamilyOperationException e){
        System.out.println("Propably there is some fault with column!!");
    }  
    HTableDescriptor tables [] ;
    tables = admin.listTables();
    System.out.println("Existing tables : ");
    for(int i =0; i<tables.length;i++){
        System.out.println(tables[i].toString());
    }
    HTable table = new HTable(config,"myLittleHBaseTable");
    Put p = new Put(Bytes.toBytes("myLittleRow"));
    p.add(Bytes.toBytes("myLittleFamily"), Bytes.toBytes("myLittleQualifier"),Bytes.toBytes("Some
Value"));
    table.put(p);
    
 The output is below :

010-10-06 17:57:05,507 INFO  [main] zookeeper.ZKUtil(196): hconnection-0x12b81acb4fc000d Set
watcher on existing znode /hbase/root-region-server
2010-10-06 17:57:05,510 DEBUG [main] zookeeper.ZKUtil(493): hconnection-0x12b81acb4fc000d
Retrieved 15 bytes of data from znode /hbase/root-region-server and set a watcher
2010-10-06 17:57:05,512 INFO  [main] zookeeper.ZKUtil(196): hconnection-0x12b81acb4fc000d
Set watcher on existing znode /hbase/unassigned/1028785192
2010-10-06 17:57:05,579 DEBUG [main] client.HConnectionManager$HConnectionImplementation(871):
Cached location for .META.,,1.1028785192 is dante:40601
Existing tables : 
{NAME => 'myLittleHBaseTable', FAMILIES => [{NAME => 'myLittleFamily', BLOOMFILTER
=> 'NONE', REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', VERSIONS => '3', TTL
=> '2147483647', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}]}
2010-10-06 17:57:05,594 DEBUG [main] client.HConnectionManager$HConnectionImplementation(757):
Cache hit for row <> in tableName .META.: location server dante:40601, location region
name .META.,,1.1028785192
2010-10-06 17:57:05,604 DEBUG [main] client.HConnectionManager$HConnectionImplementation(871):
Cached location for myLittleHBaseTable,,1286370990893.3781dd248683babf07fcb0d030da7d21. is
dante:40601
2010-10-06 17:57:05,605 DEBUG [main] client.HConnectionManager$HConnectionImplementation(757):
Cache hit for row <> in tableName myLittleHBaseTable: location server dante:40601, location
region name myLittleHBaseTable,,1286370990893.3781dd248683babf07fcb0d030da7d21.
2010-10-06 17:57:05,611 DEBUG [main] client.HConnectionManager$HConnectionImplementation(1144):
Failed all from dante:40601
java.util.concurrent.ExecutionException: org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException:
org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException: Column family myLittleFamily
does not exist in region myLittleHBaseTable,,1286370990893.3781dd248683babf07fcb0d030da7d21.
in table {NAME => 'myLittleHBaseTable', FAMILIES => []}
    at org.apache.hadoop.hbase.regionserver.HRegion.checkFamily(HRegion.java:2928)
    at org.apache.hadoop.hbase.regionserver.HRegion.checkFamilies(HRegion.java:1660)
    at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:1597)
    at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:1260)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1518)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.multi(HRegionServer.java:2318)
    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 org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:561)
    at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1025)

    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.processBatch(HConnectionManager.java:1118)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.processBatchOfPuts(HConnectionManager.java:1197)
    at org.apache.hadoop.hbase.client.HTable.flushCommits(HTable.java:765)
    at org.apache.hadoop.hbase.client.HTable.doPut(HTable.java:637)
    at org.apache.hadoop.hbase.client.HTable.put(HTable.java:622)
    at MyLittleHBaseClient.main(MyLittleHBaseClient.java:63)
Caused by: org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException: org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException:
Column family myLittleFamily does not exist in region myLittleHBaseTable,,1286370990893.3781dd248683babf07fcb0d030da7d21.
in table {NAME => 'myLittleHBaseTable', FAMILIES => []}
    at org.apache.hadoop.hbase.regionserver.HRegion.checkFamily(HRegion.java:2928)
    at org.apache.hadoop.hbase.regionserver.HRegion.checkFamilies(HRegion.java:1660)
    at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:1597)
    at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:1260)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1518)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.multi(HRegionServer.java:2318)
    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 org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:561)
    at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1025)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.apache.hadoop.hbase.RemoteExceptionHandler.decodeRemoteException(RemoteExceptionHandler.java:96)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.translateException(HConnectionManager.java:1215)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getRegionServerWithoutRetries(HConnectionManager.java:958)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$4.call(HConnectionManager.java:1028)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$4.call(HConnectionManager.java:1)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
Exception in thread "main" org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException:
org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException: Column family myLittleFamily
does not exist in region myLittleHBaseTable,,1286370990893.3781dd248683babf07fcb0d030da7d21.
in table {NAME => 'myLittleHBaseTable', FAMILIES => []}
    at org.apache.hadoop.hbase.regionserver.HRegion.checkFamily(HRegion.java:2928)
    at org.apache.hadoop.hbase.regionserver.HRegion.checkFamilies(HRegion.java:1660)
    at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:1597)
    at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:1260)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1518)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.multi(HRegionServer.java:2318)
    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 org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:561)
    at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1025)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.apache.hadoop.hbase.RemoteExceptionHandler.decodeRemoteException(RemoteExceptionHandler.java:96)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.translateException(HConnectionManager.java:1215)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getRegionServerWithoutRetries(HConnectionManager.java:958)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$4.call(HConnectionManager.java:1028)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$4.call(HConnectionManager.java:1)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
2010-10-06 17:57:05,615 DEBUG [HCM.shutdownHook] client.HConnectionManager$HConnectionImplementation(1014):
Closed zookeeper sessionid=0x12b81acb4fc000d


Do you have any ideas? thanks in advance
    
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message