public class AccumuloReplicaSystem extends Object implements ReplicaSystem
| Modifier and Type | Class and Description |
|---|---|
static class |
AccumuloReplicaSystem.ReplicationStats |
protected class |
AccumuloReplicaSystem.RFileClientExecReturn |
static class |
AccumuloReplicaSystem.RFileReplication |
protected class |
AccumuloReplicaSystem.WalClientExecReturn |
static class |
AccumuloReplicaSystem.WalReplication
A "struct" to avoid a nested Entry.
|
| Constructor and Description |
|---|
AccumuloReplicaSystem() |
| Modifier and Type | Method and Description |
|---|---|
static String |
buildConfiguration(String instanceName,
String zookeepers)
Generate the configuration string for this ReplicaSystem
|
void |
configure(String configuration) |
protected Set<Integer> |
consumeWalPrefix(ReplicationTarget target,
DataInputStream wal,
org.apache.hadoop.fs.Path p,
Replication.Status status,
long sizeLimit) |
protected AccumuloConfiguration |
getConf() |
protected ClientContext |
getContextForPeer(AccumuloConfiguration localConf,
ReplicationTarget target,
String principal,
AuthenticationToken token) |
protected VolumeManager |
getFs() |
protected String |
getInstanceName() |
protected String |
getKeytab(AccumuloConfiguration localConf,
ReplicationTarget target) |
protected AccumuloReplicaSystem.RFileReplication |
getKeyValues(ReplicationTarget target,
DataInputStream input,
org.apache.hadoop.fs.Path p,
Replication.Status status,
long sizeLimit) |
protected String |
getPassword(AccumuloConfiguration localConf,
ReplicationTarget target) |
protected Instance |
getPeerInstance(ReplicationTarget target) |
protected String |
getPrincipal(AccumuloConfiguration localConf,
ReplicationTarget target) |
protected DataInputStream |
getRFileInputStream(org.apache.hadoop.fs.Path p) |
protected AccumuloReplicaSystem.WalReplication |
getWalEdits(ReplicationTarget target,
DataInputStream wal,
org.apache.hadoop.fs.Path p,
Replication.Status status,
long sizeLimit,
Set<Integer> desiredTids) |
DataInputStream |
getWalStream(org.apache.hadoop.fs.Path p,
org.apache.hadoop.fs.FSDataInputStream input) |
protected String |
getZookeepers() |
Replication.Status |
replicate(org.apache.hadoop.fs.Path p,
Replication.Status status,
ReplicationTarget target,
ReplicaSystemHelper helper) |
protected Replication.Status |
replicateLogs(ClientContext peerContext,
HostAndPort peerTserver,
ReplicationTarget target,
org.apache.hadoop.fs.Path p,
Replication.Status status,
long sizeLimit,
String remoteTableId,
TCredentials tcreds,
ReplicaSystemHelper helper,
org.apache.hadoop.security.UserGroupInformation accumuloUgi,
long timeout) |
protected Replication.Status |
replicateRFiles(ClientContext peerContext,
HostAndPort peerTserver,
ReplicationTarget target,
org.apache.hadoop.fs.Path p,
Replication.Status status,
long sizeLimit,
String remoteTableId,
TCredentials tcreds,
ReplicaSystemHelper helper,
long timeout) |
protected void |
setConf(AccumuloConfiguration conf) |
protected void |
setFs(VolumeManager fs) |
protected void |
setInstanceName(String instanceName) |
protected void |
setZookeepers(String zookeepers) |
protected long |
writeValueAvoidingReplicationCycles(DataOutputStream out,
LogFileValue value,
ReplicationTarget target)
Wrapper around
LogFileValue.write(java.io.DataOutput) which does not serialize Mutations that do not need to be replicate to the given
ReplicationTarget |
protected String getInstanceName()
protected void setInstanceName(String instanceName)
protected String getZookeepers()
protected void setZookeepers(String zookeepers)
protected AccumuloConfiguration getConf()
protected void setConf(AccumuloConfiguration conf)
protected VolumeManager getFs()
protected void setFs(VolumeManager fs)
public static String buildConfiguration(String instanceName, String zookeepers)
public void configure(String configuration)
configure in interface ReplicaSystempublic Replication.Status replicate(org.apache.hadoop.fs.Path p, Replication.Status status, ReplicationTarget target, ReplicaSystemHelper helper)
replicate in interface ReplicaSystemprotected Replication.Status replicateRFiles(ClientContext peerContext, HostAndPort peerTserver, ReplicationTarget target, org.apache.hadoop.fs.Path p, Replication.Status status, long sizeLimit, String remoteTableId, TCredentials tcreds, ReplicaSystemHelper helper, long timeout) throws org.apache.thrift.transport.TTransportException, AccumuloException, AccumuloSecurityException
org.apache.thrift.transport.TTransportExceptionAccumuloExceptionAccumuloSecurityExceptionprotected Replication.Status replicateLogs(ClientContext peerContext, HostAndPort peerTserver, ReplicationTarget target, org.apache.hadoop.fs.Path p, Replication.Status status, long sizeLimit, String remoteTableId, TCredentials tcreds, ReplicaSystemHelper helper, org.apache.hadoop.security.UserGroupInformation accumuloUgi, long timeout) throws org.apache.thrift.transport.TTransportException, AccumuloException, AccumuloSecurityException
org.apache.thrift.transport.TTransportExceptionAccumuloExceptionAccumuloSecurityExceptionprotected String getPassword(AccumuloConfiguration localConf, ReplicationTarget target)
protected String getKeytab(AccumuloConfiguration localConf, ReplicationTarget target)
protected String getPrincipal(AccumuloConfiguration localConf, ReplicationTarget target)
protected ClientContext getContextForPeer(AccumuloConfiguration localConf, ReplicationTarget target, String principal, AuthenticationToken token)
protected Instance getPeerInstance(ReplicationTarget target)
protected AccumuloReplicaSystem.RFileReplication getKeyValues(ReplicationTarget target, DataInputStream input, org.apache.hadoop.fs.Path p, Replication.Status status, long sizeLimit)
protected Set<Integer> consumeWalPrefix(ReplicationTarget target, DataInputStream wal, org.apache.hadoop.fs.Path p, Replication.Status status, long sizeLimit) throws IOException
IOExceptionpublic DataInputStream getWalStream(org.apache.hadoop.fs.Path p, org.apache.hadoop.fs.FSDataInputStream input) throws IOException
IOExceptionprotected AccumuloReplicaSystem.WalReplication getWalEdits(ReplicationTarget target, DataInputStream wal, org.apache.hadoop.fs.Path p, Replication.Status status, long sizeLimit, Set<Integer> desiredTids) throws IOException
IOExceptionprotected long writeValueAvoidingReplicationCycles(DataOutputStream out, LogFileValue value, ReplicationTarget target) throws IOException
LogFileValue.write(java.io.DataOutput) which does not serialize Mutations that do not need to be replicate to the given
ReplicationTargetIOExceptionprotected DataInputStream getRFileInputStream(org.apache.hadoop.fs.Path p) throws IOException
IOExceptionCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.