You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/12/20 10:51:56 UTC

[GitHub] TisonKun commented on a change in pull request #7302: [FLINK-11156] [tests] Reconcile ZooKeeperCompletedCheckpointStoreMockitoTest with JDK 9

TisonKun commented on a change in pull request #7302: [FLINK-11156] [tests] Reconcile ZooKeeperCompletedCheckpointStoreMockitoTest with JDK 9
URL: https://github.com/apache/flink/pull/7302#discussion_r243229630
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStore.java
 ##########
 @@ -107,11 +108,27 @@
 	 * @throws Exception
 	 */
 	public ZooKeeperCompletedCheckpointStore(
-			int maxNumberOfCheckpointsToRetain,
-			CuratorFramework client,
-			String checkpointsPath,
-			RetrievableStateStorageHelper<CompletedCheckpoint> stateStorage,
-			Executor executor) throws Exception {
+		int maxNumberOfCheckpointsToRetain,
+		CuratorFramework client,
+		String checkpointsPath,
+		RetrievableStateStorageHelper<CompletedCheckpoint> stateStorage,
+		Executor executor) throws Exception {
+		this(maxNumberOfCheckpointsToRetain,
+			client,
+			checkpointsPath,
+			stateStorage,
+			executor,
+			null);
 
 Review comment:
   we don't initalize `this.client` in this constructor. and before construct `checkpointsInZooKeeper`, we need to adapt the client by 
   
   ```java
           // Ensure that the checkpoints path exists
   		client.newNamespaceAwareEnsurePath(checkpointsPath)
   				.ensure(client.getZookeeperClient());
   
   		// All operations will have the path as root
   		this.client = client.usingNamespace(client.getNamespace() + checkpointsPath);
   ```
   
   calling `this(...)` should be the first statement, I don't know how to do some initialization first and then call another constructor.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services