@Test @SuppressWarnings("deprecation") public void testSerializeToSequenceFile() throws IOException { Closer closer = Closer.create(); Configuration conf = new Configuration(); WritableShimSerialization.addToHadoopConfiguration(conf); try { SequenceFile.Writer writer1 = closer.register(SequenceFile.createWriter(this.fs, conf, new Path(this.outputPath, "seq1"), Text.class, WorkUnitState.class)); Text key = new Text(); WorkUnitState workUnitState = new WorkUnitState(); TestWatermark watermark = new TestWatermark(); watermark.setLongWatermark(10L); workUnitState.setActualHighWatermark(watermark); writer1.append(key, workUnitState); SequenceFile.Writer writer2 = closer.register(SequenceFile.createWriter(this.fs, conf, new Path(this.outputPath, "seq2"), Text.class, WorkUnitState.class)); watermark.setLongWatermark(100L); workUnitState.setActualHighWatermark(watermark); writer2.append(key, workUnitState); } catch (Throwable t) { throw closer.rethrow(t); } finally { closer.close(); } }
@Override public void close() throws IOException { try { waitForTasks(); } finally { ExecutorsUtils.shutdownExecutorService(this.executor, Optional.of(LOGGER)); } }
ParallelRunner implements Closeable { @Override public void close() throws IOException { try { waitForTasks(); } finally { ExecutorsUtils.shutdownExecutorService(this.executor, Optional.of(LOGGER)); } } }
ParallelRunner implements Closeable { @Override public void close() throws IOException { try { waitForTasks(); } finally { ExecutorsUtils.shutdownExecutorService(this.executor, Optional.of(LOGGER)); } } ParallelRunner(int threads, FileSystem fs);  ParallelRunner(int threads, FileSystem fs, FailPolicy failPolicy); }
ParallelRunner implements Closeable { @Override public void close() throws IOException { try { waitForTasks(); } finally { ExecutorsUtils.shutdownExecutorService(this.executor, Optional.of(LOGGER)); } } ParallelRunner(int threads, FileSystem fs);  ParallelRunner(int threads, FileSystem fs, FailPolicy failPolicy); void serializeToFile(final T state, final Path outputFilePath); void deserializeFromFile(final T state, final Path inputFilePath); void deserializeFromSequenceFile(final Class<? extends Writable> keyClass,
      final Class<T> stateClass, final Path inputFilePath, final Collection<T> states, final boolean deleteAfter); void deletePath(final Path path, final boolean recursive); void renamePath(final Path src, final Path dst, final Optional<String> group); void movePath(final Path src, final FileSystem dstFs, final Path dst, final Optional<String> group); void movePath(final Path src, final FileSystem dstFs, final Path dst, final boolean overwrite,
      final Optional<String> group); void submitCallable(Callable<Void> callable, String name); void waitForTasks(long timeoutInMills); void waitForTasks(); @Override void close(); }
ParallelRunner implements Closeable { @Override public void close() throws IOException { try { waitForTasks(); } finally { ExecutorsUtils.shutdownExecutorService(this.executor, Optional.of(LOGGER)); } } ParallelRunner(int threads, FileSystem fs);  ParallelRunner(int threads, FileSystem fs, FailPolicy failPolicy); void serializeToFile(final T state, final Path outputFilePath); void deserializeFromFile(final T state, final Path inputFilePath); void deserializeFromSequenceFile(final Class<? extends Writable> keyClass,
      final Class<T> stateClass, final Path inputFilePath, final Collection<T> states, final boolean deleteAfter); void deletePath(final Path path, final boolean recursive); void renamePath(final Path src, final Path dst, final Optional<String> group); void movePath(final Path src, final FileSystem dstFs, final Path dst, final Optional<String> group); void movePath(final Path src, final FileSystem dstFs, final Path dst, final boolean overwrite,
      final Optional<String> group); void submitCallable(Callable<Void> callable, String name); void waitForTasks(long timeoutInMills); void waitForTasks(); @Override void close(); static final String PARALLEL_RUNNER_THREADS_KEY; static final int DEFAULT_PARALLEL_RUNNER_THREADS; }