@Override public void collect(LongWritable blockKey, SparseRowBlockWritable block) throws IOException { outKey.setTaskItemOrdinal((int) blockKey.get()); try { context.write(outKey, block); } catch (InterruptedException exc) { throw new IOException("Interrupted", exc); } } };
@Override public void collect(LongWritable blockKey, SparseRowBlockWritable block) throws IOException { outKey.setTaskItemOrdinal((int) blockKey.get()); try { context.write(outKey, block); } catch (InterruptedException exc) { throw new IOException("Interrupted", exc); } } };
@Override public void collect(LongWritable blockKey, SparseRowBlockWritable block) throws IOException { outKey.setTaskItemOrdinal((int) blockKey.get()); try { context.write(outKey, block); } catch (InterruptedException exc) { throw new IOException("Interrupted", exc); } } };
key.setTaskItemOrdinal(blockBase + k);
key.setTaskItemOrdinal(blockBase + k);
key.setTaskItemOrdinal(blockBase + k);
outKey.setTaskItemOrdinal(pass); context.write(outKey, dbw);
outKey.setTaskItemOrdinal(pass); context.write(outKey, dbw);
outKey.setTaskItemOrdinal(pass); context.write(outKey, dbw);
@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); } }