You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tz...@apache.org on 2019/01/31 06:36:43 UTC
[flink] 01/02: [FLINK-11460] [test] Remove the useless class
AcknowledgeStreamMockEnvironment
This is an automated email from the ASF dual-hosted git repository.
tzulitai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 52c2b22bd047912c690edd1d770d567250f6d710
Author: Zhijiang <wa...@aliyun.com>
AuthorDate: Thu Jan 31 11:07:56 2019 +0800
[FLINK-11460] [test] Remove the useless class AcknowledgeStreamMockEnvironment
This closes #7611.
---
.../tasks/AcknowledgeStreamMockEnvironment.java | 77 ----------------------
1 file changed, 77 deletions(-)
diff --git a/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/AcknowledgeStreamMockEnvironment.java b/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/AcknowledgeStreamMockEnvironment.java
deleted file mode 100644
index 8941cc1..0000000
--- a/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/AcknowledgeStreamMockEnvironment.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.flink.streaming.runtime.tasks;
-
-import org.apache.flink.api.common.ExecutionConfig;
-import org.apache.flink.configuration.Configuration;
-import org.apache.flink.core.testutils.OneShotLatch;
-import org.apache.flink.runtime.checkpoint.CheckpointMetrics;
-import org.apache.flink.runtime.checkpoint.TaskStateSnapshot;
-import org.apache.flink.runtime.operators.testutils.MockInputSplitProvider;
-import org.apache.flink.runtime.state.TaskStateManager;
-
-/**
- * Stream environment that allows to wait for checkpoint acknowledgement.
- */
-public class AcknowledgeStreamMockEnvironment extends StreamMockEnvironment {
- private final OneShotLatch checkpointLatch = new OneShotLatch();
- private volatile long checkpointId;
- private volatile TaskStateSnapshot checkpointStateHandles;
-
- public AcknowledgeStreamMockEnvironment(
- Configuration jobConfig,
- Configuration taskConfig,
- ExecutionConfig executionConfig,
- long memorySize,
- MockInputSplitProvider inputSplitProvider,
- int bufferSize,
- TaskStateManager taskStateManager) {
- super(
- jobConfig,
- taskConfig,
- executionConfig,
- memorySize,
- inputSplitProvider,
- bufferSize,
- taskStateManager);
- }
-
- public long getCheckpointId() {
- return checkpointId;
- }
-
- @Override
- public void acknowledgeCheckpoint(
- long checkpointId,
- CheckpointMetrics checkpointMetrics,
- TaskStateSnapshot checkpointStateHandles) {
-
- this.checkpointId = checkpointId;
- this.checkpointStateHandles = checkpointStateHandles;
- checkpointLatch.trigger();
- }
-
- public OneShotLatch getCheckpointLatch() {
- return checkpointLatch;
- }
-
- public TaskStateSnapshot getCheckpointStateHandles() {
- return checkpointStateHandles;
- }
-}