public class DeltaContext extends Object implements DeltaSourceContext, DeltaTargetContext
| Modifier and Type | Method and Description |
|---|---|
void |
commitOffset(Offset offset,
long sequenceNumber) |
void |
dropTableState(String database,
String table) |
String |
getApplicationName() |
int |
getInstanceId() |
int |
getMaxRetrySeconds() |
io.cdap.cdap.api.metrics.Metrics |
getMetrics() |
io.cdap.cdap.api.plugin.PluginProperties |
getPluginProperties(String pluginId) |
io.cdap.cdap.api.plugin.PluginProperties |
getPluginProperties(String pluginId,
io.cdap.cdap.api.macro.MacroEvaluator evaluator) |
String |
getRunId() |
Map<String,String> |
getRuntimeArguments() |
byte[] |
getState(String key) |
void |
incrementCount(DDLOperation op) |
void |
incrementCount(DMLOperation op) |
<T> Class<T> |
loadPluginClass(String pluginId) |
<T> T |
newPluginInstance(String pluginId) |
<T> T |
newPluginInstance(String pluginId,
io.cdap.cdap.api.macro.MacroEvaluator evaluator) |
void |
notifyFailed(Throwable cause) |
void |
putState(String key,
byte[] val) |
void |
setError(ReplicationError error) |
void |
setOK() |
void |
setTableError(String database,
String table,
ReplicationError error) |
void |
setTableReplicating(String database,
String table) |
void |
setTableSnapshotting(String database,
String table) |
public void incrementCount(DMLOperation op)
incrementCount in interface DeltaTargetContextpublic void incrementCount(DDLOperation op)
incrementCount in interface DeltaTargetContextpublic void commitOffset(Offset offset, long sequenceNumber) throws IOException
commitOffset in interface DeltaTargetContextIOExceptionpublic void setTableError(String database, String table, ReplicationError error) throws IOException
setTableError in interface DeltaTargetContextIOExceptionpublic void setTableReplicating(String database, String table) throws IOException
setTableReplicating in interface DeltaTargetContextIOExceptionpublic void setTableSnapshotting(String database, String table) throws IOException
setTableSnapshotting in interface DeltaTargetContextIOExceptionpublic void dropTableState(String database, String table) throws IOException
dropTableState in interface DeltaTargetContextIOExceptionpublic String getApplicationName()
getApplicationName in interface DeltaRuntimeContextpublic String getRunId()
getRunId in interface DeltaRuntimeContextpublic io.cdap.cdap.api.metrics.Metrics getMetrics()
getMetrics in interface DeltaRuntimeContextpublic Map<String,String> getRuntimeArguments()
getRuntimeArguments in interface DeltaRuntimeContextpublic int getInstanceId()
getInstanceId in interface DeltaRuntimeContextpublic int getMaxRetrySeconds()
getMaxRetrySeconds in interface DeltaRuntimeContext@Nullable public byte[] getState(String key) throws IOException
getState in interface DeltaRuntimeContextIOExceptionpublic void putState(String key, byte[] val) throws IOException
putState in interface DeltaRuntimeContextIOExceptionpublic io.cdap.cdap.api.plugin.PluginProperties getPluginProperties(String pluginId)
getPluginProperties in interface io.cdap.cdap.api.plugin.PluginContextpublic io.cdap.cdap.api.plugin.PluginProperties getPluginProperties(String pluginId, io.cdap.cdap.api.macro.MacroEvaluator evaluator) throws io.cdap.cdap.api.macro.InvalidMacroException
getPluginProperties in interface io.cdap.cdap.api.plugin.PluginContextio.cdap.cdap.api.macro.InvalidMacroExceptionpublic <T> Class<T> loadPluginClass(String pluginId)
loadPluginClass in interface io.cdap.cdap.api.plugin.PluginContextpublic <T> T newPluginInstance(String pluginId) throws InstantiationException
newPluginInstance in interface io.cdap.cdap.api.plugin.PluginContextInstantiationExceptionpublic <T> T newPluginInstance(String pluginId, io.cdap.cdap.api.macro.MacroEvaluator evaluator) throws InstantiationException, io.cdap.cdap.api.macro.InvalidMacroException
newPluginInstance in interface io.cdap.cdap.api.plugin.PluginContextInstantiationExceptionio.cdap.cdap.api.macro.InvalidMacroExceptionpublic void setError(ReplicationError error) throws IOException
setError in interface DeltaSourceContextIOExceptionpublic void setOK()
throws IOException
setOK in interface DeltaSourceContextIOExceptionpublic void notifyFailed(Throwable cause)
notifyFailed in interface FailureNotifierCopyright © 2020 CDAP Licensed under the Apache License, Version 2.0.