List of usage examples for org.apache.hadoop.io ShortWritable set
public void set(short value)
From source file:org.apache.orc.mapred.OrcMapredRecordReader.java
License:Apache License
static ShortWritable nextShort(ColumnVector vector, int row, Object previous) { if (vector.isRepeating) { row = 0;// w ww. ja v a 2 s . c om } if (vector.noNulls || !vector.isNull[row]) { ShortWritable result; if (previous == null || previous.getClass() != ShortWritable.class) { result = new ShortWritable(); } else { result = (ShortWritable) previous; } result.set((short) ((LongColumnVector) vector).vector[row]); return result; } else { return null; } }