impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Zeyliger (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-6070: Parallel compute table stats.py
Date Mon, 23 Oct 2017 18:42:01 GMT
Philip Zeyliger has posted comments on this change. ( http://gerrit.cloudera.org:8080/8354
)

Change subject: IMPALA-6070: Parallel compute_table_stats.py
......................................................................


Patch Set 3:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/8354/2/tests/util/compute_table_stats.py
File tests/util/compute_table_stats.py:

http://gerrit.cloudera.org:8080/#/c/8354/2/tests/util/compute_table_stats.py@44
PS2, Line 44:       if not continue_on_error: raise e
> Two nits: even though we tend to do this a lot, PEP 8 frowns on inline if s
Sure; fixed.

(This was pre-existing.)


http://gerrit.cloudera.org:8080/#/c/8354/2/tests/util/compute_table_stats.py@48
PS2, Line 48: 
> I'm curious -- why is it necessary to define the client factory inside of t
It's a closure. Doing it inline in the main block lets the closure access options.impalad,
and so on. Obviously, you could create a class, which takes as init parameters all the options,
and then make this a class method. Or you could use globals.

I've not changed anything here.


http://gerrit.cloudera.org:8080/#/c/8354/2/tests/util/compute_table_stats.py@71
PS2, Line 71: _factory, db, table, continue_on_error,)
> It seems to me like you don't need the intersection. You already have eithe
Let's say all_tables = ["a", "b", "c"] and selected_tables = ["b", "c", "d"]. This code is
trying to avoid running compute stats on "d", which has been selected but isn't in all tables.


http://gerrit.cloudera.org:8080/#/c/8354/2/tests/util/compute_table_stats.py@116
PS2, Line 116:     yield impala_client
> Would it be possible to decorate client_factory as a @contextmanager, somet
Done



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb080f2552b9dbe304ecadd6e52429214094237d
Gerrit-Change-Number: 8354
Gerrit-PatchSet: 3
Gerrit-Owner: Philip Zeyliger <philip@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: David Knupp <dknupp@cloudera.com>
Gerrit-Reviewer: Michael Brown <mikeb@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <philip@cloudera.com>
Gerrit-Comment-Date: Mon, 23 Oct 2017 18:42:01 +0000
Gerrit-HasComments: Yes

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message