@Test public void testSkippedKey3() throws Exception { SortedGroupedMergedInput input = new SortedGroupedMergedInput(); SortedTestKeyValuesReader kvsReader1 = new SortedTestKeyValuesReader(new int[] { 1, 2, 3, 4 }, new int[][] { { 1, 1 }, { 2, 2 }, { 3, 3 }, {4, 4} }); SortedTestKeyValuesReader kvsReader2 = new SortedTestKeyValuesReader(new int[] { 1, 2, 3, 4 }, new int[][] { { 1, 1 }, { 2, 2 }, { 3, 3 }, {4, 4} }); SortedTestKeyValuesReader kvsReader3 = new SortedTestKeyValuesReader(new int[] { 1, 2, 3, 4 }, new int[][] { { 1, 1 }, { 2, 2 }, { 3, 3 }, {4, 4} }); SortedTestInput sInput1 = new SortedTestInput(kvsReader1); SortedTestInput sInput2 = new SortedTestInput(kvsReader2); SortedTestInput sInput3 = new SortedTestInput(kvsReader3); List<Input> sInputs = new LinkedList<Input>(); sInputs.add(sInput1); sInputs.add(sInput2); sInputs.add(sInput3); input.initialize(sInputs); KeyValuesReader kvsReader = input.getReader(); int keyCount = 0; while (kvsReader.next()) { keyCount++; if (keyCount == 2 || keyCount == 3) { continue; } Integer key = (Integer) kvsReader.getCurrentKey(); assertEquals(Integer.valueOf(keyCount), key); Iterator<Object> valuesIter = kvsReader.getCurrentValues().iterator(); int valCount = 0; while (valuesIter.hasNext()) { valCount++; Integer val = (Integer) valuesIter.next(); assertEquals(Integer.valueOf(keyCount), val); if (keyCount == 1 && valCount == 6) { break; } } assertEquals(6, valCount); } }
@Override public KeyValuesReader getReader() throws Exception { return new SortedGroupedMergedKeyValuesReader(getInputs()); }
SortedGroupedMergedInput extends MergedLogicalInput { @Override public KeyValuesReader getReader() throws Exception { return new SortedGroupedMergedKeyValuesReader(getInputs()); } }
SortedGroupedMergedInput extends MergedLogicalInput { @Override public KeyValuesReader getReader() throws Exception { return new SortedGroupedMergedKeyValuesReader(getInputs()); }  }
SortedGroupedMergedInput extends MergedLogicalInput { @Override public KeyValuesReader getReader() throws Exception { return new SortedGroupedMergedKeyValuesReader(getInputs()); }  @Override KeyValuesReader getReader(); @Override void setConstituentInputIsReady(Input input); }
SortedGroupedMergedInput extends MergedLogicalInput { @Override public KeyValuesReader getReader() throws Exception { return new SortedGroupedMergedKeyValuesReader(getInputs()); }  @Override KeyValuesReader getReader(); @Override void setConstituentInputIsReady(Input input);  }