Skip to content

Commit

Permalink
Strengthen assertion to check partitioning
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed May 10, 2015
1 parent 01afc74 commit 8f5061a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ private List<Tuple2<Object, Object>> readRecordsFromFile() throws IOException {
new LimitedInputStream(in, partitionSize));
Iterator<Tuple2<Object, Object>> records = recordsStream.asKeyValueIterator();
while (records.hasNext()) {
recordsList.add(records.next());
Tuple2<Object, Object> record = records.next();
Assert.assertEquals(i, hashPartitioner.getPartition(record._1()));
recordsList.add(record);
}
recordsStream.close();
startOffset += partitionSize;
Expand Down

0 comments on commit 8f5061a

Please sign in to comment.