Skip to content

Commit

Permalink
Merge pull request apache#2169 from navis/refactor-incremental-index3
Browse files Browse the repository at this point in the history
Simplify information in IncrementalIndex
  • Loading branch information
jon-wei committed Jan 12, 2016
2 parents 8d16860 + 976ebc4 commit 419fa5a
Show file tree
Hide file tree
Showing 7 changed files with 180 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,12 @@ protected void reduce(
private void flushIndexToContextAndClose(BytesWritable key, IncrementalIndex index, Context context)
throws IOException, InterruptedException
{
final List<String> dimensions = index.getDimensionNames();
Iterator<Row> rows = index.iterator();
while (rows.hasNext()) {
context.progress();
Row row = rows.next();
InputRow inputRow = getInputRowFromRow(row, index.getDimensions());
InputRow inputRow = getInputRowFromRow(row, dimensions);
context.write(
key,
new BytesWritable(InputRowSerde.toBytes(inputRow, combiningAggs))
Expand Down
Loading

0 comments on commit 419fa5a

Please sign in to comment.