Пример #1
0
 @Test
 public void testKryoEncoder() {
   Encoder<KryoSerializable> encoder = Encoders.kryo(KryoSerializable.class);
   List<KryoSerializable> data =
       Arrays.asList(new KryoSerializable("hello"), new KryoSerializable("world"));
   Dataset<KryoSerializable> ds = context.createDataset(data, encoder);
   Assert.assertEquals(data, ds.collectAsList());
 }
Пример #2
0
 @Test(expected = UnsupportedOperationException.class)
 public void testKryoEncoderErrorMessageForPrivateClass() {
   Encoders.kryo(PrivateClassTest.class);
 }