static int encodeBucketId(Configuration conf, int bucketId, int statementId) { return BucketCodec.V1.encode(new AcidOutputFormat.Options(conf).bucket(bucketId) .statementId(statementId)); } /**
@Override public Object attachBucketIdToRecord(Object record) { int bucketId = computeBucketId(record); int bucketProperty = BucketCodec.V1.encode(new AcidOutputFormat.Options(null).bucket(bucketId)); RecordIdentifier recordIdentifier = new RecordIdentifier(INVALID_TRANSACTION_ID, bucketProperty, INVALID_ROW_ID); structObjectInspector.setStructFieldData(record, recordIdentifierField, recordIdentifier); return record; }
private static int encodeBucket(int bucketId) { return BucketCodec.V1.encode( new AcidOutputFormat.Options(null).bucket(bucketId)); }
DummyRow(long val, long rowId, long origTxn, int bucket) { field = new LongWritable(val); bucket = BucketCodec.V1.encode(new AcidOutputFormat.Options(null).bucket(bucket)); ROW__ID = new RecordIdentifier(origTxn, bucket, rowId); }
BigRow(byte[] val, long rowId, long origTxn, int bucket) { field = new BytesWritable(val); bucket = BucketCodec.V1.encode(new AcidOutputFormat.Options(null).bucket(bucket)); this.rowId = new RecordIdentifier(origTxn, bucket, rowId); }
@Test public void testAttachBucketIdToRecord() { MutableRecord record = new MutableRecord(1, "hello"); capturingBucketIdResolver.attachBucketIdToRecord(record); assertThat(record.rowId, is(new RecordIdentifier(-1L, BucketCodec.V1.encode(new AcidOutputFormat.Options(null).bucket(1)), -1L))); assertThat(record.id, is(1)); assertThat(record.msg.toString(), is("hello")); }
OrcRawRecordMerger.TransactionMetaData.findWriteIDForSynthetcRowIDs(file.getPath(), rootDir, conf); int bucketId = AcidUtils.parseBucketId(file.getPath()); int bucketProperty = BucketCodec.V1.encode(new AcidOutputFormat.Options(conf)
((LongColumnVector) batch.cols[2]).vector[0] = BucketCodec.V1.encode(new AcidOutputFormat .Options(conf).bucket(0).statementId(0)); ((LongColumnVector) batch.cols[2]).vector[0] = BucketCodec.V1.encode(new AcidOutputFormat .Options(conf).bucket(0).statementId(idx + 1)); for(long row_id : ((LongColumnVector) batch.cols[3]).vector) {
int bucketProperty = BucketCodec.V1.encode(options);
.finalDestination(root); int bucketProperty = BucketCodec.V1.encode(options);
.finalDestination(root); final int BUCKET_PROPERTY = BucketCodec.V1.encode(options);
.finalDestination(root); int bucketProperty = BucketCodec.V1.encode(options);
.bucket(BUCKET).inspector(inspector).filesystem(fs); final int BUCKET_PROPERTY = BucketCodec.V1.encode(options);
.finalDestination(root); int bucketProperty = BucketCodec.V1.encode(options);
this.bucket.set(bucketCodec.encode(options)); this.path = AcidUtils.createFilename(partitionRoot, options); this.deleteEventWriter = null;
.finalDestination(root); int bucketProperty = BucketCodec.V1.encode(options);
final int BUCKET_PROPERTY = BucketCodec.V1.encode(options); if(!use130Format) { options.statementId(-1);