You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Attila Bukor (Code Review)" <ge...@cloudera.org> on 2020/03/18 23:10:25 UTC

[kudu-CR] KUDU-3079 Add MiniRanger

Hello Alexey Serbin, Kudu Jenkins, Andrew Wong, Adar Dembo, Grant Henke, Hao Hao, 

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

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

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

Change subject: KUDU-3079 Add MiniRanger
......................................................................

KUDU-3079 Add MiniRanger

Apache Ranger has some setup scripts[1][2] that should be used to
install it but they touch a lot of things on the file system that
unfortunately can't be configured or $PREFIX-ed/chroot-ed, so we've
opted for a more manual approach similar to what Impala have chosen[3].

As Ranger 2.0.0 was released back in August 2019 which didn't contain
the Kudu service definition and it wasn't a clean backport I opted to
use the tip of the master (at the time of writing).

Unfortunately Ranger's scripts were written for Python 2 and there were
several compatibility issues with Python 3 so I had to patch it. Most of
the changes were generated by "2to3" but it required some manual changes
as well to run on Python 3.

I had to apply another patch to fix an issue running db_setup.py on Mac
as it runs ranger-admin-services.sh which sets the script path by
running `readlink -f $0` which doesn't work on Mac. Instead of rewriting
the script in a way that would work properly on Mac and Linux I opted to
use an environment variable instead, so I decided to use a separate
patch file for this as this one will need to be applied even after
Ranger decides to support Python 3[4].

Thanks to Andrew Wong for his help with the Ranger setup[5].

[1] https://github.com/apache/ranger/blob/master/security-admin/scripts/setup.sh
[2] https://github.com/apache/ranger/blob/master/security-admin/scripts/set_globals.sh
[3] https://github.com/apache/impala/commit/0cb7187841780cabe368607ff559e493be59db22
[4] https://issues.apache.org/jira/browse/RANGER-2759
[5] https://gerrit.cloudera.org/c/15385/5

Change-Id: I15ab1eb8abe71c074c26b286073442882e101bc6
---
M src/kudu/mini-cluster/CMakeLists.txt
M src/kudu/mini-cluster/external_mini_cluster.cc
M src/kudu/mini-cluster/external_mini_cluster.h
M src/kudu/ranger/CMakeLists.txt
A src/kudu/ranger/mini_ranger-test.cc
A src/kudu/ranger/mini_ranger.cc
A src/kudu/ranger/mini_ranger.h
M thirdparty/LICENSE.txt
M thirdparty/build-thirdparty.sh
M thirdparty/download-thirdparty.sh
A thirdparty/patches/ranger-fixscripts.patch
A thirdparty/patches/ranger-python3.patch
M thirdparty/vars.sh
13 files changed, 2,243 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/83/15483/2
-- 
To view, visit http://gerrit.cloudera.org:8080/15483
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I15ab1eb8abe71c074c26b286073442882e101bc6
Gerrit-Change-Number: 15483
Gerrit-PatchSet: 2
Gerrit-Owner: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Hao Hao <ha...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)