@Test(expected = IllegalStateException.class) public void testSavepointOutputFormatOnlyWorksWithParallelismOne() throws Exception { Path path = new Path(temporaryFolder.newFolder().getAbsolutePath()); SavepointOutputFormat format = createSavepointOutputFormat(path); format.open(0, 2); }
@Override public void open(int taskNumber, int numTasks) throws IOException { Preconditions.checkState(numTasks == 1, "SavepointOutputFormat should only be executed with parallelism 1"); targetLocation = createSavepointLocation(savepointPath); }
SavepointOutputFormat extends RichOutputFormat<Savepoint> { @Override public void open(int taskNumber, int numTasks) throws IOException { Preconditions.checkState(numTasks == 1, "SavepointOutputFormat should only be executed with parallelism 1"); targetLocation = createSavepointLocation(savepointPath); } }
SavepointOutputFormat extends RichOutputFormat<Savepoint> { @Override public void open(int taskNumber, int numTasks) throws IOException { Preconditions.checkState(numTasks == 1, "SavepointOutputFormat should only be executed with parallelism 1"); targetLocation = createSavepointLocation(savepointPath); } SavepointOutputFormat(Path savepointPath); }
SavepointOutputFormat extends RichOutputFormat<Savepoint> { @Override public void open(int taskNumber, int numTasks) throws IOException { Preconditions.checkState(numTasks == 1, "SavepointOutputFormat should only be executed with parallelism 1"); targetLocation = createSavepointLocation(savepointPath); } SavepointOutputFormat(Path savepointPath); @Override void configure(Configuration parameters); @Override void open(int taskNumber, int numTasks); @Override void writeRecord(Savepoint savepoint); @Override void close(); }
SavepointOutputFormat extends RichOutputFormat<Savepoint> { @Override public void open(int taskNumber, int numTasks) throws IOException { Preconditions.checkState(numTasks == 1, "SavepointOutputFormat should only be executed with parallelism 1"); targetLocation = createSavepointLocation(savepointPath); } SavepointOutputFormat(Path savepointPath); @Override void configure(Configuration parameters); @Override void open(int taskNumber, int numTasks); @Override void writeRecord(Savepoint savepoint); @Override void close();  }