Skip to content

Web-console: update supervisors table#7799

Merged
clintropolis merged 20 commits intoapache:masterfrom
implydata:update-supervisors-table
Jun 11, 2019
Merged

Web-console: update supervisors table#7799
clintropolis merged 20 commits intoapache:masterfrom
implydata:update-supervisors-table

Conversation

@mcbrewster
Copy link
Copy Markdown
Contributor

@mcbrewster mcbrewster commented May 30, 2019

Screen Shot 2019-06-09 at 7 41 21 PM

Changes status to show detailed status and the color indicator now reflects the health status of the supervisor.

Copy link
Copy Markdown
Member

@clintropolis clintropolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat 👍

Note that this PR should not be merged until #7428 is merged.

}
}

function detailedStatusToColor(status: string): string {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think coloring should be probably tied to status instead of detailedStatus, as detailedStatus is messaging specific to the type of supervisor, and 'status' is intended to be universal. Values are:

    UNHEALTHY_SUPERVISOR
    UNHEALTHY_TASKS
    PENDING
    RUNNING
    SUSPENDED
    STOPPING

See https://github.com/apache/incubator-druid/pull/7428/files#diff-290822ceec7682a31578278f881dad70R58

To me it probably makes sense to use 'status' to set the color, but maybe display the detailed messaging?

@gianm gianm added the WIP label Jun 4, 2019
@gianm
Copy link
Copy Markdown
Contributor

gianm commented Jun 4, 2019

Marking as WIP - current thinking is for performance reasons it may make sense to implement this on top of #7007, which doesn't exist yet.

@clintropolis
Copy link
Copy Markdown
Member

As a more near term fix while we wait for #7007 to be in place, I've opened #7839 which at least allows fetching the list of supervisors in a way that includes the 'state', 'detailedState', and 'health' information added by #7428, without the full overhead of getting a supervisor status report. The information visible will have to be cut down from the current form of this PR (no partition count, replica count, lag metric), but the important/high utility bit of displaying the supervisor status and health will be available.

@vogievetsky
Copy link
Copy Markdown
Contributor

@mcbrewster could you please re-orient this PR to be around #7839 and not to do an API call per supervisor to populate the supervisors table?

import './tasks-view.scss';

const supervisorTableColumns: string[] = ['Datasource', 'Type', 'Topic/Stream', 'Status', ActionCell.COLUMN_LABEL];
const supervisorTableColumns: string[] = ['Datasource', 'Type', 'Topic/Stream', 'Detailed status', ActionCell.COLUMN_LABEL];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a reason to change the column name, in the API the new field is detailedStatus because status is already there but as far as the user is concerned it is the same thing (just more detailed)

processQuery: async (query: string) => {
const resp = await axios.get('/druid/indexer/v1/supervisor?full');
const data = resp.data;
data.forEach( async (item: any ) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I though the whole point was not to have a query per row of the table, use only the info from /druid/indexer/v1/supervisor?full

if (!data) return '';
const { payload } = data;
if (!payload) return '';
const value = payload.detailedState;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol check out deepGet

return <span>
<span
style={{ color: value === 'Suspended' ? '#d58512' : '#2167d5' }}
style={{ color: payload.healthy ? '#2167d5' : '#d5100a'}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surely there are more statuses (and thus more colors) now. How does healthy relate to detailed status?

const value = row.value;
width: 300,
accessor: (row) => {
console.log(row);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log

Also

I think accessor should not return a react element but a string
Save the rendering for the Cell

@gianm gianm removed the WIP label Jun 11, 2019
@vogievetsky
Copy link
Copy Markdown
Contributor

This looks great 👍

Copy link
Copy Markdown
Member

@clintropolis clintropolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks 👍

@clintropolis clintropolis merged commit 0763585 into apache:master Jun 11, 2019
@clintropolis clintropolis deleted the update-supervisors-table branch June 11, 2019 20:06
jihoonson pushed a commit to implydata/druid-public that referenced this pull request Jun 26, 2019
* add new columns

* fix syling

* fix spaces

* update snapshots

* fix Spelling

* fix capitalization

* reorder action dialog

* set color using state

* fix snapshots

* fix array

* update snapshots

* remove extra columns

* update snapshots

* update snapshots

* fixes

* update snapshots

* use cell

* fix spacing

* update snapshot
gianm pushed a commit to implydata/druid-public that referenced this pull request Jul 4, 2019
* add new columns

* fix syling

* fix spaces

* update snapshots

* fix Spelling

* fix capitalization

* reorder action dialog

* set color using state

* fix snapshots

* fix array

* update snapshots

* remove extra columns

* update snapshots

* update snapshots

* fixes

* update snapshots

* use cell

* fix spacing

* update snapshot
@clintropolis clintropolis added this to the 0.16.0 milestone Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants