@Test public void testCreatesRecordReader() throws IOException { verify(mockOutputFormat).getRecordUpdater(eq(PATH), captureOptions.capture()); Options options = captureOptions.getValue(); assertThat(options.getBucketId(), is(BUCKET_ID)); assertThat(options.getConfiguration(), is((Configuration) configuration)); assertThat(options.getInspector(), is(mockObjectInspector)); assertThat(options.getRecordIdColumn(), is(RECORD_ID_COLUMN)); assertThat(options.getMinimumWriteId(), is(WRITE_ID)); assertThat(options.getMaximumWriteId(), is(WRITE_ID)); }
rowInspector = (StructObjectInspector)options.getInspector(); writerOptions.inspector(createEventSchema(findRecId(options.getInspector(), options.getRecordIdColumn()))); item = new OrcStruct(FIELDS);
public static String getOptionsValue(Options options) { StringBuilder content = new StringBuilder(); int bucket = getBucket(options); String inspectorInfo = options.getInspector().getCategory() + ":" + options.getInspector() .getTypeName(); long maxTxnId = options.getMaximumWriteId(); long minTxnId = options.getMinimumWriteId(); int recordIdColumn = options.getRecordIdColumn(); boolean isCompresses = options.isCompressed(); boolean isWritingBase = options.isWritingBase(); content.append("bucket : ").append(bucket).append(", inspectorInfo : ").append (inspectorInfo).append(", minTxnId : ").append(minTxnId).append(", maxTxnId : ") .append(maxTxnId).append(", recordIdColumn : ").append(recordIdColumn); content.append(", isCompressed : ").append(isCompresses).append(", isWritingBase : ") .append(isWritingBase); return content.toString(); }
writerOptions.stripeSize(DELTA_STRIPE_SIZE); rowInspector = (StructObjectInspector)options.getInspector(); writerOptions.inspector(createEventSchema(findRecId(options.getInspector(), options.getRecordIdColumn()))); this.writer = OrcFile.createWriter(this.path, writerOptions);
opts.inspector(options.getInspector()) .callback(watcher); final Writer writer = OrcFile.createWriter(filename, opts);
private DummyOrcRecordUpdater(Path path, Options options) { this.path = path; this.inspector = options.getInspector(); this.out = options.getDummyStream(); }
this.objInspector = options.getInspector(); try { phoenixSerializer = new PhoenixSerializer(config, options.getTableProperties());
public PhoenixRecordWriter(Path path, AcidOutputFormat.Options options) throws IOException { Configuration config = options.getConfiguration(); Properties props = new Properties(); try { initialize(config, props); } catch (SQLException e) { throw new IOException(e); } this.objInspector = options.getInspector(); try { phoenixSerializer = new PhoenixSerializer(config, options.getTableProperties()); } catch (SerDeException e) { throw new IOException(e); } }
this.deleteWriterOptions.inspector(createEventObjectInspector(findRecId(options.getInspector(), options.getRecordIdColumn()))); this.deleteWriterOptions.setSchema(createEventSchemaFromTableProperties(options.getTableProperties())); writerOptions.fileSystem(fs).callback(indexBuilder); rowInspector = (StructObjectInspector)options.getInspector(); writerOptions.inspector(createEventObjectInspector(findRecId(options.getInspector(), options.getRecordIdColumn()))); writerOptions.setSchema(createEventSchemaFromTableProperties(options.getTableProperties()));
opts.inspector(options.getInspector()) .callback(watcher); final Writer writer = OrcFile.createWriter(filename, opts);
opts.inspector(options.getInspector()) .callback(watcher); final Writer writer = OrcFile.createWriter(filename, opts);
private DummyOrcRecordUpdater(Path path, Options options) { this.path = path; this.inspector = options.getInspector(); this.out = options.getDummyStream(); }
private DummyOrcRecordUpdater(Path path, Options options) { this.path = path; this.inspector = options.getInspector(); this.out = options.getDummyStream(); }