예제 #1
0
 @Test
 public void testJavaEncoder() {
   Encoder<JavaSerializable> encoder = Encoders.javaSerialization(JavaSerializable.class);
   List<JavaSerializable> data =
       Arrays.asList(new JavaSerializable("hello"), new JavaSerializable("world"));
   Dataset<JavaSerializable> ds = context.createDataset(data, encoder);
   Assert.assertEquals(data, ds.collectAsList());
 }
예제 #2
0
 @Test(expected = UnsupportedOperationException.class)
 public void testJavaEncoderErrorMessageForPrivateClass() {
   Encoders.javaSerialization(PrivateClassTest.class);
 }