|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.hive.ql.io.AcidUtils
public class AcidUtils
Utilities that are shared by all of the ACID input and output formats. They are used by the compactor and cleaner and thus must be format agnostic.
Nested Class Summary | |
---|---|
static interface |
AcidUtils.Directory
|
static class |
AcidUtils.ParsedDelta
|
Field Summary | |
---|---|
static String |
BASE_PREFIX
|
static Pattern |
BUCKET_DIGIT_PATTERN
|
static String |
BUCKET_DIGITS
|
static String |
BUCKET_PREFIX
|
static org.apache.hadoop.fs.PathFilter |
bucketFileFilter
|
static String |
DELTA_DIGITS
|
static String |
DELTA_PREFIX
|
static org.apache.hadoop.fs.PathFilter |
hiddenFileFilter
|
static Pattern |
LEGACY_BUCKET_DIGIT_PATTERN
|
Method Summary | |
---|---|
static org.apache.hadoop.fs.Path |
createBucketFile(org.apache.hadoop.fs.Path subdir,
int bucket)
Create the bucket filename. |
static org.apache.hadoop.fs.Path |
createFilename(org.apache.hadoop.fs.Path directory,
AcidOutputFormat.Options options)
Create a filename for a bucket file. |
static org.apache.hadoop.fs.Path[] |
deserializeDeltas(org.apache.hadoop.fs.Path root,
List<Long> deltas)
Convert the list of begin/end transaction id pairs to a list of delta directories. |
static AcidUtils.Directory |
getAcidState(org.apache.hadoop.fs.Path directory,
org.apache.hadoop.conf.Configuration conf,
ValidTxnList txnList)
Get the ACID state of the given directory. |
static org.apache.hadoop.fs.Path[] |
getPaths(List<AcidUtils.ParsedDelta> deltas)
Convert a list of deltas to a list of delta directories. |
static AcidOutputFormat.Options |
parseBaseBucketFilename(org.apache.hadoop.fs.Path bucketFile,
org.apache.hadoop.conf.Configuration conf)
Parse a bucket filename back into the options that would have created the file. |
static List<Long> |
serializeDeltas(List<AcidUtils.ParsedDelta> deltas)
Convert the list of deltas into an equivalent list of begin/end transaction id pairs. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String BASE_PREFIX
public static final String DELTA_PREFIX
public static final String BUCKET_PREFIX
public static final String BUCKET_DIGITS
public static final String DELTA_DIGITS
public static final Pattern BUCKET_DIGIT_PATTERN
public static final Pattern LEGACY_BUCKET_DIGIT_PATTERN
public static final org.apache.hadoop.fs.PathFilter hiddenFileFilter
public static final org.apache.hadoop.fs.PathFilter bucketFileFilter
Method Detail |
---|
public static org.apache.hadoop.fs.Path createBucketFile(org.apache.hadoop.fs.Path subdir, int bucket)
subdir
- the subdirectory for the bucket.bucket
- the bucket number
public static org.apache.hadoop.fs.Path createFilename(org.apache.hadoop.fs.Path directory, AcidOutputFormat.Options options)
directory
- the partition directoryoptions
- the options for writing the bucket
public static AcidOutputFormat.Options parseBaseBucketFilename(org.apache.hadoop.fs.Path bucketFile, org.apache.hadoop.conf.Configuration conf)
bucketFile
- the path to a bucket fileconf
- the configuration
public static org.apache.hadoop.fs.Path[] getPaths(List<AcidUtils.ParsedDelta> deltas)
deltas
- the list of deltas out of a Directory object.
public static List<Long> serializeDeltas(List<AcidUtils.ParsedDelta> deltas)
deltas
-
public static org.apache.hadoop.fs.Path[] deserializeDeltas(org.apache.hadoop.fs.Path root, List<Long> deltas)
root
- the root directorydeltas
- list of begin/end transaction id pairs
public static AcidUtils.Directory getAcidState(org.apache.hadoop.fs.Path directory, org.apache.hadoop.conf.Configuration conf, ValidTxnList txnList) throws IOException
directory
- the partition directory to analyzeconf
- the configurationtxnList
- the list of transactions that we are reading
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |