Member since
12-09-2015
34
Posts
12
Kudos Received
3
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
3448 | 09-26-2016 06:28 PM | |
1675 | 12-11-2015 02:58 PM | |
2328 | 12-11-2015 02:50 PM |
12-20-2016
03:16 AM
1 Kudo
I got it working now. Here is what I did [LAKE] [smanjee@lake1 ~]# beeline -u "jdbc:hive2://example.com:2181,example.com:2181,example:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2" --hiveconf hive.execution.engine=mr
and it worked. I was missing the " " around the jdbc 0: jdbc:hive2://example.com:2> set hive.execution.engine;
+---------------------------+--+
| set |
+---------------------------+--+
| hive.execution.engine=mr |
+---------------------------+--+
1 row selected (0.192 seconds)
0: jdbc:hive2://example.com:2>
... View more
09-26-2016
06:28 PM
I've resolved the issue by using the --boundary-query option in Sqoop, in tandem with my use of --query and --split-by. Will post answer shortly. Edit: Posted answer at top of my question. Here's the code again for convenience: sqoop import -Ddb2.jcc.charsetDecoderEncoder=3 -Dmapred.job.queue.name=default --connect jdbc:db2://mybox.mycompany.com:1234/mydb2db --username myuser --password mypassword --query "select * from ( SELECT column1, column2, column3, current timestamp as load_time, CHAR(current date, iso) as load_dt FROM my_database.my_table where column1 <= 1000 )a WHERE $CONDITIONS with UR" --hcatalog-database myHiveDB --hcatalog-table myHiveTable --split-by column1 --fields-terminated-by \001 -m 5 --relaxed-isolation --fetch-size=100000 --boundary-query "SELECT MIN(column1), MAX(column1) FROM my_database.my_table where column1 <= 1000 with UR"
... View more
01-28-2016
07:17 PM
2 Kudos
Hi @Landon Robinson, take a look at http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.4/bk_dataintegration/content/hive-jdbc-odbc-drivers.html If you're writing Java code, the easiest to use is probably the provided JDBC driver. You can get the current version of the JDBC driver in one of two ways: 1. At /user/hdp/current/hive-client/lib/hive-jdbc.jar on your edge/client node 2. here- you'll need to pick the jar corresponding to your HDP version (Ambari shows this under the Admin->Stacks and Versions->Versions tab, or you can display it on the CLI by typing "hdp-select", which shows the version number of each installed component.
... View more
01-19-2016
03:34 PM
Thanks! I gave that a try after posting this, and have updated my question with my findings accordingly. Thanks for answering!
... View more
12-22-2015
09:46 PM
You are very welcome, Happy to be of help.
... View more