Class CoderSizeEstimator<T>
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.bigtable.changestreams.estimator.CoderSizeEstimator<T>
-
- All Implemented Interfaces:
java.io.Serializable,SizeEstimator<T>
@Internal public class CoderSizeEstimator<T> extends java.lang.Object implements SizeEstimator<T>, java.io.Serializable
This class is used to estimate the size in bytes of a given element. It uses the givenCoderto calculate the size of the element.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CoderSizeEstimator(org.apache.beam.sdk.coders.Coder<T> coder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longsizeOf(T element)Estimates the size in bytes of the given element with the configuredCoder.
-
-
-
Constructor Detail
-
CoderSizeEstimator
public CoderSizeEstimator(org.apache.beam.sdk.coders.Coder<T> coder)
-
-
Method Detail
-
sizeOf
public long sizeOf(T element)
Estimates the size in bytes of the given element with the configuredCoder.- Specified by:
sizeOfin interfaceSizeEstimator<T>- Parameters:
element- the element instance to be estimated- Returns:
- the estimated size in bytes of the given element
-
-