org.apache.hadoop.hbase.protobuf
Class ReplicationProtbufUtil

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

@InterfaceAudience.Private
public class ReplicationProtbufUtil
extends Object


Constructor Summary
ReplicationProtbufUtil()
           
 
Method Summary
static Pair<AdminProtos.ReplicateWALEntryRequest,CellScanner> buildReplicateWALEntryRequest(HLog.Entry[] entries)
          Create a new ReplicateWALEntryRequest from a list of HLog entries
static void replicateWALEntry(AdminProtos.AdminService.BlockingInterface 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)
                                  throws IOException
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
Throws:
IOException

replicateWALEntry

public static void replicateWALEntry(AdminProtos.AdminService.BlockingInterface 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 Pair<AdminProtos.ReplicateWALEntryRequest,CellScanner> buildReplicateWALEntryRequest(HLog.Entry[] entries)
Create a new ReplicateWALEntryRequest from a list of HLog entries

Parameters:
entries - the HLog entries to be replicated
Returns:
a pair of ReplicateWALEntryRequest and a CellScanner over all the WALEdit values found.


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