Package dev.vortex.spark.write
Record Class VortexWriterCommitMessage
java.lang.Object
java.lang.Record
dev.vortex.spark.write.VortexWriterCommitMessage
- All Implemented Interfaces:
Serializable,org.apache.spark.sql.connector.write.WriterCommitMessage
public record VortexWriterCommitMessage(String filePath, long recordCount, long bytesWritten)
extends Record
implements org.apache.spark.sql.connector.write.WriterCommitMessage, Serializable
Commit message containing information about a successfully written Vortex file.
This message is passed from executors back to the driver to coordinate the commit phase of the write operation.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVortexWriterCommitMessage(String filePath, long recordCount, long bytesWritten) Creates a new commit message for a written Vortex file. -
Method Summary
Modifier and TypeMethodDescriptionlongGets the number of bytes written to the file.final booleanIndicates whether some other object is "equal to" this one.filePath()Gets the path to the written Vortex file.final inthashCode()Returns a hash code value for this object.longGets the number of records written to the file.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
VortexWriterCommitMessage
Creates a new commit message for a written Vortex file.- Parameters:
filePath- the path to the written filerecordCount- the number of records writtenbytesWritten- the number of bytes written
-
-
Method Details
-
filePath
Gets the path to the written Vortex file.- Returns:
- the file path
-
recordCount
public long recordCount()Gets the number of records written to the file.- Returns:
- the record count
-
bytesWritten
public long bytesWritten()Gets the number of bytes written to the file.- Returns:
- the byte count
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
-