[ https://issues.apache.org/jira/browse/KUDU-3079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17065137#comment-17065137 ]
ASF subversion and git services commented on KUDU-3079: ------------------------------------------------------- Commit 22c5402b0f0b9957e307a7ad032ab118b2399c49 in kudu's branch refs/heads/master from Attila Bukor [ https://gitbox.apache.org/repos/asf?p=kudu.git;h=22c5402 ] KUDU-3079 Add MiniPostgres Apache Ranger needs a database to store privileges and supported databases currently are MySQL, PostgreSQL, Oracle and Amazon RDS[1]. I ruled out Amazon RDS on the basis that it's cloud-based so we couldn't depend on it in integration tests in a self-contained way. This is only a build-time dependency (test-time really) and only for an optional feature, so licensing shouldn't be too much of a concern for any of them, but PostgreSQL License can even be included in ASF software[2]. It's also easy to build and configure and it doesn't otherwise matter which database is used under Ranger, so I went with Postgres. This patch adds the latest (at the time of the start of this work) PostgreSQL and PostgreSQL JDBC driver JARs to thirdparty and adds a MiniPostgres interface that tests can use to start Postgres, add users and create databases. The patch also adds two utility methods that MiniPostgres uses: - Subprocess::WaitAndCheckExitCode() is the same as Wait(), but it only returns OK if the exit code is 0. If the subprocess was killed, stopped or exited with a non-zero exit code, it fails. - GetRandomPort() in net_util.h that returns a random unused port. I also removed the BaseName(argv[0]) call in Subprocess as that doesn't seem to be the correct behavior according to exec(3) man page as Adar pointed out. [1] https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.5/installing-ranger/content/configuring_a_database_instance_for_ranger.html (couldn't find a list of supported databases on ranger.apache.org or on cwiki.apache.org) [2] https://www.apache.org/legal/resolved.html#category-a Change-Id: Iba40126aa60e0ecbc5ae10cc1328493194c345bc Reviewed-on: http://gerrit.cloudera.org:8080/15374 Reviewed-by: Hao Hao <hao....@cloudera.com> Reviewed-by: Adar Dembo <a...@cloudera.com> Tested-by: Attila Bukor <abu...@apache.org> > Add MiniRanger for integration tests > ------------------------------------ > > Key: KUDU-3079 > URL: https://issues.apache.org/jira/browse/KUDU-3079 > Project: Kudu > Issue Type: Sub-task > Reporter: Attila Bukor > Assignee: Attila Bukor > Priority: Major > > To write full integration tests we need a bundled Ranger service -- This message was sent by Atlassian Jira (v8.3.4#803005)