Java Code Examples for org.apache.hadoop.io.TestGenericWritable.FooGenericWritable

The following examples show how to use org.apache.hadoop.io.TestGenericWritable.FooGenericWritable. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: hadoop   Source File: TestWritableSerialization.java    License: Apache License 2.0 6 votes vote down vote up
@Test
public void testWritableConfigurable() throws Exception {
  
  //set the configuration parameter
  conf.set(CONF_TEST_KEY, CONF_TEST_VALUE);

  //reuse TestGenericWritable inner classes to test 
  //writables that also implement Configurable.
  FooGenericWritable generic = new FooGenericWritable();
  generic.setConf(conf);
  Baz baz = new Baz();
  generic.set(baz);
  Baz result = SerializationTestUtil.testSerialization(conf, baz);
  assertEquals(baz, result);
  assertNotNull(result.getConf());
}
 
Example 2
Source Project: big-c   Source File: TestWritableSerialization.java    License: Apache License 2.0 6 votes vote down vote up
@Test
public void testWritableConfigurable() throws Exception {
  
  //set the configuration parameter
  conf.set(CONF_TEST_KEY, CONF_TEST_VALUE);

  //reuse TestGenericWritable inner classes to test 
  //writables that also implement Configurable.
  FooGenericWritable generic = new FooGenericWritable();
  generic.setConf(conf);
  Baz baz = new Baz();
  generic.set(baz);
  Baz result = SerializationTestUtil.testSerialization(conf, baz);
  assertEquals(baz, result);
  assertNotNull(result.getConf());
}
 
Example 3
Source Project: RDFS   Source File: TestWritableSerialization.java    License: Apache License 2.0 5 votes vote down vote up
public void testWritableConfigurable() throws Exception {
  
  //set the configuration parameter
  conf.set(CONF_TEST_KEY, CONF_TEST_VALUE);

  //reuse TestGenericWritable inner classes to test 
  //writables that also implement Configurable.
  FooGenericWritable generic = new FooGenericWritable();
  generic.setConf(conf);
  Baz baz = new Baz();
  generic.set(baz);
  Baz result = testSerialization(conf, baz);
  assertNotNull(result.getConf());
}
 
Example 4
Source Project: hadoop-gpu   Source File: TestWritableSerialization.java    License: Apache License 2.0 5 votes vote down vote up
public void testWritableConfigurable() throws Exception {
  
  //set the configuration parameter
  conf.set(CONF_TEST_KEY, CONF_TEST_VALUE);

  //reuse TestGenericWritable inner classes to test 
  //writables that also implement Configurable.
  FooGenericWritable generic = new FooGenericWritable();
  generic.setConf(conf);
  Baz baz = new Baz();
  generic.set(baz);
  Baz result = testSerialization(conf, baz);
  assertNotNull(result.getConf());
}