hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1153300 - /hbase/trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
Date Tue, 02 Aug 2011 23:01:04 GMT
Author: tedyu
Date: Tue Aug  2 23:01:03 2011
New Revision: 1153300

URL: http://svn.apache.org/viewvc?rev=1153300&view=rev
Log:
HBASE-3065 don't prepend MAGIC if data is empty

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java?rev=1153300&r1=1153299&r2=1153300&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
Tue Aug  2 23:01:03 2011
@@ -598,8 +598,8 @@ public class RecoverableZooKeeper {
   }
   
   private byte[] appendMetaData(byte[] data) {
-    if(data == null){
-      return null;
+    if(data == null || data.length == 0){
+      return data;
     }
     
     byte[] newData = new byte[MAGIC_OFFSET+ID_OFFSET+id.length+data.length];
@@ -658,4 +658,4 @@ public class RecoverableZooKeeper {
     }
     return lockChildren;
   }
-}
\ No newline at end of file
+}



Mime
View raw message