HBASE-20110 Findbugs in zk and mr caused nightly #409 branch-2 to fail
This commit is contained in:
parent
e0ff595744
commit
03f9cb89a6
|
@ -218,6 +218,8 @@ public class Import extends Configured implements Tool {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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) {
|
public int compareTo(CellWritableComparable o) {
|
||||||
return CellComparator.getInstance().compare(this.kv, o.kv);
|
return CellComparator.getInstance().compare(this.kv, o.kv);
|
||||||
}
|
}
|
||||||
|
|
|
@ -419,7 +419,6 @@ public class RecoverableZooKeeper {
|
||||||
// try to verify whether the previous setData success or not
|
// try to verify whether the previous setData success or not
|
||||||
try{
|
try{
|
||||||
Stat stat = new Stat();
|
Stat stat = new Stat();
|
||||||
startTime = EnvironmentEdgeManager.currentTime();
|
|
||||||
byte[] revData = checkZk().getData(path, false, stat);
|
byte[] revData = checkZk().getData(path, false, stat);
|
||||||
if(Bytes.compareTo(revData, newData) == 0) {
|
if(Bytes.compareTo(revData, newData) == 0) {
|
||||||
// the bad version is caused by previous successful setData
|
// 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
|
// If the connection was lost, there is still a possibility that
|
||||||
// we have successfully created the node at our previous attempt,
|
// we have successfully created the node at our previous attempt,
|
||||||
// so we read the node and compare.
|
// so we read the node and compare.
|
||||||
startTime = EnvironmentEdgeManager.currentTime();
|
|
||||||
byte[] currentData = checkZk().getData(path, false, null);
|
byte[] currentData = checkZk().getData(path, false, null);
|
||||||
if (currentData != null &&
|
if (currentData != null &&
|
||||||
Bytes.compareTo(currentData, data) == 0) {
|
Bytes.compareTo(currentData, data) == 0) {
|
||||||
|
@ -725,7 +723,6 @@ public class RecoverableZooKeeper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sync(String path, AsyncCallback.VoidCallback cb, Object ctx) throws KeeperException {
|
public void sync(String path, AsyncCallback.VoidCallback cb, Object ctx) throws KeeperException {
|
||||||
long startTime = EnvironmentEdgeManager.currentTime();
|
|
||||||
checkZk().sync(path, cb, null);
|
checkZk().sync(path, cb, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue