Refine search
@Override public Object copyObject(Object o) { return o == null ? null : new LongWritable(((LongWritable) o).get()); }
public Tuple2<Text, LongWritable> call(Tuple2<String, Long> e) { return new Tuple2(new Text(e._1()), new LongWritable(e._2())); } });
case FILENAME : if (ctx.inputFileChanged()) { vcValues[i] = new Text(ctx.getCurrentInputPath().toString()); LongWritable old = (LongWritable) vcValues[i]; if (old == null) { old = new LongWritable(current); vcValues[i] = old; continue; if (current != old.get()) { old.set(current); LongWritable old = (LongWritable) vcValues[i]; if (old == null) { old = new LongWritable(current); vcValues[i] = old; continue; if (current != old.get()) { old.set(current); old = new LongWritable(current); vcValues[i] = old; continue; if (current != old.get()) { old.set(current);
@Override public Tuple2<Text, LongWritable> map(Tuple2<String, Integer> value) throws Exception { return new Tuple2<Text, LongWritable>(new Text(value.f0), new LongWritable(value.f1)); } });
LazyBinaryLong(LazyBinaryLong copy) { super(copy); data = new LongWritable(copy.data.get()); }
case FILENAME : if (ctx.inputFileChanged()) { vcValues[i] = new Text(ctx.getCurrentInputPath().toString()); LongWritable old = (LongWritable) vcValues[i]; if (old == null) { old = new LongWritable(current); vcValues[i] = old; continue; if (current != old.get()) { old.set(current); LongWritable old = (LongWritable) vcValues[i]; if (old == null) { old = new LongWritable(current); vcValues[i] = old; continue; if (current != old.get()) { old.set(current); old = new LongWritable(current); vcValues[i] = old; continue; if (current != old.get()) { old.set(current);
@Override public Tuple2<Text, LongWritable> map(Tuple2<String, Integer> value) throws Exception { return new Tuple2<Text, LongWritable>(new Text(value.f0), new LongWritable(value.f1)); } });
public LazyLong(LazyLong copy) { super(copy); data = new LongWritable(copy.data.get()); }
@Override public void map(LongWritable k, Text v, OutputCollector<Text, LongWritable> out, Reporter rep) throws IOException { // normalize and split the line String line = v.toString(); String[] tokens = line.toLowerCase().split("\\W+"); // emit the pairs for (String token : tokens) { if (token.length() > 0) { out.collect(new Text(token), new LongWritable(1L)); } } }
@Override public LongWritable add(LongWritable t1, LongWritable t2) { if (t1 == null && t2 == null) return null; return new LongWritable((t1 == null ? 0 : t1.get()) + (t2 == null ? 0 : t2.get())); }
row.setFieldValue(1, new LongWritable(1)); row.setFieldValue(2, new IntWritable(0)); LongWritable rowId = new LongWritable(); row.setFieldValue(3, rowId); row.setFieldValue(4, new LongWritable(1)); OrcStruct rowField = new OrcStruct(3); row.setFieldValue(5, rowField); IntWritable c = new IntWritable(); b.setFieldValue(0, c); Text d = new Text(); rowField.setFieldValue(2, d); indexBuilder.addKey(OrcRecordUpdater.INSERT_OPERATION, 1, 0, rowId.get()); writer.addRow(row);
partialResult[0] = new Text(); partialResult[1] = new LongWritable(0); partialResult[2] = new LongWritable(0); partialResult[3] = new LongWritable(0); result[0] = new Text(); result[1] = new LongWritable(0); result[2] = new LongWritable(0); result[3] = new LongWritable(0);
@Override public LongWritable minus(LongWritable t1, LongWritable t2) { if (t1 == null && t2 == null) return null; return new LongWritable((t1 == null ? 0 : t1.get()) - (t2 == null ? 0 : t2.get())); }
partialResult[0] = new Text(); partialResult[1] = new LongWritable(0); partialResult[2] = new LongWritable(0); partialResult[3] = new LongWritable(0); result[0] = new Text(); result[1] = new LongWritable(0); result[2] = new LongWritable(0); result[3] = new LongWritable(0);
@Override public LongWritable add(LongWritable t1, LongWritable t2) { if (t1 == null && t2 == null) return null; return new LongWritable((t1 == null ? 0 : t1.get()) + (t2 == null ? 0 : t2.get())); }
context.write(new LongWritable(Long.parseLong(lineSplits[2])), new Text( FileSystem.get(_properties).listStatus(new Path(_localHdfsSegmentTarPath + "/"))[0].getPath().getName())); LOGGER.info("Finished the job successfully");
@Override public LongWritable minus(LongWritable t1, LongWritable t2) { if (t1 == null && t2 == null) return null; return new LongWritable((t1 == null ? 0 : t1.get()) - (t2 == null ? 0 : t2.get())); }
partialResult[0] = new Text(); partialResult[1] = new LongWritable(0); partialResult[2] = new LongWritable(0); partialResult[3] = new LongWritable(0); partialResult[4] = new LongWritable(0); result[0] = new Text(); result[1] = new LongWritable(0); result[2] = new DoubleWritable(0); result[3] = new LongWritable(0);
public void addToStat(String statType, long amount) { LongWritable currentValue = statsMap.get(statType); if (currentValue == null) { statsMap.put(statType, new LongWritable(amount)); } else { currentValue.set(currentValue.get() + amount); } }