You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by "Kathy Sun (Code Review)" <ge...@cloudera.org> on 2016/07/18 23:55:22 UTC

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Kathy Sun has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/3664

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................

IMPALA-3716: Add Memory Tab in query's Details page

Add a QueryMemoryHandler and register it to memory tab's url
For inflight queries, show Memtracker output,
for completed queries, show Error message.

Testing:  Ran locally and looked at queries tab for
inflight and completed queries.

Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
---
M be/src/service/impala-http-handler.cc
M be/src/service/impala-http-handler.h
M www/query_detail_tabs.tmpl
3 files changed, 47 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/64/3664/1
-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Internal Jenkins (Code Review)" <ge...@cloudera.org>.
Internal Jenkins has submitted this change and it was merged.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


IMPALA-3716: Add Memory Tab in query's Details page

Add a QueryMemoryHandler and register it to memory tab's url
For inflight queries, show Memtracker output,
for completed queries and queries with no mem-tracker, e.g explain
queries, show Error message.

Testing:  Ran locally and looked at queries tab for
inflight and completed queries.

Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Reviewed-on: http://gerrit.cloudera.org:8080/3664
Reviewed-by: Henry Robinson <he...@cloudera.com>
Tested-by: Internal Jenkins
---
M be/src/service/impala-http-handler.cc
M be/src/service/impala-http-handler.h
M www/query_detail_tabs.tmpl
A www/query_memory.tmpl
4 files changed, 70 insertions(+), 1 deletion(-)

Approvals:
  Henry Robinson: Looks good to me, approved
  Internal Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 6
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Kathy Sun (Code Review)" <ge...@cloudera.org>.
Kathy Sun has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 2:

(4 comments)

> (4 comments)

Oops.. fixed them.

Tim, how could you even notice there is a space after a line...
Is there a code style detector or something like that?

http://gerrit.cloudera.org:8080/#/c/3664/2/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

PS2, Line 252: ince
> since
Done


PS2, Line 263: else
> need space before else
Done


http://gerrit.cloudera.org:8080/#/c/3664/1/be/src/service/impala-http-handler.h
File be/src/service/impala-http-handler.h:

PS1, Line 136:  
> Let's remove the extra whitespace at end of line.
Done


Line 138:     rapidjson::Document* output);
> We usually indent wrapped lines 4 spaces
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 2
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Kathy Sun (Code Review)" <ge...@cloudera.org>.
Kathy Sun has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3664/3/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

Line 264:       mem_usage_text = "The query is finished, current memory consumption is not available.";
> It looks like is more than 90 characters wide in gerrit.
Ohh!  I'll fix it. thx!


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 3
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Kathy Sun (Code Review)" <ge...@cloudera.org>.
Hello Tim Armstrong,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/3664

to look at the new patch set (#4).

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................

IMPALA-3716: Add Memory Tab in query's Details page

Add a QueryMemoryHandler and register it to memory tab's url
For inflight queries, show Memtracker output,
for completed queries, show Error message.

Testing:  Ran locally and looked at queries tab for
inflight and completed queries.

Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
---
M be/src/service/impala-http-handler.cc
M be/src/service/impala-http-handler.h
M www/query_detail_tabs.tmpl
A www/query_memory.tmpl
4 files changed, 70 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/64/3664/4
-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 4
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Kathy Sun (Code Review)" <ge...@cloudera.org>.
Hello Tim Armstrong,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/3664

to look at the new patch set (#5).

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................

IMPALA-3716: Add Memory Tab in query's Details page

Add a QueryMemoryHandler and register it to memory tab's url
For inflight queries, show Memtracker output,
for completed queries and queries with no mem-tracker, e.g explain
queries, show Error message.

Testing:  Ran locally and looked at queries tab for
inflight and completed queries.

Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
---
M be/src/service/impala-http-handler.cc
M be/src/service/impala-http-handler.h
M www/query_detail_tabs.tmpl
A www/query_memory.tmpl
4 files changed, 70 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/64/3664/5
-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 5
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Kathy Sun (Code Review)" <ge...@cloudera.org>.
Kathy Sun has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 3:

> (1 comment)
 > 
 > Gerrit shows the trailing whitespace in red for me.
 > 
 > I also have a vim plugin that highlights it: https://github.com/ntpeters/vim-better-whitespace

I think I didn't delete some code line by mistake... The program could run and result is right.

-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 3
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: No

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Kathy Sun (Code Review)" <ge...@cloudera.org>.
Kathy Sun has uploaded a new patch set (#3).

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................

IMPALA-3716: Add Memory Tab in query's Details page

Add a QueryMemoryHandler and register it to memory tab's url
For inflight queries, show Memtracker output,
for completed queries, show Error message.

Testing:  Ran locally and looked at queries tab for
inflight and completed queries.

Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
---
M be/src/service/impala-http-handler.cc
M be/src/service/impala-http-handler.h
M www/query_detail_tabs.tmpl
A www/query_memory.tmpl
4 files changed, 69 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/64/3664/3
-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 3
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/3664/3/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

Line 254:       lock_guard<mutex> l(*exec_state->lock(), adopt_lock_t());
Also there's 4 spaces indent here instead of 2.


Line 264:       mem_usage_text = "The query is finished, current memory consumption is not available.";
> Missed the long line here. Should be 90 characters or less.
4 spaces indent


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 3
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 3: Code-Review+1

-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 3
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: No

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 2:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/3664/1/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

PS1, Line 244: _str(), 
> I do think c_str() is needed. I remember removing it will have compile erro
Hmm, you're right, it looks like our version of rapidjson doesn't support string arguments.


http://gerrit.cloudera.org:8080/#/c/3664/2/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

PS2, Line 252: ince
since


PS2, Line 263: else
need space before else


http://gerrit.cloudera.org:8080/#/c/3664/2/be/src/service/impala-http-handler.h
File be/src/service/impala-http-handler.h:

Line 136:   // Returns memory usage for queries inflight. 
You missed fixing my comments in this file.


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 2
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Kathy Sun (Code Review)" <ge...@cloudera.org>.
Kathy Sun has uploaded a new patch set (#2).

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................

IMPALA-3716: Add Memory Tab in query's Details page

Add a QueryMemoryHandler and register it to memory tab's url
For inflight queries, show Memtracker output,
for completed queries, show Error message.

Testing:  Ran locally and looked at queries tab for
inflight and completed queries.

Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
---
M be/src/service/impala-http-handler.cc
M be/src/service/impala-http-handler.h
M www/query_detail_tabs.tmpl
A www/query_memory.tmpl
4 files changed, 69 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/64/3664/2
-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 2
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Henry Robinson (Code Review)" <ge...@cloudera.org>.
Henry Robinson has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3664/4/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

PS4, Line 263:      
> I think the indent is counted from the first letter of "else",
no, it's counted from the }, i.e. the first character on the previous line.


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 4
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Henry Robinson (Code Review)" <ge...@cloudera.org>.
Henry Robinson has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 1:

Is query_memory.tmpl missing from this patch? Don't forget to do this once:

  git add www/query_memory.tmpl

before committing.

-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: No

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Kathy Sun (Code Review)" <ge...@cloudera.org>.
Kathy Sun has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 3:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/3664/3/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

PS3, Line 249:                server_->GetQueryExecState(unique_id, true);
> indent by four chars only
Done


Line 254:       lock_guard<mutex> l(*exec_state->lock(), adopt_lock_t());
> Also there's 4 spaces indent here instead of 2.
Done


PS3, Line 256: const string& err = Substitute("Invalid query id: $0", PrintId(unique_id));
             :         Value json_error(err.c_str(), document->GetAllocator());
> When you click on this tab with a finished query, won't it just show the er
At current patch,
for finished query, there still is a tab, but will shows \u201cnot Available\u201dmessage in line 264.

More specifically,
if exec_state is destroyed, we can know query is finished.-- show a friendly message.
if exec_state is still active, but coordinator is NULL, I use the generic error message template, I'm not sure it's reasonable...


PS3, Line 254:     lock_guard<mutex> l(*exec_state->lock(), adopt_lock_t());
             :       if (exec_state->coord() == NULL) {
             :         const string& err = Substitute("Invalid query id: $0", PrintId(unique_id));
             :         Value json_error(err.c_str(), document->GetAllocator());
             :         document->AddMember("error", json_error, document->GetAllocator());
             :         return;
             :       }
             :       MemTracker* query_mem_tracker = exec_state->coord()->query_mem_tracker();
             :       mem_usage_text = query_mem_tracker->LogUsage();
> indentation should be two chars here
Done


Line 264:       mem_usage_text = "The query is finished, current memory consumption is not available.";
> 4 spaces indent
Done


Line 264:       mem_usage_text = "The query is finished, current memory consumption is not available.";
> Missed the long line here. Should be 90 characters or less.
Hi Tim, What do you mean by \u201cmiss the long line\u201d?


PS3, Line 270:       d
> fix indentation
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 3
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Henry Robinson (Code Review)" <ge...@cloudera.org>.
Henry Robinson has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 5: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 5
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: No

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Kathy Sun (Code Review)" <ge...@cloudera.org>.
Kathy Sun has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3664/4/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

PS4, Line 263:    me
> no, it's counted from the }, i.e. the first character on the previous line.
ohhh, I see! thx!


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 5
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 3:

(1 comment)

Gerrit shows the trailing whitespace in red for me.

I also have a vim plugin that highlights it: https://github.com/ntpeters/vim-better-whitespace

http://gerrit.cloudera.org:8080/#/c/3664/3/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

Line 264:       mem_usage_text = "The query is finished, current memory consumption is not available.";
Missed the long line here. Should be 90 characters or less.


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 3
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Henry Robinson (Code Review)" <ge...@cloudera.org>.
Henry Robinson has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/3664/4/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

PS4, Line 255: Invalid query id: $0"
This would be better as something like 

  "Query $0 does not have memory tracking information available".

The ID is not invalid but the query doesn't have the information you want.

And to my point on the last review round: this could happen for, for example, an EXPLAIN query. Why not just set mem_usage_text here and treat all error cases the same?


PS4, Line 263:      
indentation is 4 chars here and should be 2.


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 4
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3664/3/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

Line 264:       mem_usage_text = "The query is finished, current memory consumption is not available.";
> Hi Tim, What do you mean by \u201cmiss the long line\u201d?
It looks like is more than 90 characters wide in gerrit.


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 3
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Kathy Sun (Code Review)" <ge...@cloudera.org>.
Kathy Sun has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 1:

> Is query_memory.tmpl missing from this patch? Don't forget to do
 > this once:
 > 
 > git add www/query_memory.tmpl
 > 
 > before committing.

Oh, You are right.  Fix it.  Thanks Henry.

-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: No

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Henry Robinson (Code Review)" <ge...@cloudera.org>.
Henry Robinson has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 3:

(6 comments)

Looks pretty good, just one thing I think you could improve.

http://gerrit.cloudera.org:8080/#/c/3664/3/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

Line 31: #include "runtime/mem-tracker.h"
please order alphabetically (and fix up the other headers that are out of order:))


PS3, Line 249:                server_->GetQueryExecState(unique_id, true);
indent by four chars only


PS3, Line 256: const string& err = Substitute("Invalid query id: $0", PrintId(unique_id));
             :         Value json_error(err.c_str(), document->GetAllocator());
When you click on this tab with a finished query, won't it just show the error message without the tabs? If so, I think we can do better - instead of using the generic error message template, let's add a message saying "Memory information only available for running queries" and print that in an alert box under the tabs, i.e. special case it for this page.


PS3, Line 254:     lock_guard<mutex> l(*exec_state->lock(), adopt_lock_t());
             :       if (exec_state->coord() == NULL) {
             :         const string& err = Substitute("Invalid query id: $0", PrintId(unique_id));
             :         Value json_error(err.c_str(), document->GetAllocator());
             :         document->AddMember("error", json_error, document->GetAllocator());
             :         return;
             :       }
             :       MemTracker* query_mem_tracker = exec_state->coord()->query_mem_tracker();
             :       mem_usage_text = query_mem_tracker->LogUsage();
indentation should be two chars here


PS3, Line 270:       d
fix indentation


http://gerrit.cloudera.org:8080/#/c/3664/3/be/src/service/impala-http-handler.h
File be/src/service/impala-http-handler.h:

Line 136:   // Returns memory usage for queries inflight.
in flight


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 3
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Kathy Sun (Code Review)" <ge...@cloudera.org>.
Kathy Sun has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 1:

(10 comments)

I change most of them.
About this c_str() thing, I saw other part of code, they all have it.
I think it's better to leave it this way.

http://gerrit.cloudera.org:8080/#/c/3664/1/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

PS1, Line 242:  
> remove extra space
Done


PS1, Line 244: .c_str()
> I don't think the .c_str() is necessary. It looks like Value has a construc
I do think c_str() is needed. I remember removing it will have compile error.
Even if it's not...I think it's better to leave it this way, to be consistent with other handler method in this file...


PS1, Line 251:  = ""
> Don't need this initializer. The default value of a C++ string is "".
Done


Line 253:   // Search the in-flight queries
> Change the comment so it explains more "why". E.g. "Only in-flight queries 
Done


PS1, Line 258: const string&
> The type should be string, since we need to store the string somewhere (& w
these lines is also copied from others (same file: line 669).  Does it supposed to be just "string err = ......" ?


Line 259:         Value json_error(err.c_str(), document->GetAllocator());
> I don't think the .c_str() is necessary. It looks like Value has a construc
same as above c_str() problem


Line 267:   if (!is_inflight) {
> We can get rid of "is_inflight" and simplify the control flow by just doing
Done


PS1, Line 268: consumption
> I think we should rename this to mem_usage_text. I think we should be consi
Done


Line 271:   Value mem_usage(consumption.c_str(), document->GetAllocator());
> I don't think the .c_str() is necessary. It looks like Value has a construc
same as above


PS1, Line 273: .c_str()
> I'm not sure if the .c_str() is necessary here either.
same as above


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Kathy Sun (Code Review)" <ge...@cloudera.org>.
Kathy Sun has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 4:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/3664/4/be/src/service/impala-http-handler.cc
File be/src/service/impala-http-handler.cc:

PS4, Line 255: Invalid query id: $0"
> This would be better as something like 
Hmm... I saw it is handled as such in another function, so I just copied it to here. But yours makes more sense.
 I'll fix it. THX!


PS4, Line 263:      
> indentation is 4 chars here and should be 2.
I think the indent is counted from the first letter of "else",
so letter "m" in "mem_usage_test" is aligned with "s" in "else", isn't it?


-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 4
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-CR](cdh5-trunk) IMPALA-3716: Add Memory Tab in query's Details page

Posted by "Internal Jenkins (Code Review)" <ge...@cloudera.org>.
Internal Jenkins has posted comments on this change.

Change subject: IMPALA-3716: Add Memory Tab in query's Details page
......................................................................


Patch Set 5: Verified+1

-- 
To view, visit http://gerrit.cloudera.org:8080/3664
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I86db096ab7a022d230018becdb60bcc3056847af
Gerrit-PatchSet: 5
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Kathy Sun <ka...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-HasComments: No