com.google.cloud.bigtable.beam
Class AbstractCloudBigtableTableDoFn<In,Out>
- java.lang.Object
-
- org.apache.beam.sdk.transforms.DoFn<In,Out>
-
- com.google.cloud.bigtable.beam.AbstractCloudBigtableTableDoFn<In,Out>
-
- Type Parameters:
In
- the type of the (main) input elementsOut
- the type of the (main) output elements
- All Implemented Interfaces:
- Serializable, HasDisplayData
- Direct Known Subclasses:
- CloudBigtableIO.CloudBigtableMultiTableWriteFn, CloudBigtableIO.CloudBigtableSingleTableBufferedWriteFn
public abstract class AbstractCloudBigtableTableDoFn<In,Out> extends DoFn<In,Out>
This class can be used as a superclass forDoFn
s that require aConnection
in Dataflow.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.beam.sdk.transforms.DoFn
DoFn.BoundedPerElement, DoFn.BundleFinalizer, DoFn.Element, DoFn.FieldAccess, DoFn.FinishBundle, DoFn.FinishBundleContext, DoFn.GetInitialRestriction, DoFn.GetRestrictionCoder, DoFn.MultiOutputReceiver, DoFn.NewTracker, DoFn.OnTimer, DoFn.OnTimerContext, DoFn.OnWindowExpiration, DoFn.OutputReceiver<T>, DoFn.ProcessContext, DoFn.ProcessContinuation, DoFn.ProcessElement, DoFn.RequiresStableInput, DoFn.Setup, DoFn.SplitRestriction, DoFn.StartBundle, DoFn.StartBundleContext, DoFn.StateId, DoFn.Teardown, DoFn.TimerId, DoFn.Timestamp, DoFn.UnboundedPerElement, DoFn.WindowedContext
-
-
Field Summary
Fields Modifier and Type Field and Description protected CloudBigtableConfiguration
config
protected Connection
connection
protected org.slf4j.Logger
DOFN_LOG
-
Constructor Summary
Constructors Constructor and Description AbstractCloudBigtableTableDoFn(CloudBigtableConfiguration config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description CloudBigtableConfiguration
getConfig()
protected Connection
getConnection()
protected void
logExceptions(Object context, RetriesExhaustedWithDetailsException exception)
Logs a context and the exception'sRetriesExhaustedWithDetailsException.getExhaustiveDescription()
.static void
logRetriesExhaustedWithDetailsException(org.slf4j.Logger log, String context, RetriesExhaustedWithDetailsException exception)
void
populateDisplayData(DisplayData.Builder builder)
protected static void
rethrowException(RetriesExhaustedWithDetailsException exception)
-
Methods inherited from class org.apache.beam.sdk.transforms.DoFn
getAllowedTimestampSkew, getInputTypeDescriptor, getOutputTypeDescriptor, prepareForProcessing
-
-
-
-
Field Detail
-
DOFN_LOG
protected final org.slf4j.Logger DOFN_LOG
-
config
protected final CloudBigtableConfiguration config
-
connection
protected Connection connection
-
-
Constructor Detail
-
AbstractCloudBigtableTableDoFn
public AbstractCloudBigtableTableDoFn(CloudBigtableConfiguration config)
-
-
Method Detail
-
logRetriesExhaustedWithDetailsException
public static void logRetriesExhaustedWithDetailsException(org.slf4j.Logger log, String context, RetriesExhaustedWithDetailsException exception)
-
rethrowException
protected static void rethrowException(RetriesExhaustedWithDetailsException exception) throws Exception
- Throws:
Exception
-
getConnection
protected Connection getConnection()
-
logExceptions
protected void logExceptions(Object context, RetriesExhaustedWithDetailsException exception)
Logs a context and the exception'sRetriesExhaustedWithDetailsException.getExhaustiveDescription()
.
-
populateDisplayData
public void populateDisplayData(DisplayData.Builder builder)
- Specified by:
populateDisplayData
in interfaceHasDisplayData
- Overrides:
populateDisplayData
in classDoFn<In,Out>
-
getConfig
public CloudBigtableConfiguration getConfig()
-
-