Search in sources :

Example 1 with ShortWritable

use of org.apache.hadoop.io.ShortWritable in project hadoop by apache.

the class FSImageSerialization method readShort.

/** read short value */
static short readShort(DataInput in) throws IOException {
    ShortWritable uShort = TL_DATA.get().U_SHORT;
    uShort.readFields(in);
    return uShort.get();
}
Also used : ShortWritable(org.apache.hadoop.io.ShortWritable)

Example 2 with ShortWritable

use of org.apache.hadoop.io.ShortWritable in project hadoop by apache.

the class FSImageSerialization method writeShort.

/** write short value */
static void writeShort(short value, DataOutputStream out) throws IOException {
    ShortWritable uShort = TL_DATA.get().U_SHORT;
    uShort.set(value);
    uShort.write(out);
}
Also used : ShortWritable(org.apache.hadoop.io.ShortWritable)

Example 3 with ShortWritable

use of org.apache.hadoop.io.ShortWritable in project druid by druid-io.

the class OrcStructConverterTest method testConvertRootFieldWithNonNullShortReturningOriginalValue.

@Test
public void testConvertRootFieldWithNonNullShortReturningOriginalValue() {
    final OrcStructConverter converter = new OrcStructConverter(false);
    assertConversion(converter, TypeDescription.createShort(), (short) 128, new ShortWritable((short) 128));
}
Also used : ShortWritable(org.apache.hadoop.io.ShortWritable) Test(org.junit.Test)

Aggregations

ShortWritable (org.apache.hadoop.io.ShortWritable)3 Test (org.junit.Test)1