DataSamplingBridge { public Object[] getRecord() throws DQException { Object[] records = null; switch (samplingOption) { case TopN: records = dataSource.getRecord(); break; case Percentage: break; case Reservoir: if (reservoirSampler == null) { throw new DQException("DataSamplingBridge is not initialized"); } records = reservoirSamplingData.get(recordCursor); break; default: break; } recordCursor++; return records; } DataSamplingBridge(SamplingDataSource<?> ds); void setSampleSize(int size); void setSamplingOption(SamplingOption option); SamplingOption getSamplingOption(); boolean hasNext(); boolean prepareData(long randomSeed); void prepareData(String[] columnHeaders); void setRandomSeed(long randomSeed); Object[] getRecord(); boolean finalizeDataSampling(); boolean isStopRequested(); void setStopRequested(boolean stopRequested); long getDataSourceCursor(); static final long RANDOM_SEED; }
@Test public void testGetRecord() throws Exception { }