5

I'm having problems importing a table from MySQL into HBase using Sqoop. I'm working in a cluster with 3 nodes (1 master, 2 slaves).

When I tried to run this command:

    sqoop import --hbase-create-table --hbase-table (any_tablename)

   --column-family (any_cf) --hbase-row-key (any_rowkey) --connect 
   jdbc:mysql://(mysqlserver_machine_IP)/(any_db) --username root -P --table (any_table) 

-m 1

I get the following error:

...13/07/30 12:13:36 INFO zookeeper.ZooKeeper: Session: 0x1402df83cc5000a closed
13/07/30 12:13:36 INFO zookeeper.ClientCnxn: EventThread shut down
13/07/30 12:13:42 INFO mapred.JobClient: Running job: job_201307301159_0001
13/07/30 12:13:43 INFO mapred.JobClient:  map 0% reduce 0%
13/07/30 12:28:12 INFO mapred.JobClient: Task Id : attempt_201307301159_0001_m_000000_0, Status : FAILED
java.lang.RuntimeException: Could not access HBase table mypop
    at org.apache.sqoop.hbase.HBasePutProcessor.setConf(HBasePutProcessor.java:121)
    at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:62)
    at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)
    at org.apache.sqoop.mapreduce.DelegatingOutputFormat$DelegatingRecordWriter.<init>(DelegatingOutputFormat.java:107)
    at org.apache.sqoop.mapreduce.DelegatingOutputFormat.getRecordWriter(DelegatingOutputFormat.java:82)
    at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.<init>(MapTask.java:628)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:753)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
    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:1121)
    at org.apache.hadoop.mapred.Child.main(Child.java:249)
Caused by: org.apache.hadoop.hbase.client.NoServerForRegionException: Unable to find region for mypop,,99999999999999 after 10 tries.
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:991)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:896)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegionInMeta(HConnectionManager.java:998)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:900)
    at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:857)
    at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:233)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:173)
    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:132)
    at org.apache.sqoop.hbase.HBasePutProcessor.setConf(HBasePutProcessor.java:119)
    ... 12 more
BSMP
  • 4,596
  • 8
  • 33
  • 44
Florencia
  • 51
  • 1
  • 5

1 Answers1

0

Looks like your Sqoop is not able to contact the RegionServer which holds the regions for this table. Please make sure that RegionServers are running fine and there is no network related issue. Add the hbase-*.jar into your SQOOP_HOME/lib folder.

Visit the HBase webui by pointing your web browser to hmaster_machine:60010 and see if your RegionServers are listed there. Try to dig the RegionServer logs if they are not running.

Tariq
  • 34,076
  • 8
  • 57
  • 79
  • Thank you for the reply. Actually, in webui (master:60010), all my regionservers are listed here, and they're online for serving regions. I also had added the hbase-*.jar in my SQOOP_HOME/lib folder. But, I still got the same error. I've been trying to solve the problem for these days, but I'm stuck.. Maybe, it's some kind of network related issue... But, what kind of network related issue that may lead to this problem? Thanks. – Florencia Aug 01 '13 at 07:25