public final class AcidDirectory extends Object implements AcidUtils.Directory
Constructor and Description |
---|
AcidDirectory(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.FileSystem fs,
Ref<Boolean> useFileId) |
Modifier and Type | Method and Description |
---|---|
List<org.apache.hadoop.fs.Path> |
getAbortedDirectories()
Get the list of directories that has nothing but aborted transactions.
|
Set<Long> |
getAbortedWriteIds()
Get the list of writeIds that belong to the aborted transactions.
|
AcidUtils.ParsedBase |
getBase()
Get the base directory.
|
org.apache.hadoop.fs.Path |
getBaseDirectory()
Get the base directory path.
|
List<AcidUtils.ParsedDelta> |
getCurrentDirectories()
Get the list of delta directories that are valid and not
obsolete.
|
List<AcidUtils.ParsedDelta> |
getDeleteDeltas()
Delete deltas that should be read by this reader.
|
List<AcidUtils.FileInfo> |
getFiles()
All original, base and delta bucket files that should be read by this reader
|
org.apache.hadoop.fs.FileSystem |
getFs() |
List<org.apache.hadoop.fs.Path> |
getObsolete()
Get the list of obsolete directories.
|
AcidUtils.ParsedBaseLight |
getOldestBase()
Oldest base directory in the filesystem, may be shadowed by newer base
|
List<org.apache.hadoop.fs.Path> |
getOriginalDirectories()
List of original directories containing files in not ACID format
|
List<HadoopShims.HdfsFileStatusWithId> |
getOriginalFiles()
Get the list of original files.
|
org.apache.hadoop.fs.Path |
getPath() |
boolean |
hasUncompactedAborts()
Does the directory contain writeIds that belong to aborted transactions,
but are mixed together with committed writes.
|
boolean |
isBaseInRawFormat()
Is Base directory in raw format or in Acid format
|
void |
setBase(AcidUtils.ParsedBase base) |
void |
setOldestBase(AcidUtils.ParsedBaseLight oldestBase) |
void |
setUnCompactedAborts(boolean unCompactedAborts) |
String |
toString() |
public org.apache.hadoop.fs.Path getPath()
getPath
in interface AcidUtils.Directory
public org.apache.hadoop.fs.Path getBaseDirectory()
public AcidUtils.ParsedBase getBase()
public AcidUtils.ParsedBaseLight getOldestBase()
public void setBase(AcidUtils.ParsedBase base)
public void setOldestBase(AcidUtils.ParsedBaseLight oldestBase)
public void setUnCompactedAborts(boolean unCompactedAborts)
public boolean isBaseInRawFormat()
public List<HadoopShims.HdfsFileStatusWithId> getOriginalFiles()
null
. Must be sorted.public List<org.apache.hadoop.fs.Path> getOriginalDirectories()
public List<AcidUtils.ParsedDelta> getCurrentDirectories()
null
. List must be sorted in a specific way.
See AcidUtils.ParsedDeltaLight.compareTo(org.apache.hadoop.hive.ql.io.AcidUtils.ParsedDeltaLight)
for details.public List<org.apache.hadoop.fs.Path> getObsolete()
null
.public List<org.apache.hadoop.fs.Path> getAbortedDirectories()
public Set<Long> getAbortedWriteIds()
public boolean hasUncompactedAborts()
public org.apache.hadoop.fs.FileSystem getFs()
getFs
in interface AcidUtils.Directory
public List<AcidUtils.ParsedDelta> getDeleteDeltas()
getDeleteDeltas
in interface AcidUtils.Directory
public List<AcidUtils.FileInfo> getFiles() throws IOException
getFiles
in interface AcidUtils.Directory
IOException
- exCopyright © 2023 The Apache Software Foundation. All rights reserved.