HIVE-13105 : LLAP token hashCode and equals methods are incorrect (Sergey 
Shelukin, reviewed by Prasanth Jayachandran)


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

Branch: refs/heads/master
Commit: a4d207f4e96ff602bdf447ff9739ade317832832
Parents: c659b20
Author: Sergey Shelukhin <ser...@apache.org>
Authored: Mon Feb 22 13:50:20 2016 -0800
Committer: Sergey Shelukhin <ser...@apache.org>
Committed: Mon Feb 22 13:52:02 2016 -0800

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


http://git-wip-us.apache.org/repos/asf/hive/blob/a4d207f4/llap-common/src/java/org/apache/hadoop/hive/llap/security/LlapTokenIdentifier.java
----------------------------------------------------------------------
diff --git 
a/llap-common/src/java/org/apache/hadoop/hive/llap/security/LlapTokenIdentifier.java
 
b/llap-common/src/java/org/apache/hadoop/hive/llap/security/LlapTokenIdentifier.java
index f0bb495..c4bee75 100644
--- 
a/llap-common/src/java/org/apache/hadoop/hive/llap/security/LlapTokenIdentifier.java
+++ 
b/llap-common/src/java/org/apache/hadoop/hive/llap/security/LlapTokenIdentifier.java
@@ -59,12 +59,14 @@ public class LlapTokenIdentifier extends 
AbstractDelegationTokenIdentifier {
 
   @Override
   public int hashCode() {
-    return -1;
+    // Nothing else right now.
+    return super.hashCode();
   }
 
   @Override
   public boolean equals(Object other) {
-    return (other != null) && 
other.getClass().isAssignableFrom(this.getClass());
+    // Nothing else right now.
+    return super.equals(other);
   }
 
   @Override

Reply via email to