Example usage for org.apache.hadoop.io ObjectWritable ObjectWritable

List of usage examples for org.apache.hadoop.io ObjectWritable ObjectWritable

Introduction

In this page you can find the example usage for org.apache.hadoop.io ObjectWritable ObjectWritable.

Prototype

public ObjectWritable(Class declaredClass, Object instance) 

Source Link

Usage

From source file:crunch.MaxTemperature.java

License:Apache License

@Test
    public void test() throws IOException {
        ObjectWritable src = new ObjectWritable(Integer.TYPE, 163);
        ObjectWritable dest = new ObjectWritable();
        WritableUtils.cloneInto(dest, src);
        assertThat((Integer) dest.get(), is(163));
    }/*from w  ww . j a va 2 s.c o  m*/