1
votes

I am using hadoop-2.6.0 with kerberos security. I have installed hbase with kerberos security and could able to create table and scan it.

I could run sqoop job as well to import data from mysql into hdfs but sqoop job fails when trying to import from mysql into HBase.

Sqoop Command

sqoop import --hbase-create-table  --hbase-table newtable --column-family ck --hbase-row-key id --connect jdbc:mysql://localhost/sample --username root --password root --table newtable -m 1

Exception

15/01/21 16:30:24 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=90000 watcher=hconnection-0x734c0647, quorum=localhost:2181, baseZNode=/hbase
15/01/21 16:30:24 INFO zookeeper.ClientCnxn: Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknownerror)
15/01/21 16:30:24 INFO zookeeper.ClientCnxn: Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session
15/01/21 16:30:24 INFO zookeeper.ClientCnxn: Session establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 0x14b0ac124600016, negotiated timeout = 40000
15/01/21 16:30:25 ERROR tool.ImportTool: Error during import: Can't get authentication token
1
can you please put complete info . Please execute the command after HADOOP_OPTS="-Dsun.security.krb5.debug=true so that it will be easy to understand what is happeningSyed Abdul Kather

1 Answers

0
votes

Could you please try the following :

  1. In the connection string add the port number as : jdbc:mysql://localhost:3306/sample

  2. Remove --table newtable. Create the required table on Hbase first with the column family.

  3. mention --split-by id

  4. Finally mention a specific --fetch-size , as the sqoop client for MySQL have an error internally which attempts to set the default MIN fetch size which will run into an exception.

Could you attempt the import again and let us know ?