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 isReplace) |
ReplicationSpec(com.google.common.base.Function<String,String> keyFetcher) |
ReplicationSpec(String fromId,
String toId) |
Modifier and Type | Method and Description |
---|---|
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)
|
static void |
copyLastReplId(Map<String,String> srcParameter,
Map<String,String> destParameter) |
String |
get(ReplicationSpec.KEY key) |
String |
getCurrentReplicationState() |
static String |
getLastReplicatedStateFromParameters(Map<String,String> m) |
String |
getReplicationState() |
ReplicationSpec.Type |
getReplSpecType() |
ReplicationSpec.SCOPE |
getScope() |
static String |
getTargetLastReplicatedStateFromParameters(Map<String,String> m) |
String |
getValidTxnList() |
String |
getValidWriteIdList() |
static boolean |
isApplicable(ASTNode node)
Tests if an ASTNode is a Replication Specification
|
boolean |
isForceOverwrite() |
boolean |
isInReplicationScope() |
boolean |
isMetadataOnly() |
boolean |
isMetadataOnlyForExternalTables() |
boolean |
isNoop() |
boolean |
isRepl() |
boolean |
isReplace() |
boolean |
isTransactionalTableDump() |
boolean |
needDupCopyCheck() |
void |
setCurrentReplicationState(String currStateId) |
void |
setForceOverwrite(boolean forceOverwrite) |
void |
setInReplicationScope(boolean inReplicationScope) |
void |
setIsMetadataOnly(boolean isMetadataOnly) |
void |
setIsReplace(boolean isReplace) |
void |
setMetadataOnlyForExternalTables(boolean metadataOnlyForExternalTables) |
void |
setNeedDupCopyCheck(boolean isFirstIncPending) |
void |
setNoop(boolean isNoop) |
void |
setRepl(boolean repl) |
void |
setReplSpecType(ReplicationSpec.Type specType) |
void |
setValidTxnList(String validTxnList) |
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 isReplace)
public void setInReplicationScope(boolean inReplicationScope)
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 static String getLastReplicatedStateFromParameters(Map<String,String> m)
public static String getTargetLastReplicatedStateFromParameters(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 isMetadataOnlyForExternalTables()
public void setMetadataOnlyForExternalTables(boolean metadataOnlyForExternalTables)
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 String getValidWriteIdList()
public void setValidWriteIdList(String validWriteIdList)
validWriteIdList
- WriteIds snapshot for the current ACID/MM table being replicatedpublic String getValidTxnList()
public void setValidTxnList(String validTxnList)
public boolean isTransactionalTableDump()
public String get(ReplicationSpec.KEY key)
public ReplicationSpec.SCOPE getScope()
public static void copyLastReplId(Map<String,String> srcParameter, Map<String,String> destParameter)
public boolean needDupCopyCheck()
public void setNeedDupCopyCheck(boolean isFirstIncPending)
public boolean isRepl()
public void setRepl(boolean repl)
public boolean isForceOverwrite()
public void setForceOverwrite(boolean forceOverwrite)
Copyright © 2022 The Apache Software Foundation. All rights reserved.