Reply
Highlighted
New Contributor
Posts: 1
Registered: ‎08-08-2017

NullPointerException fixed by HIVE-13588

CDH 5.12 hive has cherrypicked commit from apache hive HIVE-13183, but this commit introduced NPE which was fixed by following commit. We experience NPE and had to compile CDH hive by ourself with this fix:


Index: ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java (revision 895674c8c782a23d27daffd8be3e4c26252f834b)
+++ ql/src/java/org/apache/hadoop/hive/ql/exec/mr/MapredLocalTask.java (revision f32fd0f468cc9a04dcd643795867cada3440ddba)
@@ -323,10 +323,18 @@

CachingPrintStream errPrintStream = new CachingPrintStream(System.err);

- StreamPrinter outPrinter = new StreamPrinter(executor.getInputStream(), null, System.out,
- OperationLog.getCurrentOperationLog().getPrintStream());
- StreamPrinter errPrinter = new StreamPrinter(executor.getErrorStream(), null, errPrintStream,
- OperationLog.getCurrentOperationLog().getPrintStream());
+ StreamPrinter outPrinter;
+ StreamPrinter errPrinter;
+ OperationLog operationLog = OperationLog.getCurrentOperationLog();
+ if (operationLog != null) {
+ outPrinter = new StreamPrinter(executor.getInputStream(), null, System.out,
+ operationLog.getPrintStream());
+ errPrinter = new StreamPrinter(executor.getErrorStream(), null, errPrintStream,
+ operationLog.getPrintStream());
+ } else {
+ outPrinter = new StreamPrinter(executor.getInputStream(), null, System.out);
+ errPrinter = new StreamPrinter(executor.getErrorStream(), null, errPrintStream);
+ }

outPrinter.start();
errPrinter.start();

Cloudera Employee
Posts: 177
Registered: ‎03-23-2015

Re: NullPointerException fixed by HIVE-13588

Hi,

Thanks for reporting the issue. The best action is to create an upstream JIRA to report the problem, by detailing how to re-produce the issue and provide patch you have, so that anyone interested can review and confirm the fix.

Once you done, put the JIRA link here for reference.
Announcements