org.apache.hadoop.hbase.protobuf
Class ReplicationProtbufUtil

java.lang.Object
  extended by org.apache.hadoop.hbase.protobuf.ReplicationProtbufUtil

public class ReplicationProtbufUtil
extends Object


Constructor Summary
ReplicationProtbufUtil()
           
 
Method Summary
static AdminProtos.ReplicateWALEntryRequest buildReplicateWALEntryRequest(HLog.Entry[] entries)
          Create a new ReplicateWALEntryRequest from a list of HLog entries
static void replicateWALEntry(AdminProtocol admin, HLog.Entry[] entries)
          A helper to replicate a list of HLog entries using admin protocol.
static HLog.Entry[] toHLogEntries(List<AdminProtos.WALEntry> protoList)
          Get the HLog entries from a list of protocol buffer WALEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicationProtbufUtil

public ReplicationProtbufUtil()
Method Detail

toHLogEntries

public static HLog.Entry[] toHLogEntries(List<AdminProtos.WALEntry> protoList)
Get the HLog entries from a list of protocol buffer WALEntry

Parameters:
protoList - the list of protocol buffer WALEntry
Returns:
an array of HLog entries

replicateWALEntry

public static void replicateWALEntry(AdminProtocol admin,
                                     HLog.Entry[] entries)
                              throws IOException
A helper to replicate a list of HLog entries using admin protocol.

Parameters:
admin -
entries -
Throws:
IOException

buildReplicateWALEntryRequest

public static AdminProtos.ReplicateWALEntryRequest buildReplicateWALEntryRequest(HLog.Entry[] entries)
Create a new ReplicateWALEntryRequest from a list of HLog entries

Parameters:
entries - the HLog entries to be replicated
Returns:
a ReplicateWALEntryRequest


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.