@Override public void write(DataOutput out) throws IOException { t.write(out); out.writeBoolean(synthetic); out.writeBoolean(omittable); }
private void writeTuple(DataOutput out, Tuple t) throws IOException { if (t instanceof TypeAwareTuple) { t.write(out); } else { SedesHelper.writeGenericTuple(out, t); } }
@Override public void write(DataOutput out) throws IOException { t.write(out); out.writeInt(targetOps.size()); for (OperatorKey target : targetOps) { // Ideally I should be able to call target.write(out). // Since it doesn't support it yet handling it here out.writeInt(target.scope.length()); out.writeBytes(target.scope); out.writeLong(target.id); } }
@Override public void write(DataOutput out) throws IOException { convertAll(); realTuple.write(out); }
@Override public void write(DataOutput out) throws IOException { out.writeLong(size()); Iterator<Tuple> it = iterator(); while (it.hasNext()) { Tuple item = it.next(); item.write(out); } }
/** * Write a bag's contents to disk. * @param out DataOutput to write data to. * @throws IOException (passes it on from underlying calls). */ public void write(DataOutput out) throws IOException { // We don't care whether this bag was sorted or distinct because // using the iterator to write it will guarantee those things come // correctly. And on the other end there'll be no reason to waste // time re-sorting or re-applying distinct. out.writeLong(size()); Iterator<Tuple> it = iterator(); while (it.hasNext()) { Tuple item = it.next(); item.write(out); } }
/** * Write a bag's contents to disk. * @param out DataOutput to write data to. * @throws IOException (passes it on from underlying calls). */ public void write(DataOutput out) throws IOException { // We don't care whether this bag was sorted or distinct because // using the iterator to write it will guarantee those things come // correctly. And on the other end there'll be no reason to waste // time re-sorting or re-applying distinct. out.writeLong(size()); Iterator<Tuple> it = iterator(); while (it.hasNext()) { Tuple item = it.next(); item.write(out); } }
@Override public void write(DataOutput out) throws IOException { Tuple t = mTupleFactory.newTupleNoCopy(getAll()); t.write(out); }
@Override public void write(DataOutput dataOutput) throws IOException { Tuple t = TF.newTuple(json()); t.write(dataOutput); }
Tuple t; while ((t = readFromPriorityQ()) != null) { t.write(out);
Tuple t; while ((t = readFromPriorityQ()) != null) { t.write(out);
Tuple t; while ((t = readFromTree()) != null) { t.write(out);
Tuple t; while ((t = readFromTree()) != null) { t.write(out);
t.write(out); spilled++;
Arrays.sort(array); for (int i = 0; i < array.length; i++) { array[i].write(out); spilled++;