hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmhs...@apache.org
Subject svn commit: r1520448 - /hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java
Date Thu, 05 Sep 2013 22:42:35 GMT
Author: jmhsieh
Date: Thu Sep  5 22:42:35 2013
New Revision: 1520448

URL: http://svn.apache.org/r1520448
Log:
HBASE-9443 Replication ProtobufUtil.toHLogEntries needs to be removed (Roman Shaposhnik)

Modified:
    hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java

Modified: hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java?rev=1520448&r1=1520447&r2=1520448&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java
(original)
+++ hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java
Thu Sep  5 22:42:35 2013
@@ -51,36 +51,6 @@ import com.google.protobuf.ServiceExcept
 @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<AdminProtos.WALEntry> protoList) throws IOException
{
-    List<HLog.Entry> entries = new ArrayList<HLog.Entry>();
-    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<byte[], Integer> scopes =
-          new TreeMap<byte[], Integer>(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.
    *
    * @param admin



Mime
View raw message