public final class RemoveFile extends Object implements FileAction
Users should only instantiate RemoveFile
instances using one of the various
AddFile.remove()
methods. Users should use an AddFile
instance read from the
Delta Log since AddFile
paths may be updated during
OptimisticTransaction.commit(java.lang.Iterable<T>, io.delta.standalone.Operation, java.lang.String)
.
Note that for protocol compatibility reasons, the fields partitionValues
,
size
, and tags
are only present when the extendedFileMetadata
flag is
true. New writers should generally be setting this flag, but old writers (and FSCK) won't, so
readers must check this flag before attempting to consume those values.
Constructor and Description |
---|
RemoveFile(String path,
java.util.Optional<Long> deletionTimestamp,
boolean dataChange,
boolean extendedFileMetadata,
java.util.Map<String,String> partitionValues,
java.util.Optional<Long> size,
java.util.Map<String,String> tags)
Deprecated.
RemoveFile should be created from AddFile.remove() instead. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
java.util.Optional<Long> |
getDeletionTimestamp() |
java.util.Map<String,String> |
getPartitionValues() |
String |
getPath() |
java.util.Optional<Long> |
getSize() |
java.util.Map<String,String> |
getTags() |
int |
hashCode() |
boolean |
isDataChange() |
boolean |
isExtendedFileMetadata() |
@Deprecated public RemoveFile(@Nonnull String path, @Nonnull java.util.Optional<Long> deletionTimestamp, boolean dataChange, boolean extendedFileMetadata, @Nullable java.util.Map<String,String> partitionValues, @Nonnull java.util.Optional<Long> size, @Nullable java.util.Map<String,String> tags)
RemoveFile
should be created from AddFile.remove()
instead.RemoveFile
s themselves, and should instead use one
of the various AddFile.remove()
methods to instantiate the correct RemoveFile
for a given AddFile
instance.public String getPath()
getPath
in interface FileAction
new java.net.URI(path)
when using it.public java.util.Optional<Long> getDeletionTimestamp()
public boolean isDataChange()
isDataChange
in interface FileAction
false
the records in the removed file must be contained in one or more add
actions in the same versionpublic boolean isExtendedFileMetadata()
partitionValues
, size
, and tags
are
present@Nullable public java.util.Map<String,String> getPartitionValues()
Map
from partition column to value for
this file. Partition values are stored as strings, using the following formats.
An empty string for any type translates to a null partition value.public java.util.Optional<Long> getSize()
@Nullable public java.util.Map<String,String> getTags()
Map
containing metadata about this filepublic boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object