@Test public void readRecordTest() throws IOException { Assert.assertNotNull(this.extractorMock.readRecord(null)); Assert.assertNull(this.extractorMock.readRecord(null)); Assert.assertEquals(1, this.extractorMock.getExpectedRecordCount()); }
@Override public PurgeableHivePartitionDataset readRecord(PurgeableHivePartitionDataset record) throws IOException { if (this.read) { return null; } this.read = true; if (this.record == null) { this.record = createPurgeableHivePartitionDataset(this.state); } return this.record; }
HivePurgerExtractor implements Extractor<PurgeableHivePartitionDatasetSchema, PurgeableHivePartitionDataset> { @Override public PurgeableHivePartitionDataset readRecord(PurgeableHivePartitionDataset record) throws IOException { if (this.read) { return null; } this.read = true; if (this.record == null) { this.record = createPurgeableHivePartitionDataset(this.state); } return this.record; } }
HivePurgerExtractor implements Extractor<PurgeableHivePartitionDatasetSchema, PurgeableHivePartitionDataset> { @Override public PurgeableHivePartitionDataset readRecord(PurgeableHivePartitionDataset record) throws IOException { if (this.read) { return null; } this.read = true; if (this.record == null) { this.record = createPurgeableHivePartitionDataset(this.state); } return this.record; } HivePurgerExtractor(WorkUnitState state); }
HivePurgerExtractor implements Extractor<PurgeableHivePartitionDatasetSchema, PurgeableHivePartitionDataset> { @Override public PurgeableHivePartitionDataset readRecord(PurgeableHivePartitionDataset record) throws IOException { if (this.read) { return null; } this.read = true; if (this.record == null) { this.record = createPurgeableHivePartitionDataset(this.state); } return this.record; } HivePurgerExtractor(WorkUnitState state); @Override PurgeableHivePartitionDatasetSchema getSchema(); @Override PurgeableHivePartitionDataset readRecord(PurgeableHivePartitionDataset record); @Override long getExpectedRecordCount(); @Override long getHighWatermark(); @Override void close(); @VisibleForTesting void setRecord(PurgeableHivePartitionDataset record); }
HivePurgerExtractor implements Extractor<PurgeableHivePartitionDatasetSchema, PurgeableHivePartitionDataset> { @Override public PurgeableHivePartitionDataset readRecord(PurgeableHivePartitionDataset record) throws IOException { if (this.read) { return null; } this.read = true; if (this.record == null) { this.record = createPurgeableHivePartitionDataset(this.state); } return this.record; } HivePurgerExtractor(WorkUnitState state); @Override PurgeableHivePartitionDatasetSchema getSchema(); @Override PurgeableHivePartitionDataset readRecord(PurgeableHivePartitionDataset record); @Override long getExpectedRecordCount(); @Override long getHighWatermark(); @Override void close(); @VisibleForTesting void setRecord(PurgeableHivePartitionDataset record);  }