This is an automated email from the ASF dual-hosted git repository. abhay pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ranger.git
commit 79e034414211bae94b8d22f14cf833ef0670297d Author: Bolke de Bruin <bo...@xs4all.nl> AuthorDate: Mon Jul 8 12:32:30 2019 -0700 RANGER-2489: Missing dependencies in assembly for Presto plugin --- agents-common/scripts/enable-agent.sh | 11 ++++++++--- ranger-presto-plugin-shim/pom.xml | 24 ++++++++++++++++++++++++ src/main/assembly/plugin-presto.xml | 5 +++++ 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/agents-common/scripts/enable-agent.sh b/agents-common/scripts/enable-agent.sh index 7dec0b1..badea18 100755 --- a/agents-common/scripts/enable-agent.sh +++ b/agents-common/scripts/enable-agent.sh @@ -213,7 +213,7 @@ elif [ "${HCOMPONENT_NAME}" = "kylin" ]; then elif [ "${HCOMPONENT_NAME}" = "elasticsearch" ]; then HCOMPONENT_LIB_DIR=${HCOMPONENT_INSTALL_DIR}/plugins elif [ "${HCOMPONENT_NAME}" = "presto" ]; then - HCOMPONENT_LIB_DIR=${HCOMPONENT_INSTALL_DIR}/plugins/ranger + HCOMPONENT_LIB_DIR=${HCOMPONENT_INSTALL_DIR}/plugin/ranger if [ ! -d "${HCOMPONENT_LIB_DIR}" ]; then echo "INFO: Creating ${HCOMPONENT_LIB_DIR}" mkdir -p ${HCOMPONENT_LIB_DIR} @@ -798,9 +798,14 @@ then bf=${dn}/.${bn}.${dt} echo "backup of ${fn} to ${bf} ..." cp ${fn} ${bf} - echo "Add or Update properties file: [${fn}] ... " - addOrUpdatePropertyToFile access-control.name $controlName ${fn} + else + fn=${HCOMPONENT_CONF_DIR}/access-control.properties fi + echo "Add or Update properties file: [${fn}] ... " + addOrUpdatePropertyToFile access-control.name $controlName ${fn} + echo "Linking config files" + cd ${HCOMPONENT_LIB_DIR}/ranger-presto-plugin-impl/ + ln -sf ${HCOMPONENT_CONF_DIR} conf fi diff --git a/ranger-presto-plugin-shim/pom.xml b/ranger-presto-plugin-shim/pom.xml index 91ca8e8..d5338fc 100644 --- a/ranger-presto-plugin-shim/pom.xml +++ b/ranger-presto-plugin-shim/pom.xml @@ -101,5 +101,29 @@ <version>${zookeeper.version}</version> </dependency> + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna</artifactId> + <version>${jna.version}</version> + </dependency> + + <dependency> + <groupId>net.java.dev.jna</groupId> + <artifactId>jna-platform</artifactId> + <version>${jna-platform.version}</version> + </dependency> + + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>${commons.codec.version}</version> + </dependency> + + <dependency> + <groupId>com.kstruct</groupId> + <artifactId>gethostname4j</artifactId> + <version>${kstruct.gethostname4j.version}</version> + </dependency> + </dependencies> </project> \ No newline at end of file diff --git a/src/main/assembly/plugin-presto.xml b/src/main/assembly/plugin-presto.xml index 8063a9d..17260ab 100644 --- a/src/main/assembly/plugin-presto.xml +++ b/src/main/assembly/plugin-presto.xml @@ -80,6 +80,7 @@ <include>commons-cli:commons-cli</include> <include>commons-collections:commons-collections</include> <include>org.apache.commons:commons-configuration2:jar:${commons.configuration.version}</include> + <include>commons-codec:commons-codec</include> <include>commons-io:commons-io:jar:${commons.io.version}</include> <include>commons-lang:commons-lang:jar:${commons.lang.version}</include> <include>commons-logging:commons-logging:jar:${commons.logging.version}</include> @@ -98,6 +99,9 @@ <include>org.codehaus.jackson:jackson-mapper-asl</include> <include>org.codehaus.jackson:jackson-xc</include> <include>org.apache.zookeeper:zookeeper:jar:${zookeeper.version}</include> + <include>net.java.dev.jna:jna</include> + <include>net.java.dev.jna:jna-platform</include> + <include>com.kstruct:gethostname4j</include> </includes> </dependencySet> </dependencySets> @@ -120,6 +124,7 @@ <includes> <include>commons-cli:commons-cli</include> <include>commons-collections:commons-collections</include> + <include>com.google.guava:guava:jar:${presto.guava.version}</include> <include>org.apache.commons:commons-configuration2:jar:${commons.configuration.version}</include> <include>commons-io:commons-io:jar:${commons.io.version}</include> <include>commons-lang:commons-lang</include>