hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ct...@apache.org
Subject hive git commit: HIVE-13953: Issues in HiveLockObject equals method (Chaoyu Tang, reviewed by Yongzhi Chen)
Date Tue, 07 Jun 2016 18:20:16 GMT
Repository: hive
Updated Branches:
  refs/heads/master 721423d22 -> 82882433d


HIVE-13953: Issues in HiveLockObject equals method (Chaoyu Tang, reviewed by Yongzhi Chen)


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

Branch: refs/heads/master
Commit: 82882433d6025a1d8ecb884e4702c8d280f8f386
Parents: 721423d
Author: ctang <ctang@cloudera.com>
Authored: Tue Jun 7 14:20:03 2016 -0400
Committer: ctang <ctang@cloudera.com>
Committed: Tue Jun 7 14:20:03 2016 -0400

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/ql/lockmgr/HiveLockObject.java    | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/82882433/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveLockObject.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveLockObject.java b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveLockObject.java
index d5ea083..82dc898 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveLockObject.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveLockObject.java
@@ -18,11 +18,10 @@
 
 package org.apache.hadoop.hive.ql.lockmgr;
 
-import java.util.Arrays;
 import java.util.Map;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.metastore.MetaStoreUtils;
 import org.apache.hadoop.hive.ql.metadata.DummyPartition;
 import org.apache.hadoop.hive.ql.metadata.Hive;
@@ -290,9 +289,8 @@ public class HiveLockObject {
     }
 
     HiveLockObject tgt = (HiveLockObject) o;
-    return Arrays.equals(pathNames, tgt.pathNames) &&
-        data == null ? tgt.getData() == null :
-        tgt.getData() != null && data.equals(tgt.getData());
+    return StringUtils.equals(this.getName(), tgt.getName()) &&
+        (data == null ? tgt.getData() == null : data.equals(tgt.getData()));
   }
 
   @Override


Mime
View raw message