Class VisibilityReplicationEndpoint
java.lang.Object
org.apache.hadoop.hbase.security.visibility.VisibilityReplicationEndpoint
- All Implemented Interfaces:
ReplicationEndpoint,ReplicationPeerConfigListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.replication.ReplicationEndpoint
ReplicationEndpoint.Context, ReplicationEndpoint.ReplicateContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ReplicationEndpointprivate static final org.slf4j.Loggerprivate final VisibilityLabelService -
Constructor Summary
ConstructorsConstructorDescriptionVisibilityReplicationEndpoint(ReplicationEndpoint endpoint, VisibilityLabelService visibilityLabelsService) -
Method Summary
Modifier and TypeMethodDescriptionvoidWaits for theReplicationEndpointto be up and running.voidawaitRunning(long timeout, TimeUnit unit) Waits for theReplicationEndpointto to be up and running for no more than the given time.voidWaits for theReplicationEndpointto reach the terminated (internal) state.voidawaitTerminated(long timeout, TimeUnit unit) Waits for theReplicationEndpointto reach a terminal state for no more than the given time.booleanWhether or not, the replication endpoint can replicate to it's source cluster with the same UUIDReturns theThrowablethat caused this service to fail.Returns a UUID of the provided peer id.Returns a WALEntryFilter to use for filtering out WALEntries from the log.voidinit(ReplicationEndpoint.Context context) Initialize the replication endpoint with the given context.booleanReturnstrueif this service is RUNNING.booleanReturns Returntrueis this service is STARTING (but not yet RUNNING).voidCallback method for when users update the ReplicationPeerConfig for this peerbooleanreplicate(ReplicationEndpoint.ReplicateContext replicateContext) Replicate the given set of entries (in the context) to the other cluster.voidstart()Initiates service startup and returns immediately.voidstop()If the service is starting or running, this initiates service shutdown and returns immediately.
-
Field Details
-
LOG
-
delegator
-
visibilityLabelsService
-
-
Constructor Details
-
VisibilityReplicationEndpoint
public VisibilityReplicationEndpoint(ReplicationEndpoint endpoint, VisibilityLabelService visibilityLabelsService)
-
-
Method Details
-
init
Description copied from interface:ReplicationEndpointInitialize the replication endpoint with the given context.- Specified by:
initin interfaceReplicationEndpoint- Parameters:
context- replication context- Throws:
IOException- error occur when initialize the endpoint.
-
peerConfigUpdated
Description copied from interface:ReplicationPeerConfigListenerCallback method for when users update the ReplicationPeerConfig for this peer- Specified by:
peerConfigUpdatedin interfaceReplicationPeerConfigListener- Parameters:
rpc- The updated ReplicationPeerConfig
-
replicate
Description copied from interface:ReplicationEndpointReplicate the given set of entries (in the context) to the other cluster. Can block until all the given entries are replicated. Upon this method is returned, all entries that were passed in the context are assumed to be persisted in the target cluster.- Specified by:
replicatein interfaceReplicationEndpoint- Parameters:
replicateContext- a context where WAL entries and other parameters can be obtained.
-
getPeerUUID
Description copied from interface:ReplicationEndpointReturns a UUID of the provided peer id. Every HBase cluster instance has a persisted associated UUID. If the replication is not performed to an actual HBase cluster (but some other system), the UUID returned has to uniquely identify the connected target system.- Specified by:
getPeerUUIDin interfaceReplicationEndpoint- Returns:
- a UUID or null if the peer cluster does not exist or is not connected.
-
canReplicateToSameCluster
Description copied from interface:ReplicationEndpointWhether or not, the replication endpoint can replicate to it's source cluster with the same UUID- Specified by:
canReplicateToSameClusterin interfaceReplicationEndpoint
-
getWALEntryfilter
Description copied from interface:ReplicationEndpointReturns a WALEntryFilter to use for filtering out WALEntries from the log. Replication infrastructure will call this filter before sending the edits to shipEdits().- Specified by:
getWALEntryfilterin interfaceReplicationEndpoint- Returns:
- a
WALEntryFilteror null.
-
isRunning
Description copied from interface:ReplicationEndpointReturnstrueif this service is RUNNING.- Specified by:
isRunningin interfaceReplicationEndpoint
-
isStarting
Description copied from interface:ReplicationEndpointReturns Returntrueis this service is STARTING (but not yet RUNNING).- Specified by:
isStartingin interfaceReplicationEndpoint
-
start
Description copied from interface:ReplicationEndpointInitiates service startup and returns immediately. A stopped service may not be restarted. Equivalent of startAsync call in Guava Service.- Specified by:
startin interfaceReplicationEndpoint
-
awaitRunning
Description copied from interface:ReplicationEndpointWaits for theReplicationEndpointto be up and running.- Specified by:
awaitRunningin interfaceReplicationEndpoint
-
awaitRunning
Description copied from interface:ReplicationEndpointWaits for theReplicationEndpointto to be up and running for no more than the given time.- Specified by:
awaitRunningin interfaceReplicationEndpoint- Parameters:
timeout- the maximum time to waitunit- the time unit of the timeout argument- Throws:
TimeoutException- if the service has not reached the given state within the deadline
-
stop
Description copied from interface:ReplicationEndpointIf the service is starting or running, this initiates service shutdown and returns immediately. If the service has already been stopped, this method returns immediately without taking action. Equivalent of stopAsync call in Guava Service.- Specified by:
stopin interfaceReplicationEndpoint
-
awaitTerminated
Description copied from interface:ReplicationEndpointWaits for theReplicationEndpointto reach the terminated (internal) state.- Specified by:
awaitTerminatedin interfaceReplicationEndpoint
-
awaitTerminated
Description copied from interface:ReplicationEndpointWaits for theReplicationEndpointto reach a terminal state for no more than the given time.- Specified by:
awaitTerminatedin interfaceReplicationEndpoint- Parameters:
timeout- the maximum time to waitunit- the time unit of the timeout argument- Throws:
TimeoutException- if the service has not reached the given state within the deadline
-
failureCause
Description copied from interface:ReplicationEndpointReturns theThrowablethat caused this service to fail.- Specified by:
failureCausein interfaceReplicationEndpoint
-