Skip to content

DRILL-5803: Show the hostname for each minor fragment in operator table#954

Closed
kkhatua wants to merge 1 commit intoapache:masterfrom
kkhatua:DRILL-5803
Closed

DRILL-5803: Show the hostname for each minor fragment in operator table#954
kkhatua wants to merge 1 commit intoapache:masterfrom
kkhatua:DRILL-5803

Conversation

@kkhatua
Copy link
Contributor

@kkhatua kkhatua commented Sep 22, 2017

Based on DRILL-4909, list hostnames for each minor fragment within an operator table to identify any problematic host

@kkhatua
Copy link
Contributor Author

kkhatua commented Sep 22, 2017

@paul-rogers Can you please review this minor UI update?

Copy link
Contributor

@paul-rogers paul-rogers left a comment

Choose a reason for hiding this comment

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

Nice feature! Very handy.
Key comment is a suggestion to simplify the implementation over the increasingly-convoluted lists-of-pairs implementation we use now.

final List<OperatorWrapper> ows = new ArrayList<>();
// temporary map to store (major_id, operator_id) -> [(op_profile, minor_id)]
final Map<ImmutablePair<Integer, Integer>, List<ImmutablePair<OperatorProfile, Integer>>> opmap = new HashMap<>();
// temporary map to store (major_id, operator_id) -> [minorFragHostname]
Copy link
Contributor

Choose a reason for hiding this comment

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

Effectively, what this is doing is converting the opmap from a map of immutable pairs to a map of immutable triples. About here, we might want to restructure the map to point to a class which holds the two elements in the first pair, plus the host name.

Why? Simpler. Easier to keep class fields in sync than to keep two separate lists in sync.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1 on this comment. However, I didn't what to make the PR look to radically alter what is already there. I'll incorporate the change. This should go nicely with a fix for DRILL-5802 and make life a bit easier

Based on DRILL-4909, list hostnames for each minor fragment within an operator table to identify any problematic host
@kkhatua
Copy link
Contributor Author

kkhatua commented Sep 26, 2017

@paul-rogers Made the changes

@paul-rogers
Copy link
Contributor

The fixes are an improvement. In some future commit, an actual class would be better than nested immutable pairs. At present, the code has become a bit cryptic and Python-like. But, we can do that improvement later.
+1

@asfgit asfgit closed this in dfd33e1 Oct 2, 2017
ilooner pushed a commit to ilooner/drill that referenced this pull request Oct 18, 2017
Based on DRILL-4909, list hostnames for each minor fragment within an operator table to identify any problematic host

closes apache#954
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants