...
Code Block | ||
---|---|---|
| ||
import org.apache.hadoop.security.UserGroupInformation; HiveEndPoint hiveEP2 = ... ; UserGroupInformation ugi = .. authenticateWithKerberos(principal,keytab); StreamingConnection secureConn = hiveEP2.newConnection(true, null, ugi); DelimitedInputWriter writer3 = new DelimitedInputWriter(fieldNames, ",", hiveEP2); TransactionBatch txnBatch3= secureConn.fetchTransactionBatch(10, writer3); ///// Batch 1 - First TXN – over secure connection txnBatch3.beginNextTransaction(); txnBatch3.write("28,Eric Baldeschwieler".getBytes()); txnBatch3.write("29,Ari Zilka".getBytes()); txnBatch3.commit(); txnBatch3.close(); secureConn.close(); |
Knowledge Base