(child.getFileStatus().getPath(), context.conf); opts.writingBase(true); int b = opts.getBucket();
public ColumnizedDeleteEventRegistry(JobConf conf, OrcSplit orcSplit, Reader.Options readerOptions) throws IOException, DeleteEventsOverflowMemoryException { int bucket = AcidUtils.parseBaseOrDeltaBucketFilename(orcSplit.getPath(), conf).getBucket(); String txnString = conf.get(ValidTxnList.VALID_TXNS_KEY); this.validTxnList = (txnString == null) ? new ValidReadTxnList() : new ValidReadTxnList(txnString);
if (options.getOldStyle()) { return new Path(directory, String.format(LEGACY_FILE_BUCKET_DIGITS, options.getBucket()) + "_0"); } else if (options.isWritingBase()) { subdir = BASE_PREFIX + String.format(DELTA_DIGITS, options.getStatementId()); return createBucketFile(new Path(directory, subdir), options.getBucket());
if (split.hasBase()) { bucket = AcidUtils.parseBaseBucketFilename(split.getPath(), conf) .getBucket(); reader = OrcFile.createReader(path, OrcFile.readerOptions(conf)); final List<OrcProto.Type> types = reader.getTypes();
AcidOutputFormat.Options opts = AcidUtils.parseBaseBucketFilename (child.getPath(), context.conf); int b = opts.getBucket();
OrcRecordUpdater(Path path, AcidOutputFormat.Options options) throws IOException { this.options = options; this.bucket.set(options.getBucket()); this.path = AcidUtils.createFilename(path, options); FileSystem fs = options.getFilesystem();
bucket = AcidUtils.parseBaseBucketFilename(orcSplit.getPath(), conf).getBucket(); } else { root = path;
/** * Create a filename for a bucket file. * @param directory the partition directory * @param options the options for writing the bucket * @return the filename that should store the bucket */ public static Path createFilename(Path directory, AcidOutputFormat.Options options) { String subdir; if (options.getOldStyle()) { return new Path(directory, String.format(BUCKET_DIGITS, options.getBucket()) + "_0"); } else if (options.isWritingBase()) { subdir = BASE_PREFIX + String.format(DELTA_DIGITS, options.getMaximumTransactionId()); } else { subdir = deltaSubdir(options.getMinimumTransactionId(), options.getMaximumTransactionId()); } return createBucketFile(new Path(directory, subdir), options.getBucket()); }
AcidUtils.getAcidOperationalProperties(options.getConfiguration()); this.bucket.set(options.getBucket()); this.path = AcidUtils.createFilename(path, options); this.deleteEventWriter = null;
public SortMergedDeleteEventRegistry(JobConf conf, OrcSplit orcSplit, Reader.Options readerOptions) throws IOException { final Path[] deleteDeltas = getDeleteDeltaDirsFromSplit(orcSplit); if (deleteDeltas.length > 0) { int bucket = AcidUtils.parseBaseOrDeltaBucketFilename(orcSplit.getPath(), conf).getBucket(); String txnString = conf.get(ValidTxnList.VALID_TXNS_KEY); this.validTxnList = (txnString == null) ? new ValidReadTxnList() : new ValidReadTxnList(txnString); this.deleteRecords = new OrcRawRecordMerger(conf, true, null, false, bucket, validTxnList, readerOptions, deleteDeltas); this.deleteRecordKey = new OrcRawRecordMerger.ReaderKey(); this.deleteRecordValue = this.deleteRecords.createValue(); // Initialize the first value in the delete reader. this.isDeleteRecordAvailable = this.deleteRecords.next(deleteRecordKey, deleteRecordValue); } else { this.isDeleteRecordAvailable = false; this.deleteRecordKey = null; this.deleteRecordValue = null; this.deleteRecords = null; } }
static int getBucketForSplit(Configuration conf, OrcSplit orcSplit) { if (orcSplit.hasBase()) { return AcidUtils.parseBaseOrDeltaBucketFilename(orcSplit.getPath(), conf).getBucket(); } else { return (int) orcSplit.getStart(); } }