public ObjectWritable(Object instance) { set(instance); }
throw new RuntimeException(ex); ow.set(orcRowArray); return ow;
@Override public ObjectWritable toWritable(final Object entry) { writable.set(entry); return writable; }
public ObjectWritable(Object instance) { set(instance); }
public ObjectWritable(Object instance) { set(instance); }
public ObjectWritable(Object instance) { set(instance); }
public ObjectWritable(Object instance) { set(instance); }
public void set(Data data) { super.set(data); }
public ObjectWritable(Object instance) { set(instance); }
public ObjectWritable(Object instance) { set(instance); }
@SuppressWarnings("unchecked") public void emit(String key, Object value) throws IOException, InterruptedException { this.value.set(value); this.key.set(key); context.write(this.key, this.value); } }
@Override public boolean next(Void key, ObjectWritable value) throws IOException { if (!initialized.get()) { initialize(); } try { boolean retVal = recordScanner.nextRecord(); if (retVal) { value.set(recordScanner.getCurrentRecord()); } return retVal; } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new IOException(e); } }
@Override public boolean next(Void key, ObjectWritable value) throws IOException { if (!initialized.get()) { initialize(); } try { boolean retVal = recordScanner.nextRecord(); if (retVal) { value.set(recordScanner.getCurrentRecord()); } return retVal; } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new IOException(e); } }
@Override public boolean next(LongWritable key, ObjectWritable value) throws IOException { if (!pcapReaderIterator.hasNext()) return false; key.set(++packetCount); value.set(pcapReaderIterator.next()); reporter.setStatus("Read " + getPos() + " of " + end + " bytes"); reporter.progress(); return true; }
@Override public boolean nextKeyValue() throws IOException { if (!pcapReaderIterator.hasNext()) return false; key.set(++packetCount); value.set(pcapReaderIterator.next()); context.setStatus("Read " + getPos() + " of " + end + " bytes"); context.progress(); return true; }
@Override public boolean next(Void key, ObjectWritable value) throws IOException { // Make sure that the user has read access to the stream. try { authorizationEnforcer.enforce(streamId, principal, Action.READ); } catch (Exception e) { Throwables.propagateIfPossible(e, IOException.class); throw new IOException(e); } events.clear(); try { if (reader.read(events, 1, 0, TimeUnit.SECONDS, readFilter) <= 0) { return false; } PositionStreamEvent streamEvent = events.get(0); if (streamEvent.getStart() - inputSplit.getStart() >= inputSplit.getLength()) { return false; } value.set(streamEvent); return true; } catch (InterruptedException e) { LOG.error("interrupted while reading stream events.", e); return false; } }
throw new RuntimeException(ex); ow.set(orcRowArray); return ow;
iteration, cluster.size()); output.set(serializer.toWritable(newPolygonFeature)); if (LOGGER.isTraceEnabled()) { LOGGER.trace("Generating {}", newPolygonFeature.toString());
@Override public void notify(final CentroidPairing<Object> pairing) { pairing.getPairedItem().setGroupID(pairing.getCentroid().getID()); pairing.getPairedItem().setZoomLevel(pairing.getCentroid().getZoomLevel() + 1); // just get the contents of the returned ObjectWritable to // avoid // having to assign outputValWritable rather than update its // contents. // the 'toWritabeValue' method is efficient, not creating an // extra instance of // ObjectWritable each time, so this is just a simple // exchange of a reference outputValWritable.set( toWritableValue(key, pairing.getPairedItem().getWrappedItem()).get()); AtomicInteger ii = logCounts.get(pairing.getCentroid().getID()); if (ii == null) { ii = new AtomicInteger(0); logCounts.put(pairing.getCentroid().getID(), ii); } ii.incrementAndGet(); } };