You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jm...@apache.org on 2013/09/06 00:44:53 UTC
svn commit: r1520449 -
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java
Author: jmhsieh
Date: Thu Sep 5 22:44:53 2013
New Revision: 1520449
URL: http://svn.apache.org/r1520449
Log:
HBASE-9443 ReplicationProtobufUtil.HLogEntries needs to be removed (Roman Shaposhnik)
Modified:
hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java
Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java?rev=1520449&r1=1520448&r2=1520449&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/ReplicationProtbufUtil.java Thu Sep 5 22:44:53 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