@Test public void testSerializeState() throws IOException { WorkUnit workUnit1 = WorkUnit.createEmpty(); workUnit1.setProp("foo", "bar"); workUnit1.setProp("a", 10); SerializationUtils.serializeState(this.fs, new Path(this.outputPath, "wu1"), workUnit1); WorkUnit workUnit2 = WorkUnit.createEmpty(); workUnit2.setProp("foo", "baz"); workUnit2.setProp("b", 20); SerializationUtils.serializeState(this.fs, new Path(this.outputPath, "wu2"), workUnit2); }
public static <T extends State> void serializeState(FileSystem fs, Path jobStateFilePath, T state) throws IOException { serializeState(fs, jobStateFilePath, state, fs.getDefaultReplication(jobStateFilePath)); }
SerializationUtils { public static <T extends State> void serializeState(FileSystem fs, Path jobStateFilePath, T state) throws IOException { serializeState(fs, jobStateFilePath, state, fs.getDefaultReplication(jobStateFilePath)); } }
SerializationUtils { public static <T extends State> void serializeState(FileSystem fs, Path jobStateFilePath, T state) throws IOException { serializeState(fs, jobStateFilePath, state, fs.getDefaultReplication(jobStateFilePath)); }  }
SerializationUtils { public static <T extends State> void serializeState(FileSystem fs, Path jobStateFilePath, T state) throws IOException { serializeState(fs, jobStateFilePath, state, fs.getDefaultReplication(jobStateFilePath)); }  static String serialize(T obj); static String serialize(T obj, BaseEncoding enc); static byte[] serializeIntoBytes(T obj); static T deserialize(String serialized, Class<T> clazz); static T deserialize(String serialized, Class<T> clazz, BaseEncoding enc); static T deserializeFromBytes(byte[] serialized, Class<T> clazz); static void serializeState(FileSystem fs, Path jobStateFilePath, T state); static void serializeState(FileSystem fs, Path jobStateFilePath, T state, short replication); static void deserializeState(FileSystem fs, Path jobStateFilePath, T state); static void deserializeStateFromInputStream(InputStream is, T state); }
SerializationUtils { public static <T extends State> void serializeState(FileSystem fs, Path jobStateFilePath, T state) throws IOException { serializeState(fs, jobStateFilePath, state, fs.getDefaultReplication(jobStateFilePath)); }  static String serialize(T obj); static String serialize(T obj, BaseEncoding enc); static byte[] serializeIntoBytes(T obj); static T deserialize(String serialized, Class<T> clazz); static T deserialize(String serialized, Class<T> clazz, BaseEncoding enc); static T deserializeFromBytes(byte[] serialized, Class<T> clazz); static void serializeState(FileSystem fs, Path jobStateFilePath, T state); static void serializeState(FileSystem fs, Path jobStateFilePath, T state, short replication); static void deserializeState(FileSystem fs, Path jobStateFilePath, T state); static void deserializeStateFromInputStream(InputStream is, T state);  }