HBASE-20110 Findbugs in zk and mr caused nightly #409 branch-2 to fail
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/5b64de45 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5b64de45 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5b64de45 Branch: refs/heads/HBASE-19064 Commit: 5b64de45edf85abdc32ed98cf4396dea43283377 Parents: 016cf0c Author: Michael Stack <st...@apache.org> Authored: Wed Feb 28 23:38:35 2018 -0800 Committer: Michael Stack <st...@apache.org> Committed: Wed Feb 28 23:39:21 2018 -0800 ---------------------------------------------------------------------- .../src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java | 2 ++ .../org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/5b64de45/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java ---------------------------------------------------------------------- diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java index d58ff48..f7405fd 100644 --- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java +++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/Import.java @@ -145,6 +145,8 @@ public class Import extends Configured implements Tool { } @Override + @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "EQ_COMPARETO_USE_OBJECT_EQUALS", + justification = "This is wrong, yes, but we should be purging Writables, not fixing them") public int compareTo(CellWritableComparable o) { return CellComparator.getInstance().compare(this.kv, o.kv); } http://git-wip-us.apache.org/repos/asf/hbase/blob/5b64de45/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java ---------------------------------------------------------------------- diff --git a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java index 0285a0d..9343ec2 100644 --- a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java +++ b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java @@ -419,7 +419,6 @@ public class RecoverableZooKeeper { // try to verify whether the previous setData success or not try{ Stat stat = new Stat(); - startTime = EnvironmentEdgeManager.currentTime(); byte[] revData = checkZk().getData(path, false, stat); if(Bytes.compareTo(revData, newData) == 0) { // the bad version is caused by previous successful setData @@ -556,7 +555,6 @@ public class RecoverableZooKeeper { // If the connection was lost, there is still a possibility that // we have successfully created the node at our previous attempt, // so we read the node and compare. - startTime = EnvironmentEdgeManager.currentTime(); byte[] currentData = checkZk().getData(path, false, null); if (currentData != null && Bytes.compareTo(currentData, data) == 0) { @@ -725,7 +723,6 @@ public class RecoverableZooKeeper { } public void sync(String path, AsyncCallback.VoidCallback cb, Object ctx) throws KeeperException { - long startTime = EnvironmentEdgeManager.currentTime(); checkZk().sync(path, cb, null); }