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 2020/12/15 17:31:01 UTC

[GitHub] [flink] Myasuka opened a new pull request #14394: [FLINK-19013][state-backends] Add start/end logs for state restoration

Myasuka opened a new pull request #14394:
URL: https://github.com/apache/flink/pull/14394


   ## What is the purpose of the change
   
   Add start/end logs for state restoration so that users could know when the state restoration is finished.
   
   
   ## Brief change log
   
     -  Add logs for RocksDB full/incremental restoration.
     -  Add logs for heap full/incremental restoration.
   
   
   ## Verifying this change
   This change is a trivial rework / code cleanup without any test coverage.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [flink] flinkbot commented on pull request #14394: [FLINK-19013][state-backends] Add start/end logs for state restoration

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14394:
URL: https://github.com/apache/flink/pull/14394#issuecomment-745451922


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "95f0ec70e5ded62603dcde72a4eac42ea1116b02",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "95f0ec70e5ded62603dcde72a4eac42ea1116b02",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 95f0ec70e5ded62603dcde72a4eac42ea1116b02 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [flink] flinkbot edited a comment on pull request #14394: [FLINK-19013][state-backends] Add start/end logs for state restoration

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14394:
URL: https://github.com/apache/flink/pull/14394#issuecomment-745451922


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "95f0ec70e5ded62603dcde72a4eac42ea1116b02",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10902",
       "triggerID" : "95f0ec70e5ded62603dcde72a4eac42ea1116b02",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 95f0ec70e5ded62603dcde72a4eac42ea1116b02 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10902) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [flink] flinkbot commented on pull request #14394: [FLINK-19013][state-backends] Add start/end logs for state restoration

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14394:
URL: https://github.com/apache/flink/pull/14394#issuecomment-745446671


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 95f0ec70e5ded62603dcde72a4eac42ea1116b02 (Tue Dec 15 17:33:38 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [flink] flinkbot edited a comment on pull request #14394: [FLINK-19013][state-backends] Add start/end logs for state restoration

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14394:
URL: https://github.com/apache/flink/pull/14394#issuecomment-745451922


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "95f0ec70e5ded62603dcde72a4eac42ea1116b02",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10902",
       "triggerID" : "95f0ec70e5ded62603dcde72a4eac42ea1116b02",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 95f0ec70e5ded62603dcde72a4eac42ea1116b02 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10902) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [flink] Myasuka commented on pull request #14394: [FLINK-19013][state-backends] Add start/end logs for state restoration

Posted by GitBox <gi...@apache.org>.
Myasuka commented on pull request #14394:
URL: https://github.com/apache/flink/pull/14394#issuecomment-747281255


   @rmetzger , thanks for your kind review!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [flink] Myasuka merged pull request #14394: [FLINK-19013][state-backends] Add start/end logs for state restoration

Posted by GitBox <gi...@apache.org>.
Myasuka merged pull request #14394:
URL: https://github.com/apache/flink/pull/14394


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [flink] rmetzger commented on a change in pull request #14394: [FLINK-19013][state-backends] Add start/end logs for state restoration

Posted by GitBox <gi...@apache.org>.
rmetzger commented on a change in pull request #14394:
URL: https://github.com/apache/flink/pull/14394#discussion_r544037229



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapRestoreOperation.java
##########
@@ -164,6 +169,7 @@ public Void restore() throws Exception {
 					kvStatesById, restoredMetaInfos.size(),
 					serializationProxy.getReadVersion(),
 					serializationProxy.isUsingKeyGroupCompression());
+				LOG.info("Finish to restore from state handle: {}.", keyedStateHandle);

Review comment:
       ```suggestion
   				LOG.info("Finished restoring from state handle: {}.", keyedStateHandle);
   ```

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapKeyedStateBackendBuilder.java
##########
@@ -112,6 +112,7 @@ public HeapKeyedStateBackendBuilder(
 			keyContext);
 		try {
 			restoreOperation.restore();
+			logger.info("Finish to build heap keyed state-backend.");

Review comment:
       ```suggestion
   			logger.info("Finished to build heap keyed state-backend.");
   ```

##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBFullRestoreOperation.java
##########
@@ -162,11 +162,13 @@ public RocksDBRestoreResult restore()
 	private void restoreKeyGroupsInStateHandle()
 		throws IOException, StateMigrationException, RocksDBException {
 		try {
+			logger.info("Start to restore from state handle: {}.", currentKeyGroupsStateHandle);
 			currentStateHandleInStream = currentKeyGroupsStateHandle.openInputStream();
 			cancelStreamRegistry.registerCloseable(currentStateHandleInStream);
 			currentStateHandleInView = new DataInputViewStreamWrapper(currentStateHandleInStream);
 			restoreKVStateMetaData();
 			restoreKVStateData();
+			logger.info("Finish to restore from state handle: {}.", currentKeyGroupsStateHandle);

Review comment:
       ```suggestion
   			logger.info("Finished restoring from state handle: {}.", currentKeyGroupsStateHandle);
   ```

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapRestoreOperation.java
##########
@@ -122,6 +126,7 @@ public Void restore() throws Exception {
 				throw unexpectedStateHandleException(KeyGroupsStateHandle.class, keyedStateHandle.getClass());
 			}
 
+			LOG.info("Start to restore from state handle: {}.", keyedStateHandle);

Review comment:
       ```suggestion
   			LOG.info("Starting to restore from state handle: {}.", keyedStateHandle);
   ```

##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackendBuilder.java
##########
@@ -317,21 +314,22 @@ private static void checkAndCreateDirectory(File directory) throws IOException {
 			try {
 				FileUtils.deleteDirectory(instanceBasePath);
 			} catch (Exception ex) {
-				LOG.warn("Failed to instance base path for RocksDB: " + instanceBasePath, ex);
+				logger.warn("Failed to instance base path for RocksDB: " + instanceBasePath, ex);

Review comment:
       ```suggestion
   				logger.warn("Failed to delete base path for RocksDB: " + instanceBasePath, ex);
   ```
   
   Not sure, maybe I don't understand what the code is doing here.

##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackendBuilder.java
##########
@@ -317,21 +314,22 @@ private static void checkAndCreateDirectory(File directory) throws IOException {
 			try {
 				FileUtils.deleteDirectory(instanceBasePath);
 			} catch (Exception ex) {
-				LOG.warn("Failed to instance base path for RocksDB: " + instanceBasePath, ex);
+				logger.warn("Failed to instance base path for RocksDB: " + instanceBasePath, ex);
 			}
 			// Log and rethrow
 			if (e instanceof BackendBuildingException) {
 				throw (BackendBuildingException) e;
 			} else {
 				String errMsg = "Caught unexpected exception.";
-				LOG.error(errMsg, e);
+				logger.error(errMsg, e);
 				throw new BackendBuildingException(errMsg, e);
 			}
 		}
 		InternalKeyContext<K> keyContext = new InternalKeyContextImpl<>(
 			keyGroupRange,
 			numberOfKeyGroups
 		);
+		logger.info("Finish to build RocksDB keyed state-backend at {}.", instanceBasePath);

Review comment:
       ```suggestion
   		logger.info("Finished building RocksDB keyed state-backend at {}.", instanceBasePath);
   ```

##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java
##########
@@ -330,6 +330,7 @@ private void restoreWithRescaling(Collection<KeyedStateHandle> restoreStateHandl
 						}
 					} // releases native iterator resources
 				}
+				logger.info("Finish to restore from state handle: {} with rescaling.", rawStateHandle);

Review comment:
       ```suggestion
   				logger.info("Finished restoring from state handle: {} with rescaling.", rawStateHandle);
   ```

##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBFullRestoreOperation.java
##########
@@ -162,11 +162,13 @@ public RocksDBRestoreResult restore()
 	private void restoreKeyGroupsInStateHandle()
 		throws IOException, StateMigrationException, RocksDBException {
 		try {
+			logger.info("Start to restore from state handle: {}.", currentKeyGroupsStateHandle);

Review comment:
       ```suggestion
   			logger.info("Starting to restore from state handle: {}.", currentKeyGroupsStateHandle);
   ```

##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java
##########
@@ -295,6 +294,7 @@ private void restoreWithRescaling(Collection<KeyedStateHandle> restoreStateHandl
 				throw unexpectedStateHandleException(IncrementalRemoteKeyedStateHandle.class, rawStateHandle.getClass());
 			}
 
+			logger.info("Start to restore from state handle: {} with rescaling.", rawStateHandle);

Review comment:
       ```suggestion
   			logger.info("Starting to restore from state handle: {} with rescaling.", rawStateHandle);
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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