public class ReplicationSpec extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ReplicationSpec.KEY |
static class |
ReplicationSpec.SCOPE |
static class |
ReplicationSpec.Type |
Constructor and Description |
---|
ReplicationSpec()
Default ctor that is useful for determining default states
|
ReplicationSpec(ASTNode node)
Constructor to construct spec based on either the ASTNode that
corresponds to the replication clause itself, or corresponds to
the parent node, and will scan through the children to instantiate
itself.
|
ReplicationSpec(boolean isInReplicationScope,
boolean isMetadataOnly,
String eventReplicationState,
String currentReplicationState,
boolean isNoop,
boolean isLazy,
boolean isReplace) |
ReplicationSpec(com.google.common.base.Function<String,String> keyFetcher) |
ReplicationSpec(String fromId,
String toId) |
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Predicate<Partition> |
allowEventReplacementInto()
Returns a predicate filter to filter an Iterable
|
boolean |
allowEventReplacementInto(Map<String,String> params)
Determines if a current replication event (based on event id) is allowed to
replicate-replace-into a given metastore object (based on state_id stored in their parameters)
|
boolean |
allowReplacement(String currReplState,
String replacementReplState) |
boolean |
allowReplacementInto(Map<String,String> params)
Determines if a current replication object (current state of dump) is allowed to
replicate-replace-into a given metastore object (based on state_id stored in their parameters)
|
String |
get(ReplicationSpec.KEY key) |
String |
getCurrentReplicationState() |
static String |
getLastReplicatedStateFromParameters(Map<String,String> m) |
String |
getReplicationState() |
ReplicationSpec.Type |
getReplSpecType() |
ReplicationSpec.SCOPE |
getScope() |
String |
getValidWriteIdList() |
static boolean |
isApplicable(ASTNode node)
Tests if an ASTNode is a Replication Specification
|
boolean |
isInReplicationScope() |
boolean |
isLazy() |
boolean |
isMetadataOnly() |
boolean |
isNoop() |
boolean |
isReplace() |
boolean |
isTransactionalTableDump() |
void |
setCurrentReplicationState(String currStateId) |
void |
setIsMetadataOnly(boolean isMetadataOnly) |
void |
setIsReplace(boolean isReplace) |
void |
setLazy(boolean isLazy) |
void |
setNoop(boolean isNoop) |
void |
setReplSpecType(ReplicationSpec.Type specType) |
void |
setValidWriteIdList(String validWriteIdList) |
public ReplicationSpec(ASTNode node)
node
- replicationClause node, or parent of replicationClause nodepublic ReplicationSpec()
public ReplicationSpec(boolean isInReplicationScope, boolean isMetadataOnly, String eventReplicationState, String currentReplicationState, boolean isNoop, boolean isLazy, boolean isReplace)
public static boolean isApplicable(ASTNode node)
public boolean allowReplacement(String currReplState, String replacementReplState)
currReplState
- Current object statereplacementReplState
- Replacement-candidate statepublic boolean allowReplacementInto(Map<String,String> params)
public boolean allowEventReplacementInto(Map<String,String> params)
public com.google.common.base.Predicate<Partition> allowEventReplacementInto()
public static String getLastReplicatedStateFromParameters(Map<String,String> m)
public ReplicationSpec.Type getReplSpecType()
public void setReplSpecType(ReplicationSpec.Type specType)
public boolean isInReplicationScope()
public boolean isMetadataOnly()
public void setIsMetadataOnly(boolean isMetadataOnly)
public boolean isReplace()
public void setIsReplace(boolean isReplace)
public String getReplicationState()
public String getCurrentReplicationState()
public void setCurrentReplicationState(String currStateId)
public boolean isNoop()
public void setNoop(boolean isNoop)
isNoop
- whether or not the current replication action should be a nooppublic boolean isLazy()
public void setLazy(boolean isLazy)
isLazy
- whether or not the current replication action should be lazypublic String getValidWriteIdList()
public void setValidWriteIdList(String validWriteIdList)
validWriteIdList
- WriteIds snapshot for the current ACID/MM table being replicatedpublic boolean isTransactionalTableDump()
public String get(ReplicationSpec.KEY key)
public ReplicationSpec.SCOPE getScope()
Copyright © 2022 The Apache Software Foundation. All rights reserved.