diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java index fb09102..b604765 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeersZKImpl.java @@ -181,7 +181,13 @@ public class ReplicationPeersZKImpl extends ReplicationStateZKBase implements Re + " does not exist."); } String tableCFsZKNode = getTableCFsNode(id); - byte[] tableCFs = Bytes.toBytes(tableCFsStr); + byte[] tableCFs; + if (tableCFsStr == null || tableCFsStr.length() == 0) { + tableCFs = new byte[0]; + } else { + tableCFs = Bytes.toBytes(tableCFsStr); + } + if (ZKUtil.checkExists(this.zookeeper, tableCFsZKNode) != -1) { ZKUtil.setData(this.zookeeper, tableCFsZKNode, tableCFs); } else {