org.apache.flink.streaming.api.functions.sink.filesystem.utils.NoOpRecoverable Java Examples

The following examples show how to use org.apache.flink.streaming.api.functions.sink.filesystem.utils.NoOpRecoverable. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BucketTest.java    From flink with Apache License 2.0 6 votes vote down vote up
private Bucket<String, String> getRestoredBucketWithOnlyInProgressPart(final BaseStubWriter writer) throws IOException {
	final BucketState<String> stateWithOnlyInProgressFile =
			new BucketState<>(
				"test",
				new Path(),
				12345L,
				new OutputStreamBasedPartFileWriter.OutputStreamBasedInProgressFileRecoverable(new NoOpRecoverable()),
				new HashMap<>());

	return Bucket.restore(
		0,
		1L,
		new RowWiseBucketWriter<>(writer, ENCODER),
		rollingPolicy,
		stateWithOnlyInProgressFile,
		OutputFileConfig.builder().build());
}
 
Example #2
Source File: BucketTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
private Map<Long, List<RecoverableWriter.CommitRecoverable>> createPendingPartsPerCheckpoint(int noOfCheckpoints) {
	final Map<Long, List<RecoverableWriter.CommitRecoverable>> pendingCommittablesPerCheckpoint = new HashMap<>();
	for (int checkpointId = 0; checkpointId < noOfCheckpoints; checkpointId++) {
		final List<RecoverableWriter.CommitRecoverable> pending = new ArrayList<>();
		pending.add(new NoOpRecoverable());
		pendingCommittablesPerCheckpoint.put((long) checkpointId, pending);
	}
	return pendingCommittablesPerCheckpoint;
}
 
Example #3
Source File: BucketTest.java    From flink with Apache License 2.0 5 votes vote down vote up
private Map<Long, List<RecoverableWriter.CommitRecoverable>> createPendingPartsPerCheckpoint(int noOfCheckpoints) {
	final Map<Long, List<RecoverableWriter.CommitRecoverable>> pendingCommittablesPerCheckpoint = new HashMap<>();
	for (int checkpointId = 0; checkpointId < noOfCheckpoints; checkpointId++) {
		final List<RecoverableWriter.CommitRecoverable> pending = new ArrayList<>();
		pending.add(new NoOpRecoverable());
		pendingCommittablesPerCheckpoint.put((long) checkpointId, pending);
	}
	return pendingCommittablesPerCheckpoint;
}
 
Example #4
Source File: BucketTest.java    From flink with Apache License 2.0 5 votes vote down vote up
private Map<Long, List<InProgressFileWriter.PendingFileRecoverable>> createPendingPartsPerCheckpoint(int noOfCheckpoints) {
	final Map<Long, List<InProgressFileWriter.PendingFileRecoverable>> pendingCommittablesPerCheckpoint = new HashMap<>();
	for (int checkpointId = 0; checkpointId < noOfCheckpoints; checkpointId++) {
		final List<InProgressFileWriter.PendingFileRecoverable> pending = new ArrayList<>();
		pending.add(new OutputStreamBasedPartFileWriter.OutputStreamBasedPendingFileRecoverable(new NoOpRecoverable()));
		pendingCommittablesPerCheckpoint.put((long) checkpointId, pending);
	}
	return pendingCommittablesPerCheckpoint;
}
 
Example #5
Source File: BucketTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public RecoverableFsDataOutputStream.Committer recoverForCommit(CommitRecoverable resumable) throws IOException {
	checkArgument(resumable instanceof NoOpRecoverable);
	recoverForCommitCallCounter++;
	return new NoOpCommitter();
}
 
Example #6
Source File: BucketTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
private Bucket<String, String> getRestoredBucketWithOnlyInProgressPart(final BaseStubWriter writer) throws IOException {
	final BucketState<String> stateWithOnlyInProgressFile =
			new BucketState<>("test", new Path(), 12345L, new NoOpRecoverable(), new HashMap<>());
	return Bucket.restore(writer, 0, 1L, partFileFactory, rollingPolicy, stateWithOnlyInProgressFile);
}
 
Example #7
Source File: BucketTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public RecoverableFsDataOutputStream.Committer recoverForCommit(CommitRecoverable resumable) throws IOException {
	checkArgument(resumable instanceof NoOpRecoverable);
	recoverForCommitCallCounter++;
	return new NoOpCommitter();
}
 
Example #8
Source File: BucketTest.java    From flink with Apache License 2.0 4 votes vote down vote up
private Bucket<String, String> getRestoredBucketWithOnlyInProgressPart(final BaseStubWriter writer) throws IOException {
	final BucketState<String> stateWithOnlyInProgressFile =
			new BucketState<>("test", new Path(), 12345L, new NoOpRecoverable(), new HashMap<>());
	return Bucket.restore(writer, 0, 1L, partFileFactory, rollingPolicy, stateWithOnlyInProgressFile, new PartFileConfig());
}
 
Example #9
Source File: BucketTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public RecoverableFsDataOutputStream.Committer recoverForCommit(CommitRecoverable resumable) throws IOException {
	checkArgument(resumable instanceof NoOpRecoverable);
	recoverForCommitCallCounter++;
	return new NoOpCommitter();
}