public class AcidUtils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
AcidUtils.Directory |
static class |
AcidUtils.Operation |
static class |
AcidUtils.ParsedDelta |
Modifier and Type | Field and Description |
---|---|
static String |
BASE_PREFIX |
static org.apache.hadoop.fs.PathFilter |
baseFileFilter |
static Pattern |
BUCKET_DIGIT_PATTERN |
static String |
BUCKET_DIGITS |
static String |
BUCKET_PREFIX |
static org.apache.hadoop.fs.PathFilter |
bucketFileFilter |
static String |
CONF_ACID_KEY |
static String |
DELTA_DIGITS |
static String |
DELTA_PREFIX |
static String |
DELTA_SIDE_FILE_SUFFIX |
static org.apache.hadoop.fs.PathFilter |
deltaFileFilter |
static org.apache.hadoop.fs.PathFilter |
hiddenFileFilter |
static Pattern |
LEGACY_BUCKET_DIGIT_PATTERN |
static org.apache.hadoop.fs.PathFilter |
originalBucketFilter |
Modifier and Type | Method and Description |
---|---|
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 boolean |
isAcid(org.apache.hadoop.fs.Path directory,
org.apache.hadoop.conf.Configuration conf)
Is the given directory in ACID format?
|
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.
|
public static final String CONF_ACID_KEY
public static final String BASE_PREFIX
public static final org.apache.hadoop.fs.PathFilter baseFileFilter
public static final String DELTA_PREFIX
public static final String DELTA_SIDE_FILE_SUFFIX
public static final org.apache.hadoop.fs.PathFilter deltaFileFilter
public static final String BUCKET_PREFIX
public static final org.apache.hadoop.fs.PathFilter bucketFileFilter
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 originalBucketFilter
public static final org.apache.hadoop.fs.PathFilter hiddenFileFilter
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 numberpublic 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 bucketpublic static AcidOutputFormat.Options parseBaseBucketFilename(org.apache.hadoop.fs.Path bucketFile, org.apache.hadoop.conf.Configuration conf)
bucketFile
- the path to a bucket fileconf
- the configurationpublic 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 pairspublic static boolean isAcid(org.apache.hadoop.fs.Path directory, org.apache.hadoop.conf.Configuration conf) throws IOException
directory
- the partition directory to checkconf
- the query configurationIOException
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 readingIOException
Copyright © 2017 The Apache Software Foundation. All rights reserved.