public static final class AcidUtils.OrcAcidVersion extends Object
ACID_FORMAT file is written to each
base/delta/delete_delta dir written by a full acid write or compaction. This is the primary
mechanism for versioning acid data.
Each individual ORC file written stores the current version as a user property in ORC footer.
All data files produced by Acid write should have this (starting with Hive 3.0), including
those written by compactor. This is more for sanity checking in case someone moved the files
around or something like that.
Methods for getting/reading the version from files were moved to test class TestTxnCommands
which is the only place they are used, in order to keep devs out of temptation, since they
access the FileSystem which is expensive.| Modifier and Type | Field and Description |
|---|---|
static String |
ACID_FORMAT |
static String |
ACID_VERSION_KEY |
static int |
ORC_ACID_VERSION
2 is the version of Acid released in Hive 3.0.
|
| Constructor and Description |
|---|
OrcAcidVersion() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.hadoop.fs.Path |
getVersionFilePath(org.apache.hadoop.fs.Path deltaOrBase) |
static void |
setAcidVersionInDataFile(Writer writer)
Include current acid version in file footer.
|
static void |
writeVersionFile(org.apache.hadoop.fs.Path deltaOrBaseDir,
org.apache.hadoop.fs.FileSystem fs)
This creates a version file in
deltaOrBaseDir |
public static final String ACID_VERSION_KEY
public static final String ACID_FORMAT
public static final int ORC_ACID_VERSION
public static void setAcidVersionInDataFile(Writer writer)
writer - - file writtenpublic static void writeVersionFile(org.apache.hadoop.fs.Path deltaOrBaseDir,
org.apache.hadoop.fs.FileSystem fs)
throws IOException
deltaOrBaseDirdeltaOrBaseDir - - where to create the version fileIOExceptionpublic static org.apache.hadoop.fs.Path getVersionFilePath(org.apache.hadoop.fs.Path deltaOrBase)
Copyright © 2024 The Apache Software Foundation. All rights reserved.