When import data into hbase table, you need make sure the htable has been created;
To create the htable, you need know the cf name; This can be found in the ³hbase_mapping² section in cube¹s JSON file, cf name like ³F1², ³F2"; Then you should be able to create the htable; For detail about cube¹s htable creation, you can refer to org.apache.kylin.job.hadoop.hbase.CreateHTableJob; You can use Hbase api do the same. We didn¹t do this before; When you got success, if you could share the detail steps like below, that would be very helpful! On 4/2/15, 6:53 PM, "dong wang" <[email protected]> wrote: >when I try to backup and restore the cube's hbase table as the following >familiar commands: > >1, sudo -uhbase hbase org.apache.hadoop.hbase.mapreduce.Export tmember >/backup/projects/channel/tmember > >2, hadoop fs -copyToLocal -crc /backup/projects/channel/tmember >/home/olap/scripts/cluster_mgr/test/tmember > >3, sudo -uhbase hadoop fs -rm -r /backup/projects/channel/tmember > >4, in hbase shell, disable table and drop table tmemeber > >5, sudo -uhbase hadoop fs -copyFromLocal >/home/olap/scripts/cluster_mgr/test/tmember >/backup/projects/channel/tmember > >6, sudo -uhbase hbase org.apache.hadoop.hbase.mapreduce.Import tmember >/backup/projects/channel/tmember > >the first 5 steps work OK, when step 6, it always throws error like the >following, no more information in hbase log > >2015-04-02 17:57:52,358 INFO [main] mapreduce.Job: Task Id : >attempt_1427547972456_0190_m_000000_0, Status : FAILED >Error: >org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException: >Failed 2 actions: tmember: 2 times, > at >org.apache.hadoop.hbase.client.AsyncProcess$BatchErrors.makeException(Asyn >cProcess.java:192) > at >org.apache.hadoop.hbase.client.AsyncProcess$BatchErrors.access$500(AsyncPr >ocess.java:176) > at >org.apache.hadoop.hbase.client.AsyncProcess.getErrors(AsyncProcess.java:91 >3) > at >org.apache.hadoop.hbase.client.HTable.backgroundFlushCommits(HTable.java:9 >85) > at >org.apache.hadoop.hbase.client.HTable.flushCommits(HTable.java:1281) > at org.apache.hadoop.hbase.client.HTable.close(HTable.java:1318) > at >org.apache.hadoop.hbase.mapreduce.TableOutputFormat$TableRecordWriter.clos >e(TableOutputFormat.java:112) > at >org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.close(MapTask.ja >va:667) > at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:790) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341) > at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:415) > at >org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation. >java:1642) > at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163) > > > > >finally, I found that if I create a empty hbase table named tmember first >before step 6, then step 6 works successfully, however, how can we create >such a empty table or how to know the "create table" statement just like >"show create table" in mysql?
