You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/09/20 08:17:54 UTC

[GitHub] [inlong] yunqingmoswu opened a new pull request, #5960: [INLONG-5955][Sort] Support metric state recovery for hbase

yunqingmoswu opened a new pull request, #5960:
URL: https://github.com/apache/inlong/pull/5960

   ### Prepare a Pull Request
   *(Change the title refer to the following example)*
   
   Title: [INLONG-5955][Sort] Support metric state recovery for hbase
   
   *(The following *XYZ* should be replaced by the actual [GitHub Issue](https://github.com/apache/inlong/issues) number)*
   
   Fixes #5955
   
   ### Motivation
   
   Support metric state recovery for hbase
   
   ### Modifications
   
   Update HBaseSinkFunction to support metric state recovery
   
   ### Verifying this change
   
   *(Please pick either of the following options)*
   
   - [ ] This change is a trivial rework/code cleanup without any test coverage.
   
   - [x] This change is already covered by existing tests, such as:
     *(please describe tests)*
   
   - [ ] This change added tests and can be verified as follows:
   
     *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #5960: [INLONG-5955][Sort] Support metric state recovery for hbase

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #5960:
URL: https://github.com/apache/inlong/pull/5960#discussion_r975036580


##########
inlong-sort/sort-connectors/hbase/src/main/java/org/apache/inlong/sort/hbase/sink/HBaseSinkFunction.java:
##########
@@ -290,11 +303,26 @@ public void snapshotState(FunctionSnapshotContext context) throws Exception {
         while (numPendingRequests.get() != 0) {
             flush();
         }
+        if (sinkMetricData != null && metricStateListState != null) {
+            MetricStateUtils.snapshotMetricStateForSinkMetricData(metricStateListState, sinkMetricData,
+                    getRuntimeContext().getIndexOfThisSubtask());
+        }
     }
 
     @Override
     public void initializeState(FunctionInitializationContext context) throws Exception {
         // nothing to do.

Review Comment:
   This comment seems not needed.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] dockerzhang merged pull request #5960: [INLONG-5955][Sort] Support metric state recovery for HBase

Posted by GitBox <gi...@apache.org>.
dockerzhang merged PR #5960:
URL: https://github.com/apache/inlong/pull/5960


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] yunqingmoswu commented on a diff in pull request #5960: [INLONG-5955][Sort] Support metric state recovery for HBase

Posted by GitBox <gi...@apache.org>.
yunqingmoswu commented on code in PR #5960:
URL: https://github.com/apache/inlong/pull/5960#discussion_r975048388


##########
inlong-sort/sort-connectors/hbase/src/main/java/org/apache/inlong/sort/hbase/sink/HBaseSinkFunction.java:
##########
@@ -290,11 +303,26 @@ public void snapshotState(FunctionSnapshotContext context) throws Exception {
         while (numPendingRequests.get() != 0) {
             flush();
         }
+        if (sinkMetricData != null && metricStateListState != null) {
+            MetricStateUtils.snapshotMetricStateForSinkMetricData(metricStateListState, sinkMetricData,
+                    getRuntimeContext().getIndexOfThisSubtask());
+        }
     }
 
     @Override
     public void initializeState(FunctionInitializationContext context) throws Exception {
         // nothing to do.

Review Comment:
   done



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org