@Override public NullWritable getCurrentKey() { return NullWritable.get(); }
/** * {@inheritDoc} */ @Override public NullWritable getCurrentKey() { return NullWritable.get(); }
@Override public NullWritable getCurrentKey() throws IOException, InterruptedException { return NullWritable.get(); }
/** * Create an object of the appropriate type to be used as a key. * * @return a new key object. */ @Override public NullWritable createKey() { return NullWritable.get(); }
@Override public NullWritable getCurrentKey() throws IOException, InterruptedException { return NullWritable.get(); }
@Override public Object getPrimitiveWritableObject(Object o) { return o == null ? null : NullWritable.get(); } }
@Override protected void reduce( BytesWritable key, Iterable<NullWritable> values, Context context ) throws IOException, InterruptedException { context.write(key, NullWritable.get()); } }
@SuppressWarnings("unchecked") @Override public T createInstance() { if (typeClass == NullWritable.class) { return (T) NullWritable.get(); } return InstantiationUtil.instantiate(typeClass); }
@Override public boolean nextKeyValue() throws IOException, InterruptedException { if(readOver) { return false; } key = NullWritable.get(); value = split; readOver = true; return true; }
@Override public Object createValue() { return rbCtx == null ? NullWritable.get() : rbCtx.createVectorizedRowBatch(); }
void writePartitionFile(Configuration conf, Path path) throws IOException { FileSystem fs = path.getFileSystem(conf); @SuppressWarnings("deprecation") SequenceFile.Writer writer = SequenceFile.createWriter( fs, conf, path, ImmutableBytesWritable.class, NullWritable.class); for (int i = 0; i < partitions.size(); i++) { writer.append(partitions.get(i), NullWritable.get()); } writer.close(); }
public T readEvent() throws IOException { if (!reader.next(NullWritable.get(), writable)) { return null; } return writable.getMessage(); }
@Override public boolean nextKeyValue() { currentWritableValue = new KafkaWritable(); if (next(NullWritable.get(), currentWritableValue)) { return true; } currentWritableValue = null; return false; }
@Override protected void innerMap( InputRow inputRow, Context context ) throws IOException, InterruptedException { final List<Object> groupKey = Rows.toGroupKey( rollupGranularity.bucketStart(inputRow.getTimestamp()).getMillis(), inputRow ); context.write( new BytesWritable(HadoopDruidIndexerConfig.JSON_MAPPER.writeValueAsBytes(groupKey)), NullWritable.get() ); context.getCounter(HadoopDruidIndexerConfig.IndexJobCounters.ROWS_PROCESSED_COUNTER).increment(1); } }
/** {@inheritDoc} */ @Override protected void reduce(UUID key, Iterable<NullWritable> vals, Context ctx) throws IOException, InterruptedException { // X.printerrln("___ rdc: " + key); text.set(key.toString()); ctx.write(text, NullWritable.get()); } }
/** {@inheritDoc} */ @Override protected void map(LongWritable key, Text val, Context ctx) throws IOException, InterruptedException { // X.printerrln("___ map: " + val); ctx.write(UUID.fromString(val.toString()), NullWritable.get()); } }
@Override public void map(NullWritable key, HCatRecord value, Context context) throws IOException, InterruptedException { LOG.info("HCatRecord: " + value); context.write(NullWritable.get(), new Text(value.toString())); } }
@Override protected void map(ImmutableBytesWritable key, Result value, Context context) throws IOException, InterruptedException { // Validate a single row coming from the snapshot, and emit the row key verifyRowFromMap(key, value); context.write(key, NullWritable.get()); } }
@Override public void map(ImmutableBytesWritable key, Result value, OutputCollector<ImmutableBytesWritable, NullWritable> collector, Reporter reporter) throws IOException { verifyRowFromMap(key, value); collector.collect(key, NullWritable.get()); } }