@Override protected void reduce(Writable key, Iterable<SparseRowBlockWritable> values, Context context) throws IOException, InterruptedException { for (SparseRowBlockWritable bw : values) { accum.plusBlock(bw); } context.write(key, accum); accum.clear(); }
@Override protected void reduce(Writable key, Iterable<SparseRowBlockWritable> values, Context context) throws IOException, InterruptedException { for (SparseRowBlockWritable bw : values) { accum.plusBlock(bw); } context.write(key, accum); accum.clear(); }
@Override protected void reduce(Writable key, Iterable<SparseRowBlockWritable> values, Context context) throws IOException, InterruptedException { for (SparseRowBlockWritable bw : values) { accum.plusBlock(bw); } context.write(key, accum); accum.clear(); }
private void flushBlock() throws IOException { if (block == null || block.getNumRows() == 0) { return; } blockKeyW.set(currentBlockNum); delegate.collect(blockKeyW, block); block.clear(); }
private void flushBlock() throws IOException { if (block == null || block.getNumRows() == 0) { return; } blockKeyW.set(currentBlockNum); delegate.collect(blockKeyW, block); block.clear(); }
private void flushBlock() throws IOException { if (block == null || block.getNumRows() == 0) { return; } blockKeyW.set(currentBlockNum); delegate.collect(blockKeyW, block); block.clear(); }
@Override protected void reduce(SplitPartitionedWritable key, Iterable<SparseRowBlockWritable> values, Context context) throws IOException, InterruptedException { accum.clear(); for (SparseRowBlockWritable bw : values) { accum.plusBlock(bw); } if (key.getTaskId() != lastTaskId) { setupBlock(context, key); } long blockBase = key.getTaskItemOrdinal() * blockHeight; for (int k = 0; k < accum.getNumRows(); k++) { Vector yiRow = accum.getRows()[k]; key.setTaskItemOrdinal(blockBase + accum.getRowIndices()[k]); qr.collect(key, yiRow); } }
@Override protected void reduce(SplitPartitionedWritable key, Iterable<SparseRowBlockWritable> values, Context context) throws IOException, InterruptedException { accum.clear(); for (SparseRowBlockWritable bw : values) { accum.plusBlock(bw); } if (key.getTaskId() != lastTaskId) { setupBlock(context, key); } long blockBase = key.getTaskItemOrdinal() * blockHeight; for (int k = 0; k < accum.getNumRows(); k++) { Vector yiRow = accum.getRows()[k]; key.setTaskItemOrdinal(blockBase + accum.getRowIndices()[k]); qr.collect(key, yiRow); } }
@Override protected void reduce(SplitPartitionedWritable key, Iterable<SparseRowBlockWritable> values, Context context) throws IOException, InterruptedException { accum.clear(); for (SparseRowBlockWritable bw : values) { accum.plusBlock(bw); } if (key.getTaskId() != lastTaskId) { setupBlock(context, key); } long blockBase = key.getTaskItemOrdinal() * blockHeight; for (int k = 0; k < accum.getNumRows(); k++) { Vector yiRow = accum.getRows()[k]; key.setTaskItemOrdinal(blockBase + accum.getRowIndices()[k]); qr.collect(key, yiRow); } }
InterruptedException { accum.clear(); for (SparseRowBlockWritable bw : values) { accum.plusBlock(bw);
InterruptedException { accum.clear(); for (SparseRowBlockWritable bw : values) { accum.plusBlock(bw);
InterruptedException { accum.clear(); for (SparseRowBlockWritable bw : values) { accum.plusBlock(bw);