[
https://issues.apache.org/jira/browse/ATLAS-1351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15727770#comment-15727770
]
Suma Shivaprasad edited comment on ATLAS-1351 at 12/7/16 5:43 AM:
------------------------------------------------------------------
[~svimal2106] I just checked that getD() returns the path . Was this
intentional and guaranteed to be null in all cases?
If not, then we can use getT().getCompleteName if getT() is not null else
default to getPath()
was (Author: suma.shivaprasad):
[~svimal2106] Can you check if getT() is not null and use that first and if
null the database.toString()?
> HiveHook fails with NPE for hive process registration
> -----------------------------------------------------
>
> Key: ATLAS-1351
> URL: https://issues.apache.org/jira/browse/ATLAS-1351
> Project: Atlas
> Issue Type: Bug
> Affects Versions: 0.8-incubating
> Reporter: Ayub Khan
> Assignee: Vimal Sharma
> Attachments: ATLAS-1351.patch, hive.log
>
>
> 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*
> {noformat}
> 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)
> {noformat}
> Attaching hive.log for reference.
> Sample sqoop import command:
> {noformat}
> /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
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)