You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2018/05/22 19:14:27 UTC

[2/5] hive git commit: HIVE-19628 : possible NPE in LLAP testSigning (Sergey Shelukhin, reviewed by Jason Dere)

HIVE-19628 : possible NPE in LLAP testSigning (Sergey Shelukhin, reviewed by Jason Dere)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/43e2f963
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/43e2f963
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/43e2f963

Branch: refs/heads/master
Commit: 43e2f9632130d569c93ebeeb11297813ca34b80c
Parents: f4352e5
Author: sergey <se...@apache.org>
Authored: Tue May 22 12:03:35 2018 -0700
Committer: sergey <se...@apache.org>
Committed: Tue May 22 12:14:11 2018 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/llap/security/TestLlapSignerImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/43e2f963/llap-server/src/test/org/apache/hadoop/hive/llap/security/TestLlapSignerImpl.java
----------------------------------------------------------------------
diff --git a/llap-server/src/test/org/apache/hadoop/hive/llap/security/TestLlapSignerImpl.java b/llap-server/src/test/org/apache/hadoop/hive/llap/security/TestLlapSignerImpl.java
index 19a90c7..6be6836 100644
--- a/llap-server/src/test/org/apache/hadoop/hive/llap/security/TestLlapSignerImpl.java
+++ b/llap-server/src/test/org/apache/hadoop/hive/llap/security/TestLlapSignerImpl.java
@@ -106,9 +106,9 @@ public class TestLlapSignerImpl {
   private FakeSecretManager rollKey(FakeSecretManager fsm, int idToPreserve) throws IOException {
     // Adding keys is PITA - there's no way to plug into timed rolling; just create a new fsm.
     DelegationKey dk = fsm.getDelegationKey(idToPreserve), curDk = fsm.getCurrentKey();
-    if (curDk.getKeyId() != idToPreserve) {
+    if (curDk == null || curDk.getKeyId() != idToPreserve) {
       LOG.warn("The current key is not the one we expect; key rolled in background? Signed with "
-          + idToPreserve + " but got " + curDk.getKeyId());
+          + idToPreserve + " but got " + (curDk == null ? "null" : curDk.getKeyId()));
     }
     // Regardless of the above, we should have the key we've signed with.
     assertNotNull(dk);