HBASE-3065 don't prepend MAGIC if data is empty
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1153300 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c75e396fb6
commit
b41f705662
|
@ -598,8 +598,8 @@ public class RecoverableZooKeeper {
|
||||||
}
|
}
|
||||||
|
|
||||||
private byte[] appendMetaData(byte[] data) {
|
private byte[] appendMetaData(byte[] data) {
|
||||||
if(data == null){
|
if(data == null || data.length == 0){
|
||||||
return null;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] newData = new byte[MAGIC_OFFSET+ID_OFFSET+id.length+data.length];
|
byte[] newData = new byte[MAGIC_OFFSET+ID_OFFSET+id.length+data.length];
|
||||||
|
@ -658,4 +658,4 @@ public class RecoverableZooKeeper {
|
||||||
}
|
}
|
||||||
return lockChildren;
|
return lockChildren;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue