Package org.apache.beam.sdk.io.iceberg
Class SerializableDataFile
java.lang.Object
org.apache.beam.sdk.io.iceberg.SerializableDataFile
Serializable version of an Iceberg
DataFile.
DataFile is not serializable and the Iceberg API doesn't offer an easy way to
encode/decode it. This class is an identical version that can be used as a PCollection element
type.
NOTE: If you add any new fields here, you need to also update the equals(java.lang.Object) and hashCode() methods.
Use from(DataFile, String) to create a SerializableDataFile and createDataFile(Map) to reconstruct the original DataFile.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SerializableDataFile.Builderbuilder()org.apache.iceberg.DataFilecreateDataFile(Map<Integer, org.apache.iceberg.PartitionSpec> partitionSpecs) Reconstructs the originalDataFilefrom thisSerializableDataFile.final booleanstatic SerializableDataFilestatic SerializableDataFileabstract longabstract Stringabstract StringgetPath()final inthashCode()
-
Constructor Details
-
SerializableDataFile
public SerializableDataFile()
-
-
Method Details
-
builder
-
getPath
-
getFileSizeInBytes
-
getPartitionPath
-
getLowerBounds
-
getUpperBounds
-
getDataSequenceNumber
-
getFileSequenceNumber
-
getFirstRowId
-
from
-
from
public static SerializableDataFile from(org.apache.iceberg.DataFile f, String partitionPath, boolean includeMetrics) -
createDataFile
public org.apache.iceberg.DataFile createDataFile(Map<Integer, org.apache.iceberg.PartitionSpec> partitionSpecs) Reconstructs the originalDataFilefrom thisSerializableDataFile.We require an input
PartitionSpecas well because there's no easy way to reconstruct it from Beam-compatible types. -
equals
-
hashCode
public final int hashCode()
-