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

Change subject: Adding simplistic parser for Impala profile logs.
......................................................................


Patch Set 2:

(2 comments)

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

PS2:
Optional: maybe call it parse-thrift-profile.py so it's more obvious what the 
input should be?


http://gerrit.cloudera.org:8080/#/c/9265/2/bin/parse-profile.py@36
PS2, Line 36: deserialize(tree, 
zlib.decompress(base64.b64decode(sys.stdin.read())),
Some tools (Cloudera Manager being one) produce profiles that are 
base64-encoded but not gzipped. Setting aside whether that's a bug in those 
tools, would it make sense to also handle them here? I suspect someone trying 
to use this tool will hit that sooner or later and be confused. It might be as 
simple as:

  try:
   uncompressed = zlib.decompress(data)
  except zlib.error:
   uncompressed = data

I get this error locally:
    tarmstrong@tarmstrong-box:~/Impala/incubator-impala$
    ./bin/parse-profile.py < ~/Downloads/profile.thrift
    Traceback (most recent call last):
    File "./bin/parse-profile.py", line 36, in <module>
    deserialize(tree, zlib.decompress(base64.b64decode(sys.stdin.read())),
  zlib.error: Error -3 while decompressing data: incorrect  header check



--
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: 2
Gerrit-Owner: Philip Zeyliger <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-Comment-Date: Wed, 14 Mar 2018 21:38:47 +0000
Gerrit-HasComments: Yes

Reply via email to