You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/06/27 15:51:10 UTC

[GitHub] [hadoop-ozone] runitao opened a new pull request #1136: HDDS-3798. Collect more info about DN in recon web

runitao opened a new pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136


   ## What changes were proposed in this pull request?
   
   Add datanode version and setup time in recon web.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-3798
   
   ## How was this patch tested?
   
   ![image](https://user-images.githubusercontent.com/3263540/85926286-07fe3f80-b8d1-11ea-8eca-0029d3cd6c8e.png)
   
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] vivekratnavel commented on a change in pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
vivekratnavel commented on a change in pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#discussion_r449914992



##########
File path: hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx
##########
@@ -201,14 +254,23 @@ export class Datanodes extends React.Component<Record<string, object>, IDatanode
           storageRemaining: datanode.storageReport.remaining,
           pipelines: datanode.pipelines,
           containers: datanode.containers,
-          leaderCount: datanode.leaderCount
+          leaderCount: datanode.leaderCount,
+          version: datanode.version,
+          setupTime: datanode.setupTime
         };
       });
+      const selectedColumns: IOption[] = COLUMNS.filter(column => column.isVisible).map(column => ({
+        label: column.key,
+        value: column.key
+      }))
+      
       this.setState({
         loading: false,
         dataSource,
         totalCount,
-        lastUpdated: Number(moment())
+        lastUpdated: Number(moment()),

Review comment:
       nit: dangling comma
   ```suggestion
           lastUpdated: Number(moment())
   ```

##########
File path: hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx
##########
@@ -233,20 +295,48 @@ export class Datanodes extends React.Component<Record<string, object>, IDatanode
   };
 
   render() {
-    const {dataSource, loading, totalCount, lastUpdated} = this.state;
+    const {dataSource, loading, totalCount, lastUpdated, selectedColumns, columnOptions} = this.state;
     const paginationConfig: PaginationConfig = {
       showTotal: (total: number, range) => `${range[0]}-${range[1]} of ${total} datanodes`,
       showSizeChanger: true,
       onShowSizeChange: this.onShowSizeChange
     };
     return (
-      <div className='datanodes-container'>
-        <div className='page-header'>
+      <div className="datanodes-container">
+        <div className="page-header">
           Datanodes ({totalCount})
-          <AutoReloadPanel isLoading={loading} lastUpdated={lastUpdated} togglePolling={this.autoReload.handleAutoReloadToggle} onReload={this._loadData}/>
+          <div className="filter-block">
+            <MultiSelect
+              maxShowValues={3}
+              allowSelectAll
+              isMulti
+              className="multi-select-container"
+              options={columnOptions}
+              closeMenuOnSelect={false}
+              hideSelectedOptions={false}
+              value={selectedColumns}
+              allOption={allColumnsOption}
+              onChange={this._handleColumnChange}
+            /> Columns
+          </div>
+          <AutoReloadPanel
+            isLoading={loading}
+            lastUpdated={lastUpdated}
+            togglePolling={this.autoReload.handleAutoReloadToggle}
+            onReload={this._loadData}
+          />
         </div>
-        <div className='content-div'>
-          <Table dataSource={dataSource} columns={COLUMNS} loading={loading} pagination={paginationConfig} rowKey='hostname'/>
+
+        <div className="content-div">
+          <Table
+            dataSource={dataSource}
+            columns={COLUMNS.filter((column) =>
+              selectedColumns.some((e) => e.label === column.key)

Review comment:
       nit: compare value instead of label
   ```suggestion
                 selectedColumns.some((e) => e.value === column.key)
   ```




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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runitao commented on pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
runitao commented on pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#issuecomment-653856489


   @vivekratnavel PTAL, 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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runitao commented on pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
runitao commented on pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#issuecomment-653469053


   Thanks @vivekratnavel for review, I will add the button.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] maobaolong commented on pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
maobaolong commented on pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#issuecomment-650678844


   @runitao That's wonderful, but you should fix the checkstyle issue first.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runitao commented on a change in pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
runitao commented on a change in pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#discussion_r449952674



##########
File path: hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx
##########
@@ -233,20 +295,48 @@ export class Datanodes extends React.Component<Record<string, object>, IDatanode
   };
 
   render() {
-    const {dataSource, loading, totalCount, lastUpdated} = this.state;
+    const {dataSource, loading, totalCount, lastUpdated, selectedColumns, columnOptions} = this.state;
     const paginationConfig: PaginationConfig = {
       showTotal: (total: number, range) => `${range[0]}-${range[1]} of ${total} datanodes`,
       showSizeChanger: true,
       onShowSizeChange: this.onShowSizeChange
     };
     return (
-      <div className='datanodes-container'>
-        <div className='page-header'>
+      <div className="datanodes-container">
+        <div className="page-header">
           Datanodes ({totalCount})
-          <AutoReloadPanel isLoading={loading} lastUpdated={lastUpdated} togglePolling={this.autoReload.handleAutoReloadToggle} onReload={this._loadData}/>
+          <div className="filter-block">
+            <MultiSelect
+              maxShowValues={3}
+              allowSelectAll
+              isMulti
+              className="multi-select-container"
+              options={columnOptions}
+              closeMenuOnSelect={false}
+              hideSelectedOptions={false}
+              value={selectedColumns}
+              allOption={allColumnsOption}
+              onChange={this._handleColumnChange}
+            /> Columns
+          </div>
+          <AutoReloadPanel
+            isLoading={loading}
+            lastUpdated={lastUpdated}
+            togglePolling={this.autoReload.handleAutoReloadToggle}
+            onReload={this._loadData}
+          />
         </div>
-        <div className='content-div'>
-          <Table dataSource={dataSource} columns={COLUMNS} loading={loading} pagination={paginationConfig} rowKey='hostname'/>
+
+        <div className="content-div">
+          <Table
+            dataSource={dataSource}
+            columns={COLUMNS.filter((column) =>
+              selectedColumns.some((e) => e.label === column.key)

Review comment:
       fixed




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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runitao commented on pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
runitao commented on pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#issuecomment-653979968


   Thanks @vivekratnavel for review. The "yarn run lint:fix" is awesome.
   Please take a look again, 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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runitao commented on pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
runitao commented on pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#issuecomment-657339135


   @avijayanhwx Would you please help me review this PR?


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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] vivekratnavel merged pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
vivekratnavel merged pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136


   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runitao commented on pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
runitao commented on pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#issuecomment-656039299


   ```
   [ERROR] Failures: 
   [ERROR]   TestBlockOutputStreamFlushDelay.testFullBufferCondition:582 expected:<11> but was:<13>
   ```
   I think this failure case is unrelated with my PR.
   
   Please help me trigger CI again


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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] vivekratnavel commented on pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
vivekratnavel commented on pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#issuecomment-650940943


   @runitao Thanks for the patch! Can we make these two columns optional? We can have a "show/hide columns" button to have a multi-select dropdown and make these two columns not display by default. The users can then choose which columns to show/hide. I don't like adding lots of columns without an option to hide some of them to give more space to most used columns.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runitao commented on a change in pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
runitao commented on a change in pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#discussion_r449952640



##########
File path: hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/datanodes/datanodes.tsx
##########
@@ -201,14 +254,23 @@ export class Datanodes extends React.Component<Record<string, object>, IDatanode
           storageRemaining: datanode.storageReport.remaining,
           pipelines: datanode.pipelines,
           containers: datanode.containers,
-          leaderCount: datanode.leaderCount
+          leaderCount: datanode.leaderCount,
+          version: datanode.version,
+          setupTime: datanode.setupTime
         };
       });
+      const selectedColumns: IOption[] = COLUMNS.filter(column => column.isVisible).map(column => ({
+        label: column.key,
+        value: column.key
+      }))
+      
       this.setState({
         loading: false,
         dataSource,
         totalCount,
-        lastUpdated: Number(moment())
+        lastUpdated: Number(moment()),

Review comment:
       fixed




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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runitao edited a comment on pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
runitao edited a comment on pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#issuecomment-653979968


   Thanks @vivekratnavel for review. The `yarn run lint:fix` is awesome.
   Please take a look again, 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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] maobaolong commented on pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
maobaolong commented on pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#issuecomment-653707377


   @runitao hope to see this feature in the recent release.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] vivekratnavel commented on pull request #1136: HDDS-3798. Collect more info about DN in recon web

Posted by GitBox <gi...@apache.org>.
vivekratnavel commented on pull request #1136:
URL: https://github.com/apache/hadoop-ozone/pull/1136#issuecomment-658351118


   @runitao Thanks for working on this! I have merged the change.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org