diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java index b9019e0a0d9..4c15776c029 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java @@ -50,36 +50,6 @@ import com.google.protobuf.ServiceException; @InterfaceAudience.Private public class ReplicationProtbufUtil { - /** - * Get the HLog entries from a list of protocol buffer WALEntry - * - * @param protoList the list of protocol buffer WALEntry - * @return an array of HLog entries - */ - public static HLog.Entry[] - toHLogEntries(final List protoList) throws IOException { - List entries = new ArrayList(); - for (AdminProtos.WALEntry entry: protoList) { - WALProtos.WALKey walKey = entry.getKey(); - HLogKey key = new HLogKey(walKey); - WALEdit edit = new WALEdit(); - for (ByteString keyValue: entry.getKeyValueBytesList()) { - edit.add(new KeyValue(keyValue.toByteArray())); - } - if (walKey.getScopesCount() > 0) { - TreeMap scopes = - new TreeMap(Bytes.BYTES_COMPARATOR); - for (WALProtos.FamilyScope scope: walKey.getScopesList()) { - scopes.put(scope.getFamily().toByteArray(), - Integer.valueOf(scope.getScopeType().ordinal())); - } - key.setScopes(scopes); - } - entries.add(new HLog.Entry(key, edit)); - } - return entries.toArray(new HLog.Entry[entries.size()]); - } - /** * A helper to replicate a list of HLog entries using admin protocol. *