Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.8-incubating
-
None
-
None
Description
HiveHook fails with below stack trace whenever a sqoop import job to copy into hive table.
Impact: No hive process info is captured in Atlas
2016-12-06 11:41:02,304 ERROR [Atlas Logger 0]: hook.HiveHook (HiveHook.java:run(197)) - Atlas hook failed due to error java.lang.NullPointerException at org.apache.atlas.hive.hook.HiveHook$EntityComparator.compare(HiveHook.java:1093) at org.apache.atlas.hive.hook.HiveHook$EntityComparator.compare(HiveHook.java:1089) at java.util.TreeMap.compare(TreeMap.java:1188) at java.util.TreeMap.put(TreeMap.java:531) at java.util.TreeSet.add(TreeSet.java:255) at java.util.AbstractCollection.addAll(AbstractCollection.java:342) at java.util.TreeSet.addAll(TreeSet.java:312) at org.apache.atlas.hive.hook.HiveHook.registerProcess(HiveHook.java:608) at org.apache.atlas.hive.hook.HiveHook.fireAndForget(HiveHook.java:235) at org.apache.atlas.hive.hook.HiveHook.access$200(HiveHook.java:84) at org.apache.atlas.hive.hook.HiveHook$2.run(HiveHook.java:195) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
Attaching hive.log for reference.
Sample sqoop import command:
/usr/hdp/current/sqoop-client/bin/sqoop import --connect jdbc:mysql://ctr-e64-1480733150053-3050-01-000002.hwx.site/sqoopTests --username sqoop --password sqoop --hive-import --warehouse-dir /user/hrt_qa --table SqoopTablejufuv3lh71 --hive-table hiveSqoopTablejufuv3lh71temp4 --m 1 --create-hive-table