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 2022/07/08 04:00:07 UTC

[GitHub] [flink] yangjunhan opened a new pull request, #20212: [FLINK-28314][runtime-web] introduce "Cluster Environment" tab under history server

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

   <!--
   *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
   
   Completed Job UI Enhancement based on FLIP-241 (https://cwiki.apache.org/confluence/display/FLINK/FLIP-241%3A+Completed+Jobs+Information+Enhancement) :
   
   - [FLINK-26207](https://issues.apache.org/jira/browse/FLINK-26207)
   - [FLINK-28314](https://issues.apache.org/jira/browse/FLINK-28314)
   
   
   ## Brief change log
   
   - Refactor runtime-web modules by depending on a common injecting config object interface (pre-requisite for this UI change)
   - Introduce "Cluster Environment" tab under history server
   
   ## 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, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? yes
     - 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.

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

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


[GitHub] [flink] yangjunhan commented on a diff in pull request #20212: [FLINK-28314][runtime-web] introduce "Cluster Environment" tab under history server

Posted by GitBox <gi...@apache.org>.
yangjunhan commented on code in PR #20212:
URL: https://github.com/apache/flink/pull/20212#discussion_r918794127


##########
flink-runtime-web/web-dashboard/src/app/share/common/configuration-cards/configuration-cards.component.html:
##########
@@ -0,0 +1,59 @@
+<!--
+  ~ 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.
+  -->
+
+<nz-card nzType="inner" [nzTitle]="title" [nzLoading]="loading">
+  <flink-table-display
+    *ngIf="configurations.length; else noDataTemplate"
+    [listOfData]="configurations"
+  ></flink-table-display>
+</nz-card>
+
+<nz-card nzType="inner" nzTitle="Environment" [nzLoading]="loading">
+  <flink-table-display
+    *ngIf="environmentInfo && environmentInfo.environment.length; else noDataTemplate"
+    [listOfData]="environmentInfo.environment"
+  ></flink-table-display>
+</nz-card>
+
+<nz-card nzType="inner" nzTitle="JVM" [nzLoading]="loading">
+  <flink-table-display
+    *ngIf="environmentInfo; else noDataTemplate"
+    [listOfData]="convertJVMToKV(environmentInfo.jvm)"
+  ></flink-table-display>
+</nz-card>
+
+<nz-card nzType="inner" nzTitle="ClassPaths" [nzLoading]="loading">

Review Comment:
   Yes, this looks fine to me.



-- 
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 #20212: [FLINK-28314][runtime-web] introduce "Cluster Environment" tab under history server

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "247628bfcf13dd6ecd1393abbd3cc552c3525231",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "247628bfcf13dd6ecd1393abbd3cc552c3525231",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 247628bfcf13dd6ecd1393abbd3cc552c3525231 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


[GitHub] [flink] yangjunhan commented on a diff in pull request #20212: [FLINK-28314][runtime-web] introduce "Cluster Environment" tab under history server

Posted by GitBox <gi...@apache.org>.
yangjunhan commented on code in PR #20212:
URL: https://github.com/apache/flink/pull/20212#discussion_r917495555


##########
flink-runtime-web/web-dashboard/src/app/app.component.html:
##########
@@ -58,29 +58,31 @@ <h1>Apache Flink Dashboard</h1>
           </li>
         </ul>
       </li>
-      <li nz-menu-item routerLinkActive="ant-menu-item-selected" [routerLink]="['/task-manager']">
-        <span>
-          <i nz-icon nzType="schedule"></i>
-          <span>Task Managers</span>
-        </span>
-      </li>
-      <li nz-menu-item routerLinkActive="ant-menu-item-selected" [routerLink]="['/job-manager']">
-        <span>
-          <i nz-icon nzType="build"></i>
-          <span>Job Manager</span>
-        </span>
-      </li>
-      <li
-        *ngIf="webSubmitEnabled"
-        nz-menu-item
-        routerLinkActive="ant-menu-item-selected"
-        [routerLink]="['/submit']"
-      >
-        <span>
-          <i nz-icon nzType="upload"></i>
-          <span>Submit New Job</span>
-        </span>
-      </li>
+      <ng-container *ngIf="!historyServerEnv">
+        <li nz-menu-item routerLinkActive="ant-menu-item-selected" [routerLink]="['/task-manager']">
+          <span>

Review Comment:
   The purpose of hiding these menu items is to make our pages cleaner because JM and TM are unavailable under History Server (just an improvement). It is unnecessary to create a route guard to prevent entering these pages which should display no meaningful data :)



-- 
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] xintongsong commented on a diff in pull request #20212: [FLINK-28314][runtime-web] introduce "Cluster Environment" tab under history server

Posted by GitBox <gi...@apache.org>.
xintongsong commented on code in PR #20212:
URL: https://github.com/apache/flink/pull/20212#discussion_r918783559


##########
flink-runtime-web/web-dashboard/src/app/share/common/configuration-cards/configuration-cards.component.html:
##########
@@ -0,0 +1,59 @@
+<!--
+  ~ 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.
+  -->
+
+<nz-card nzType="inner" [nzTitle]="title" [nzLoading]="loading">
+  <flink-table-display
+    *ngIf="configurations.length; else noDataTemplate"
+    [listOfData]="configurations"
+  ></flink-table-display>
+</nz-card>
+
+<nz-card nzType="inner" nzTitle="Environment" [nzLoading]="loading">
+  <flink-table-display
+    *ngIf="environmentInfo && environmentInfo.environment.length; else noDataTemplate"
+    [listOfData]="environmentInfo.environment"
+  ></flink-table-display>
+</nz-card>
+
+<nz-card nzType="inner" nzTitle="JVM" [nzLoading]="loading">
+  <flink-table-display
+    *ngIf="environmentInfo; else noDataTemplate"
+    [listOfData]="convertJVMToKV(environmentInfo.jvm)"
+  ></flink-table-display>
+</nz-card>
+
+<nz-card nzType="inner" nzTitle="ClassPaths" [nzLoading]="loading">

Review Comment:
   ```suggestion
   <nz-card nzType="inner" nzTitle="Classpath" [nzLoading]="loading">
   ```



-- 
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] yangjunhan commented on a diff in pull request #20212: [FLINK-28314][runtime-web] introduce "Cluster Environment" tab under history server

Posted by GitBox <gi...@apache.org>.
yangjunhan commented on code in PR #20212:
URL: https://github.com/apache/flink/pull/20212#discussion_r917495555


##########
flink-runtime-web/web-dashboard/src/app/app.component.html:
##########
@@ -58,29 +58,31 @@ <h1>Apache Flink Dashboard</h1>
           </li>
         </ul>
       </li>
-      <li nz-menu-item routerLinkActive="ant-menu-item-selected" [routerLink]="['/task-manager']">
-        <span>
-          <i nz-icon nzType="schedule"></i>
-          <span>Task Managers</span>
-        </span>
-      </li>
-      <li nz-menu-item routerLinkActive="ant-menu-item-selected" [routerLink]="['/job-manager']">
-        <span>
-          <i nz-icon nzType="build"></i>
-          <span>Job Manager</span>
-        </span>
-      </li>
-      <li
-        *ngIf="webSubmitEnabled"
-        nz-menu-item
-        routerLinkActive="ant-menu-item-selected"
-        [routerLink]="['/submit']"
-      >
-        <span>
-          <i nz-icon nzType="upload"></i>
-          <span>Submit New Job</span>
-        </span>
-      </li>
+      <ng-container *ngIf="!historyServerEnv">
+        <li nz-menu-item routerLinkActive="ant-menu-item-selected" [routerLink]="['/task-manager']">
+          <span>

Review Comment:
   The purpose of hiding these menu items is to make our pages cleaner because JM and TM are unavailable under History Server (just an improvement). It is unnecessary to create a route guard to prevent entering these pages which should display nothing :)



-- 
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] yangjunhan commented on pull request #20212: [FLINK-28314][runtime-web] introduce "Cluster Environment" tab under history server

Posted by GitBox <gi...@apache.org>.
yangjunhan commented on PR #20212:
URL: https://github.com/apache/flink/pull/20212#issuecomment-1179933831

   @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] xintongsong closed pull request #20212: [FLINK-28314][runtime-web] introduce "Cluster Environment" tab under history server

Posted by GitBox <gi...@apache.org>.
xintongsong closed pull request #20212: [FLINK-28314][runtime-web] introduce "Cluster Environment" tab under history server
URL: https://github.com/apache/flink/pull/20212


-- 
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] yangjunhan commented on pull request #20212: [FLINK-28314][runtime-web] introduce "Cluster Environment" tab under history server

Posted by GitBox <gi...@apache.org>.
yangjunhan commented on PR #20212:
URL: https://github.com/apache/flink/pull/20212#issuecomment-1178520078

   This PR includes UI changes regarding the [FLIP](https://cwiki.apache.org/confluence/display/FLINK/FLIP-241%3A+Completed+Jobs+Information+Enhancement). Could @simplejason help review this? Thanks!


-- 
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] simplejason commented on a diff in pull request #20212: [FLINK-28314][runtime-web] introduce "Cluster Environment" tab under history server

Posted by GitBox <gi...@apache.org>.
simplejason commented on code in PR #20212:
URL: https://github.com/apache/flink/pull/20212#discussion_r916494162


##########
flink-runtime-web/web-dashboard/src/app/app.component.html:
##########
@@ -58,29 +58,31 @@ <h1>Apache Flink Dashboard</h1>
           </li>
         </ul>
       </li>
-      <li nz-menu-item routerLinkActive="ant-menu-item-selected" [routerLink]="['/task-manager']">
-        <span>
-          <i nz-icon nzType="schedule"></i>
-          <span>Task Managers</span>
-        </span>
-      </li>
-      <li nz-menu-item routerLinkActive="ant-menu-item-selected" [routerLink]="['/job-manager']">
-        <span>
-          <i nz-icon nzType="build"></i>
-          <span>Job Manager</span>
-        </span>
-      </li>
-      <li
-        *ngIf="webSubmitEnabled"
-        nz-menu-item
-        routerLinkActive="ant-menu-item-selected"
-        [routerLink]="['/submit']"
-      >
-        <span>
-          <i nz-icon nzType="upload"></i>
-          <span>Submit New Job</span>
-        </span>
-      </li>
+      <ng-container *ngIf="!historyServerEnv">
+        <li nz-menu-item routerLinkActive="ant-menu-item-selected" [routerLink]="['/task-manager']">
+          <span>

Review Comment:
   nit: It's better to use CanActivate cancel the current navigation if users accesses these links under historyServerEnv, but even if not, there is no problem :)



-- 
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] simplejason commented on a diff in pull request #20212: [FLINK-28314][runtime-web] introduce "Cluster Environment" tab under history server

Posted by GitBox <gi...@apache.org>.
simplejason commented on code in PR #20212:
URL: https://github.com/apache/flink/pull/20212#discussion_r917598411


##########
flink-runtime-web/web-dashboard/src/app/pages/job/overview/backpressure/job-overview-drawer-backpressure.component.html:
##########
@@ -17,14 +17,17 @@
   -->
 
 <nz-table
-  class="no-border small full-height"
-  [nzSize]="'small'"
+  nzSize="small"
   [nzLoading]="isLoading"
   [nzData]="listOfSubTaskBackpressure"
-  [nzScroll]="{ y: 'calc( 100vh - 72px )' }"
+  [nzScroll]="{ y: 'calc( 100% - 90px )' }"
   [nzWidthConfig]="['33.33%', '33.33%', '33.33%']"
   [nzFrontPagination]="false"
   [nzShowPagination]="false"
+  [nzVirtualItemSize]="virtualItemSize"
+  [nzVirtualMinBufferPx]="300"

Review Comment:
   nit: Do we need a variable `virtualItemSize` to set the height? If we don't need to change it, it's better to set it with `[nzVirtualItemSize]="36"`.(Of course it's okay for me to keep it as it is)



##########
flink-runtime-web/web-dashboard/src/app/pages/job-manager/log-list/job-manager-log-list.component.ts:
##########
@@ -40,20 +46,38 @@ export class JobManagerLogListComponent implements OnInit {
 
   public listOfLog: JobManagerLogItem[] = [];
   public isLoading = true;
+  public height = 650;

Review Comment:
   Unused variable



##########
flink-runtime-web/web-dashboard/src/app/pages/task-manager/logs/task-manager-logs.component.ts:
##########
@@ -32,29 +35,30 @@ import { TaskManagerLocalService } from '../task-manager-local.service';
   changeDetection: ChangeDetectionStrategy.OnPush
 })
 export class TaskManagerLogsComponent implements OnInit, OnDestroy {
-  public readonly editorOptions: EditorOptions = flinkEditorOptions;
-
+  public editorOptions: EditorOptions;
   public logs = '';
   public loading = true;
-  public taskManagerDetail: TaskManagerDetail;
+  public taskManagerId: string;
+  public downloadUrl = '';
+  public downloadName = '';
 
   private readonly destroy$ = new Subject<void>();
 
   constructor(
     private readonly taskManagerService: TaskManagerService,
-    private readonly taskManagerLocalService: TaskManagerLocalService,
-    private readonly cdr: ChangeDetectorRef
-  ) {}
+    private readonly configService: ConfigService,
+    private activatedRoute: ActivatedRoute,
+    private readonly cdr: ChangeDetectorRef,
+    @Inject(TASK_MANAGER_MODULE_CONFIG) readonly moduleConfig: ModuleConfig
+  ) {
+    this.editorOptions = moduleConfig.editorOptions || TASK_MANAGER_MODULE_DEFAULT_CONFIG.editorOptions;
+  }
 
   public ngOnInit() {
-    this.taskManagerLocalService
-      .taskManagerDetailChanges()
-      .pipe(first(), takeUntil(this.destroy$))
-      .subscribe(data => {
-        this.taskManagerDetail = data;
-        this.reload();
-        this.cdr.markForCheck();
-      });
+    this.taskManagerId = this.activatedRoute.parent!.snapshot.params.taskManagerId;
+    this.downloadUrl = `${this.configService.BASE_URL}taskmanagers/${this.taskManagerId}/log`;

Review Comment:
   ```diff
   // slash added before `taskmanagers`
   -${this.configService.BASE_URL}taskmanagers/${this.taskManagerId}/log
   +${this.configService.BASE_URL}/taskmanagers/${this.taskManagerId}/log
   ```
   



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