@Test public void testCloneRecord() throws Exception { CloneRecord.Config config = new CloneRecord.Config(5); Transform<StructuredRecord, StructuredRecord> transform = new CloneRecord(config); transform.initialize(null); MockEmitter<StructuredRecord> emitter = new MockEmitter<>(); transform.transform(StructuredRecord.builder(INPUT) .set("a", "1") .set("b", "2") .set("c", "3") .set("d", "4") .set("e", "5").build(), emitter); Assert.assertEquals(5, emitter.getEmitted().size()); }
public CloneRecord(Config config) { this.config = config; }
CloneRecord extends Transform<StructuredRecord, StructuredRecord> { public CloneRecord(Config config) { this.config = config; } }
CloneRecord extends Transform<StructuredRecord, StructuredRecord> { public CloneRecord(Config config) { this.config = config; } CloneRecord(Config config); }
CloneRecord extends Transform<StructuredRecord, StructuredRecord> { public CloneRecord(Config config) { this.config = config; } CloneRecord(Config config); @Override void configurePipeline(PipelineConfigurer pipelineConfigurer); @Override void prepareRun(StageSubmitterContext context); @Override void initialize(TransformContext context); @Override void transform(StructuredRecord in, Emitter<StructuredRecord> emitter); }
CloneRecord extends Transform<StructuredRecord, StructuredRecord> { public CloneRecord(Config config) { this.config = config; } CloneRecord(Config config); @Override void configurePipeline(PipelineConfigurer pipelineConfigurer); @Override void prepareRun(StageSubmitterContext context); @Override void initialize(TransformContext context); @Override void transform(StructuredRecord in, Emitter<StructuredRecord> emitter);  }