You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2019/03/08 16:36:59 UTC
[hive] branch master updated: HIVE-21280 : Null pointer exception
on running compaction against a MM table. (Aditya Shah via Ashutosh
Chauhan)
This is an automated email from the ASF dual-hosted git repository.
hashutosh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 0dd45a2 HIVE-21280 : Null pointer exception on running compaction against a MM table. (Aditya Shah via Ashutosh Chauhan)
0dd45a2 is described below
commit 0dd45a2c59939e0d28b4690952456e67c305cfce
Author: Aditya Shah <ad...@gmail.com>
AuthorDate: Fri Mar 8 08:36:16 2019 -0800
HIVE-21280 : Null pointer exception on running compaction against a MM table. (Aditya Shah via Ashutosh Chauhan)
Signed-off-by: Ashutosh Chauhan <ha...@apache.org>
---
ql/src/java/org/apache/hadoop/hive/ql/DriverUtils.java | 2 +-
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/DriverUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/DriverUtils.java
index a2c6862..f31b156 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/DriverUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/DriverUtils.java
@@ -47,7 +47,7 @@ public class DriverUtils {
SessionState.setCurrentSessionState(sessionState);
boolean isOk = false;
try {
- QueryState qs = new QueryState.Builder().withHiveConf(conf).nonIsolated().build();
+ QueryState qs = new QueryState.Builder().withHiveConf(conf).withGenerateNewQueryId(true).nonIsolated().build();
Driver driver = new Driver(qs, user, null, null);
driver.setCompactionWriteIds(writeIds, compactorTxnId);
try {
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java
index f52b023..198f7fd 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java
@@ -446,7 +446,7 @@ public class CompactorMR {
//thinking it already has a txn opened
String user = UserGroupInformation.getCurrentUser().getShortUserName();
- SessionState sessionState = DriverUtils.setUpSessionState(driverConf, user, false);
+ SessionState sessionState = DriverUtils.setUpSessionState(driverConf, user, true);
// Note: we could skip creating the table and just add table type stuff directly to the
// "insert overwrite directory" command if there were no bucketing or list bucketing.