You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "dangshazi (via GitHub)" <gi...@apache.org> on 2023/02/03 07:29:16 UTC

[GitHub] [flink] dangshazi opened a new pull request, #21840: [FLINK-29481] Show jobType in webUI

dangshazi opened a new pull request, #21840:
URL: https://github.com/apache/flink/pull/21840

    This close #29481
   
   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   *Show jobType(runtime.execution-mode) in webUI for each job*
   
   
   ## Brief change log
   
   *As following:*
     - *Add `jobType` in `ExecutionConfig` & `ArchivedExecutionConfig`*
     - *Add `jobType` in webUI [job configuration tab]*
   
   
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] 1996fanrui commented on pull request #21840: [FLINK-29481] Show jobType in webUI

Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui commented on PR #21840:
URL: https://github.com/apache/flink/pull/21840#issuecomment-1420398438

   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] dangshazi commented on pull request #21840: [FLINK-29481] Show jobType in webUI

Posted by "dangshazi (via GitHub)" <gi...@apache.org>.
dangshazi commented on PR #21840:
URL: https://github.com/apache/flink/pull/21840#issuecomment-1423741398

   @xintongsong  Please help 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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] wanglijie95 commented on pull request #21840: [FLINK-29481] Show jobType in webUI

Posted by "wanglijie95 (via GitHub)" <gi...@apache.org>.
wanglijie95 commented on PR #21840:
URL: https://github.com/apache/flink/pull/21840#issuecomment-1432641020

   Hi @dangshazi, thanks for creating this PR. But I noticed that it will change the response body of REST API  [/jobs/:jobid/config](https://nightlies.apache.org/flink/flink-docs-master/docs/ops/rest_api/#jobs-jobid-config), it would be great if you could discuss it on mailing list.


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zhuzhurk commented on a diff in pull request #21840: [FLINK-29481] Show jobType in webUI

Posted by "zhuzhurk (via GitHub)" <gi...@apache.org>.
zhuzhurk commented on code in PR #21840:
URL: https://github.com/apache/flink/pull/21840#discussion_r1138368567


##########
flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java:
##########
@@ -123,7 +123,15 @@ public class ExecutionConfig implements Serializable, Archiveable<ArchivedExecut
             key("hidden.execution.mode")
                     .enumType(ExecutionMode.class)
                     .defaultValue(ExecutionMode.PIPELINED)
-                    .withDescription("Defines how data exchange happens - batch or pipelined");
+                    .withDescription(
+                            "Defines how data exchange happens "
+                                    + "- batch or pipelined(used in the deprecated DataSet API)");
+
+    private static final ConfigOption<String> JOB_TYPE =

Review Comment:
   `jobType` is an automatically derived property instead of a user setting. Therefore, I would not put it in `ExecutionConfig`.
   To achieve the goal to show jobType on the web UI, we can introduce `getJobType()` to `JobConfigInfo` and `AccessExecutionGraph`.



-- 
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: issues-unsubscribe@flink.apache.org

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


Re: [PR] [FLINK-29481] Show jobType in webUI [flink]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21840:
URL: https://github.com/apache/flink/pull/21840#issuecomment-2593616352

   This PR is being marked as stale since it has not had any activity in the last 180 days. 
   If you would like to keep this PR alive, please leave a comment asking for a review. 
   If the PR has merge conflicts, update it with the latest from the base branch.
   <p>
   If you are having difficulty finding a reviewer, please reach out to the 
   [community](https://flink.apache.org/what-is-flink/community/).
   <p>
   If this PR is no longer valid or desired, please feel free to close it. 
   If no activity occurs in the next 90 days, it will be automatically closed.


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] 1996fanrui commented on a diff in pull request #21840: [FLINK-29481] Show jobType in webUI

Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui commented on code in PR #21840:
URL: https://github.com/apache/flink/pull/21840#discussion_r1101113026


##########
flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java:
##########
@@ -541,10 +549,12 @@ public ExecutionConfig setExecutionRetryDelay(long executionRetryDelay) {
      * Sets the execution mode to execute the program. The execution mode defines whether data
      * exchanges are performed in a batch or on a pipelined manner.
      *
-     * <p>The default execution mode is {@link ExecutionMode#PIPELINED}.
-     *
+     * @deprecated This configuration is used in the deprecated DataSet API. The {@link
+     *     ExecutionConfig#setJobType(String)} sets execution runtime mode of job
+     *     <p>The default execution mode is {@link ExecutionMode#PIPELINED}.
      * @param executionMode The execution mode to use.
      */
+    @Deprecated

Review Comment:
   Add the `@Deprecated` for EXECUTION_MODE  should be a separate commit.
   
   You can take a look the `3. Separate Refactoring, Cleanup and Independent Changes` part of `Code Style and Quality Guide`[1].
   
   [1] https://flink.apache.org/contributing/code-style-and-quality-pull-requests.html#separate-refactoring-cleanup-and-independent-changes



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] flinkbot commented on pull request #21840: [FLINK-29481] Show jobType in webUI

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #21840:
URL: https://github.com/apache/flink/pull/21840#issuecomment-1415238407

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "c4e1123a4c629e8385c108a50b77ebf49986bc2c",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "c4e1123a4c629e8385c108a50b77ebf49986bc2c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c4e1123a4c629e8385c108a50b77ebf49986bc2c UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


Re: [PR] [FLINK-29481] Show jobType in webUI [flink]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21840:
URL: https://github.com/apache/flink/pull/21840#issuecomment-2771458803

   This PR has been closed since it has not had any activity in 120 days. 
   If you feel like this was a mistake, or you would like to continue working on it, 
   please feel free to re-open the PR and ask for a 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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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


Re: [PR] [FLINK-29481] Show jobType in webUI [flink]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #21840: [FLINK-29481] Show jobType in webUI
URL: https://github.com/apache/flink/pull/21840


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] 1996fanrui commented on a diff in pull request #21840: [FLINK-29481] Show jobType in webUI

Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui commented on code in PR #21840:
URL: https://github.com/apache/flink/pull/21840#discussion_r1101110410


##########
flink-core/src/main/java/org/apache/flink/api/common/ArchivedExecutionConfig.java:
##########
@@ -44,6 +45,11 @@ public class ArchivedExecutionConfig implements Serializable {
 
     public ArchivedExecutionConfig(ExecutionConfig ec) {
         executionMode = ec.getExecutionMode().name();
+        if (ec.getJobType() != null) {
+            jobType = ec.getJobType();
+        } else {
+            jobType = "UNKNOWN";

Review Comment:
   Is it possible for `ec.getJobType()` to be null?
   
   I see `ec.getJobType() = configuration.get(JOB_TYPE);`, and the default value of `JOB_TYPE` is `STREAMING`.



##########
flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java:
##########
@@ -541,10 +549,12 @@ public ExecutionConfig setExecutionRetryDelay(long executionRetryDelay) {
      * Sets the execution mode to execute the program. The execution mode defines whether data
      * exchanges are performed in a batch or on a pipelined manner.
      *
-     * <p>The default execution mode is {@link ExecutionMode#PIPELINED}.
-     *
+     * @deprecated This configuration is used in the deprecated DataSet API. The {@link
+     *     ExecutionConfig#setJobType(String)} sets execution runtime mode of job
+     *     <p>The default execution mode is {@link ExecutionMode#PIPELINED}.
      * @param executionMode The execution mode to use.
      */
+    @Deprecated

Review Comment:
   Add the `@Deprecated` for EXECUTION_MODE  should be a separate commit.
   
   You can take a look the commit part of `Code Style and Quality Guide`[1].
   
   [1] https://flink.apache.org/contributing/code-style-and-quality-pull-requests.html#separate-refactoring-cleanup-and-independent-changes



##########
flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/legacy/utils/ArchivedExecutionConfigBuilder.java:
##########
@@ -75,6 +81,7 @@ public ArchivedExecutionConfigBuilder setPeriodicMaterializeIntervalMillis(
     public ArchivedExecutionConfig build() {
         return new ArchivedExecutionConfig(
                 executionMode != null ? executionMode : ExecutionMode.PIPELINED.name(),
+                jobType != null ? jobType : "UNKNOWN",

Review Comment:
   If using the `UNKNOWN` as the default jobType here, why set `STREAMING` as the default value for `ConfigOption<String> JOB_TYPE`?



##########
flink-core/src/main/java/org/apache/flink/api/common/ArchivedExecutionConfig.java:
##########
@@ -68,7 +74,28 @@ public ArchivedExecutionConfig(
             boolean objectReuseEnabled,
             long periodicMaterializeIntervalMillis,
             Map<String, String> globalJobParameters) {
+        this(
+                executionMode,
+                "UNKNOW",
+                restartStrategyDescription,
+                maxParallelism,
+                parallelism,
+                objectReuseEnabled,
+                periodicMaterializeIntervalMillis,
+                globalJobParameters);
+    }
+
+    public ArchivedExecutionConfig(
+            String executionMode,
+            String jobType,
+            String restartStrategyDescription,
+            int maxParallelism,
+            int parallelism,
+            boolean objectReuseEnabled,
+            long periodicMaterializeIntervalMillis,
+            Map<String, String> globalJobParameters) {

Review Comment:
   Why do you add a constructor? could we reuse the last constructor and add the `String jobType`?



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] zhuzhurk commented on a diff in pull request #21840: [FLINK-29481] Show jobType in webUI

Posted by "zhuzhurk (via GitHub)" <gi...@apache.org>.
zhuzhurk commented on code in PR #21840:
URL: https://github.com/apache/flink/pull/21840#discussion_r1138368567


##########
flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java:
##########
@@ -123,7 +123,15 @@ public class ExecutionConfig implements Serializable, Archiveable<ArchivedExecut
             key("hidden.execution.mode")
                     .enumType(ExecutionMode.class)
                     .defaultValue(ExecutionMode.PIPELINED)
-                    .withDescription("Defines how data exchange happens - batch or pipelined");
+                    .withDescription(
+                            "Defines how data exchange happens "
+                                    + "- batch or pipelined(used in the deprecated DataSet API)");
+
+    private static final ConfigOption<String> JOB_TYPE =

Review Comment:
   `jobType` is an automatically derived property instead of a user setting. Therefore, I would not put it in `ExecutionConfig`.
   To achieve the goal to show jobType on the web UI, we can introduce a `jobType` to `JobConfigInfo` and `AccessExecutionGraph`.



-- 
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: issues-unsubscribe@flink.apache.org

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