You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Fang-Yu Rao (Code Review)" <ge...@cloudera.org> on 2021/06/29 18:48:44 UTC

[Impala-ASF-CR] IMPALA-10694: Improve the error handling of setup-ranger

Hello Quanlong Huang, Csaba Ringhofer, Impala Public Jenkins, 

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

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

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

Change subject: IMPALA-10694: Improve the error handling of setup-ranger
......................................................................

IMPALA-10694: Improve the error handling of setup-ranger

We found that setup-ranger will continue the execution if an error
occurs when i) wget was executed to initialize the environment
variables of GROUP_ID_OWNER and GROUP_ID_NON_OWNER, and ii) curl was
executed to upload a revised Ranger policy even though the -e option was
set when create-load-data.sh was executed. This patch improves the error
handling by making setup-ranger exit as soon as an error occurs so that
no test would be run at all in case there is an error.

To exit if an error occurs during wget, we separate the assignment and
the export of the environment variables since the export of an
environment variable will run and succeed even though there is an error
before the export if the assignment and the export are combined. That
is, combining them hides the error.

On the other hand, to exit if an error occurs during curl, we add an
additional -f option so that an error will no longer be silently
ignored.

Testing:
 - Verified that setup-ranger could be successfully executed after this
   patch.
 - Verified that setup-ranger would exit if a URL in setup-ranger is not
   correctly set up or if the 'id' field in policy_4_revised.json does
   not match the URL of the policy to be updated.

Change-Id: I45605d1a7441b734cf80249626638cde3adce28b
---
M testdata/bin/create-load-data.sh
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/86/17386/3
-- 
To view, visit http://gerrit.cloudera.org:8080/17386
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I45605d1a7441b734cf80249626638cde3adce28b
Gerrit-Change-Number: 17386
Gerrit-PatchSet: 3
Gerrit-Owner: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>