Philip Zeyliger has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9265 )

Change subject: IMPALA-6913: Simple parser for Impala profile logs.
......................................................................


Patch Set 3:

(2 comments)

I added a tiny bit of cmdline parsing to allow specifying input not via stdin. 
I added this as I was looking at the exception handling and decided to keep it.

http://gerrit.cloudera.org:8080/#/c/9265/3/bin/parse-thrift-profile.py
File bin/parse-thrift-profile.py:

http://gerrit.cloudera.org:8080/#/c/9265/3/bin/parse-thrift-profile.py@60
PS3, Line 60:     thrift = possibly_compressed
> nit: Check for specific error code Z_DATA_ERROR, else raise?
I couldn't find anything in the documentation that was particularly clear.

Here's what you can get at :

(Pdb) p e.args
('Error -3 while decompressing data: incorrect header check',)
(Pdb) p e.message
'Error -3 while decompressing data: incorrect header check'

I don't think there's much value in being more clever here; either it'll parse 
as Thrift or it won't.


http://gerrit.cloudera.org:8080/#/c/9265/3/bin/parse-thrift-profile.py@65
PS3, Line 65:   print tree
> How about printing a JSON instead? That is more readable.
Do you have a snippet that would do the trick? I wasn't able to find one 
quickly.

This serves the purpose I have for it, namely looking through the profile logs 
from tests to find queries. Future work may extend this.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib1174c65b002f9b71eccb0b56f875449f00eae39
Gerrit-Change-Number: 9265
Gerrit-PatchSet: 3
Gerrit-Owner: Philip Zeyliger <[email protected]>
Gerrit-Reviewer: Bharath Vissapragada <[email protected]>
Gerrit-Reviewer: Philip Zeyliger <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-Comment-Date: Tue, 24 Apr 2018 17:23:20 +0000
Gerrit-HasComments: Yes

Reply via email to