Sqoop import into accumulo, connect to accumulo whith principal and keytab.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Sqoop import into accumulo, connect to accumulo whith principal and keytab.

AlexZ
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi guys!

The cluster is kerberized.
The question is the following: you need to import a table from the oracle into the accumulator via sqoop.

At import here such error

17/04/10 14:23:54 INFO zookeeper.ZooKeeper: Client environment:java.library.path=:/usr/hdp/2.5.3.0-37/hadoop/lib/native/Linux-amd64-64:/usr/hdp/2.5.3.0-37/hadoop/lib/native
17/04/10 14:23:54 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
17/04/10 14:23:54 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA> 
17/04/10 14:23:54 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux
17/04/10 14:23:54 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64
17/04/10 14:23:54 INFO zookeeper.ZooKeeper: Client environment:os.version=3.10.0-514.6.1.el7.x86_64
17/04/10 14:23:54 INFO zookeeper.ZooKeeper: Client environment:user.name=root
17/04/10 14:23:54 INFO zookeeper.ZooKeeper: Client environment:user.home=/root
17/04/10 14:23:54 INFO zookeeper.ZooKeeper: Client environment:user.dir=/
17/04/10 14:23:54 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=ambari.hdptest:2181,nn.hdptest:2181,dn1.hdptest:2181 sessionTimeout=30000 watcher=org.apache.accumulo.fate.zookeeper.ZooSession$ZooWatcher@60bc308b
17/04/10 14:23:54 INFO zookeeper.ClientCnxn: Opening socket connection to server dn1.hdptest/10.104.5.102:2181. Will not attempt to authenticate using SASL (unknown error)
17/04/10 14:23:54 INFO zookeeper.ClientCnxn: Socket connection established to dn1.hdptest/10.104.5.102:2181, initiating session
17/04/10 14:23:54 INFO zookeeper.ClientCnxn: Session establishment complete on server dn1.hdptest/10.104.5.102:2181, sessionid = 0x25a22db92a32f2f, negotiated timeout = 30000
17/04/10 14:23:54 ERROR tool.ImportTool: Error during import: org.apache.accumulo.core.client.AccumuloException: java.lang.IllegalArgumentException: Cannot determine SASL mechanism for token class: class org.apache.accumulo.core.client.security.tokens.PasswordToken

Here is the import line:

sqoop import --connect jdbc:oracle:thin:@//10.104.9.43:1521/MCPB --query 'select * from a4m.ttlg where branch =1 and code >= 2340339404 AND $CONDITIONS' --username z101 -P --accumulo-instance hdp-accumulo-instance --accumulo-zookeepers ambari.hdptest:2181,nn.hdptest:2181,dn1.hdptest:2181 --accumulo-user accum_presto@HDPTEST --accumulo-password <password> --accumulo-table ttlg --accumulo-column-family col1 --accumulo-row-key pan --accumulo-create-table --fetch-size=10000 --split-by pan --target-dir /user/accumulo/a4m_accum

Is it possible to connect to Aссumulo using the principal and keytab, and not the principal and password? (In hive also it was possible to connect to accumulo only using keytab)

Can there is a parameter for connecting from sqoop to accumulo using keytab?
In hive, I found such a parameter --accumulo.user.keytab
(hive -hiveconf accumulo.instance.name=hdp-accumulo-instance -hiveconf accumulo.zookeepers=ambari.hdptest:2181,nn.hdptest:2181,dn1.hdptest:2181 -hiveconf accumulo.sasl.enabled=true -hiveconf accumulo.user.name=accumulo-hdptest@HDPTEST -hiveconf accumulo.user.keytab=/etc/security/keytabs/accumulo.headless.keytab -hiveconf accumulo.trace.token.type=org.apache.accumulo.core.client.security.tokens.KerberosToken)

Just the principal and password in hive does not work either, the same error.
Loading...