From efffa5714e4b53ecf66fcd162441d4c8c6259069 Mon Sep 17 00:00:00 2001 From: Jonathan Hsieh Date: Thu, 5 Sep 2013 22:44:53 +0000 Subject: [PATCH] HBASE-9443 ReplicationProtobufUtil.HLogEntries needs to be removed (Roman Shaposhnik) git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1520449 13f79535-47bb-0310-9956-ffa450edef68 --- .../protobuf/ReplicationProtbufUtil.java | 30 ------------------- 1 file changed, 30 deletions(-) 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. *