public final class AddFile extends Object implements FileAction
Note: since actions within a given Delta file are not guaranteed to be applied in order, it is not valid for multiple file operations with the same path to exist in a single version.
Modifier and Type | Class and Description |
---|---|
static class |
AddFile.Builder
Builder class for
AddFile . |
Constructor and Description |
---|
AddFile(String path,
java.util.Map<String,String> partitionValues,
long size,
long modificationTime,
boolean dataChange,
String stats,
java.util.Map<String,String> tags) |
Modifier and Type | Method and Description |
---|---|
static AddFile.Builder |
builder(String path,
java.util.Map<String,String> partitionValues,
long size,
long modificationTime,
boolean dataChange) |
boolean |
equals(Object o) |
long |
getModificationTime() |
java.util.Map<String,String> |
getPartitionValues() |
String |
getPath() |
long |
getSize() |
String |
getStats() |
java.util.Map<String,String> |
getTags() |
int |
hashCode() |
boolean |
isDataChange() |
RemoveFile |
remove() |
RemoveFile |
remove(boolean dataChange) |
RemoveFile |
remove(long deletionTimestamp) |
RemoveFile |
remove(long deletionTimestamp,
boolean dataChange) |
public AddFile(@Nonnull String path, @Nonnull java.util.Map<String,String> partitionValues, long size, long modificationTime, boolean dataChange, @Nullable String stats, @Nullable java.util.Map<String,String> tags)
@Nonnull public RemoveFile remove()
RemoveFile
for this file, instantiated with
deletionTimestamp =
System.currentTimeMillis()
@Nonnull public RemoveFile remove(long deletionTimestamp)
RemoveFile
for this file, instantiated with the given
deletionTimestamp
@Nonnull public RemoveFile remove(boolean dataChange)
RemoveFile
for this file, instantiated with the given
dataChange
flag@Nonnull public RemoveFile remove(long deletionTimestamp, boolean dataChange)
RemoveFile
for this file, instantiated with the given
deletionTimestamp
value and dataChange
flag@Nonnull public String getPath()
getPath
in interface FileAction
new java.net.URI(path)
when using it.@Nonnull 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 long getSize()
public long getModificationTime()
public boolean isDataChange()
isDataChange
in interface FileAction
false
the file must already be present in the table or the records in the
added file must be contained in one or more remove actions in the same version@Nullable public String getStats()
@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
public static AddFile.Builder builder(String path, java.util.Map<String,String> partitionValues, long size, long modificationTime, boolean dataChange)
AddFile.Builder