Hello Daniel Becker, Michael Smith, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/19195
to look at the new patch set (#2).
Change subject: IMPALA-11699: Fix NPE in FE tests thrown from static code of
FileSystemUtil
......................................................................
IMPALA-11699: Fix NPE in FE tests thrown from static code of FileSystemUtil
FileSystemUtil has static code to get configuration from
BackendConfig.INSTANCE which could be null in some FE tests. In commit
c1610a163 of IMPALA-11469, we fixed the issue by modifying the failed FE
tests to extend FrontendTestBase which can make sure
BackendConfig.INSTANCE is initialized. However, AcidUtilsTest and
TestCaseLoaderTest also have the issue. But they are missed since the
issue depends on the test order. If a test that inits
BackendConfig.INSTANCE runs first, the following tests won't suffer this
issue.
To avoid new tests hitting this issue again, this patch inits
BackendConfig.INSTANCE lazily in the static code of FileSystemUtil.
Also adds a warning mentioning this should only happen in tests. Note
that in impalad and catalogd, BackendConfig.INSTANCE is initialized in
constructors of JniFrontend and JniCatalog.
The changes of c1610a163 is redundant after this patch so they are
reverted.
Tests:
- Run FE tests one by one so each test won't depend on any previous
env. Only found AcidUtilsTest and TestCaseLoaderTest have the issue.
Verified this patch fixes the issue in these two tests.
Change-Id: I5c056791406cd4535a7e43889dbb73d153b06f0a
---
M fe/src/main/java/org/apache/impala/common/FileSystemUtil.java
M fe/src/test/java/org/apache/impala/catalog/FileMetadataLoaderTest.java
M fe/src/test/java/org/apache/impala/common/FileSystemUtilTest.java
3 files changed, 17 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/95/19195/2
--
To view, visit http://gerrit.cloudera.org:8080/19195
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5c056791406cd4535a7e43889dbb73d153b06f0a
Gerrit-Change-Number: 19195
Gerrit-PatchSet: 2
Gerrit-Owner: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Daniel Becker <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>