You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Michael Smith (Code Review)" <ge...@cloudera.org> on 2022/08/10 16:40:48 UTC

[Impala-ASF-CR] IMPALA-11469: (Addendum) Initialize BackendConfig for tests

Hello Quanlong Huang, Joe McDonnell, Impala Public Jenkins, 

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

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

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

Change subject: IMPALA-11469: (Addendum) Initialize BackendConfig for tests
......................................................................

IMPALA-11469: (Addendum) Initialize BackendConfig for tests

Initialize BackendConfig in FileSystemUtil for unit tests. Checking
ignored dirs can happen in lots of tests, so rather than updating every
test class to initialize this we provide a fallback. Tests that need a
specific BackendConfig can override it by calling `create` again.

If BackendConfig is initialized this way, we log a warning as this
should not happen when running impalad. The implementation of
IMPALA-11469 already depends on static initialization time (as defined
https://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12.4)
to ensure BackendConfig is initialized via JniCatalog or JniFrontend.

Failure to initialize BackendConfig meant that test success would depend
on their order. If FileSystemUtilTest or another test that initialized
it were the first to use FileSystemUtil, then everything would pass. If
not, the static declaration in FileSystemUtil would fail, causing the
class to fail to be loaded. Later tests would fail with NoClassDefFound
errors.

Change-Id: I802fcbf70808f2127197f720a7247c3d85389d6f
---
M fe/src/main/java/org/apache/impala/common/FileSystemUtil.java
M fe/src/test/java/org/apache/impala/common/FileSystemUtilTest.java
2 files changed, 9 insertions(+), 9 deletions(-)


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I802fcbf70808f2127197f720a7247c3d85389d6f
Gerrit-Change-Number: 18828
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>