impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vuk Ercegovac (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4704: Disallow client connections to imapalad until catalog is received.
Date Fri, 13 Oct 2017 22:19:47 GMT
Vuk Ercegovac has posted comments on this change. ( )

Change subject: IMPALA-4704: Disallow client connections to imapalad until catalog is received.

Patch Set 7:

Commit Message:
PS7, Line 7: imapalad
> nit: typo
File bin/
PS7, Line 81:                   action="store_true", help="Starts all cluster processes except
> nit: long line
PS7, Line 254: catalog_needs_wait
> I think that function tests if the catalog is ready given that we haven't d
PS7, Line 323: def wait_for_client(impalad, timeout_in_seconds=CLUSTER_WAIT_TIMEOUT_IN_SECONDS):
> Add a function comment.
PS7, Line 332: ready = True
> You can just break and use client_hs2 or client_beeswax in the check in L33
PS7, Line 336: client_beeswax
> hs2_client doesn't have a close() function?
nope. perhaps there is an api I've overlooked. fwict, you'd have to provide a close request
for a given session handle (see hs2_test_suite).  at this point, a port has been opened, but
I don't see a close for that one... perhaps the idea is that you need to keep track of both
the port and the client.
File fe/src/main/java/org/apache/impala/service/
PS7, Line 859: ready
> Maybe also mention what "ready" means, i.e. receive the first update from t
PS7, Line 867:       if (getCatalog().isReady()) return;
> It may make sense to add a log message here to indicate that the catalog is
now keeping track of total time- so that's what's printed here.
PS7, Line 868: catalog to be ready
> That phrase kind of suggests that the catalog server is not ready. Maybe be
went with initialized.
PS7, Line 899: support when the catalog is not ready.
> Maybe "is not supported if the local catalog cache is not initialized."
File fe/src/main/java/org/apache/impala/service/
PS7, Line 587: public void waitForCatalog() {
             :     frontend_.waitForCatalog();
             :   }
> single line
File fe/src/test/java/org/apache/impala/service/
PS7, Line 117: private void testCatalogIsNotReady(String stmt, Frontend fe) {
             :     TQueryCtx queryCtx = TestUtils.createQueryContext(
             :         Catalog.DEFAULT_DB, AuthorizationTest.USER.getName());
             :     queryCtx.client_request.setStmt(stmt);
             :     try {
             :       fe.createExecRequest(queryCtx, new StringBuilder());
             :       fail("Expected failure to due uninitialized catalog.");
             :     } catch (IllegalStateException e) {
             :       assertEquals("Analyzing a query is not support when the catalog is not
             :           e.getMessage());
             :     } catch (Exception e) {
             :       fail("Failed to create exec request due to: " + ExceptionUtils.getStackTrace(e));
             :     }
             :   }
> Does this even make sense to keep given the introduced behavior in this pat
Agreed, the precondition should be enough to show what is expected.
File tests/common/
PS7, Line 138:     # The number of statestore subscribers is cluster_size (# of impalad) +
1 (for catalogd).
> nit: long line

To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I52b881cba18a7e4533e21a78751c2e35c3d4c8a6
Gerrit-Change-Number: 8202
Gerrit-PatchSet: 7
Gerrit-Owner: Vuk Ercegovac <>
Gerrit-Reviewer: Balazs Jeszenszky <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Dimitris Tsirogiannis <>
Gerrit-Reviewer: Philip Zeyliger <>
Gerrit-Reviewer: Vuk Ercegovac <>
Gerrit-Comment-Date: Fri, 13 Oct 2017 22:19:47 +0000
Gerrit-HasComments: Yes

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