xunliu commented on code in PR #6848:
URL: https://github.com/apache/gravitino/pull/6848#discussion_r2032447990


##########
dev/docker/hive/hive-dependency.sh:
##########
@@ -89,7 +90,9 @@ if [ ! -f "${hive_dir}/packages/${ZOOKEEPER_PACKAGE_NAME}" ]; 
then
 fi
 
 if [ ! -f "${hive_dir}/packages/${RANGER_HDFS_PACKAGE_NAME}" ]; then
-  bash ${hive_dir}/download-release.sh "v${RANGER_VERSION}" 
${RANGER_HDFS_PACKAGE_NAME} "${hive_dir}/packages/${RANGER_HDFS_PACKAGE_NAME}"

Review Comment:
   @unknowntpo I think we can delete `dev/docker/hive/download-release.sh` in 
this PR. because we didn't neet it anymore.



##########
dev/docker/ranger/.env:
##########
@@ -0,0 +1,88 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+BUILD_HOST_SRC=false
+SKIPTESTS=true
+GIT_URL=https://github.com/apache/ranger.git
+# BRANCH=master
+BRANCH=release-ranger-2.4.0
+BUILD_OPTS=-q
+
+# To build Trino plugins package, use following PROFILE
+PROFILE=ranger-jdk11,!all,!linux
+
+# Java version for RangerBase image.
+# This image gets used as base docker image for all images.
+# Valid values: 8, 11, 17
+RANGER_BASE_JAVA_VERSION=11
+
+# Java version to use to build Apache Ranger
+# Valid values: 8, 11, 17
+# Trino builds on jdk 11 and above
+RANGER_BUILD_JAVA_VERSION=11
+
+# Java version to use to run Ranger Admin server
+# Valid values: 8, 11, 17
+RANGER_ADMIN_JAVA_VERSION=11
+
+# base & third party images
+UBUNTU_VERSION=20.04
+MARIADB_VERSION=10.7.3
+POSTGRES_VERSION=12
+ENABLE_DB_MOUNT=true
+ZK_VERSION=3.5.9
+SOLR_VERSION=8
+
+# service versions
+HADOOP_VERSION=3.3.0
+HBASE_VERSION=2.4.6
+HIVE_VERSION=3.1.2
+HIVE_HADOOP_VERSION=3.1.1
+KAFKA_VERSION=2.8.1
+KNOX_VERSION=1.4.0
+TRINO_VERSION=377
+
+# versions of ranger services
+RANGER_VERSION=2.4.0
+KMS_VERSION=2.4.0
+USERSYNC_VERSION=2.4.0
+TAGSYNC_VERSION=2.4.0
+
+RANGER_VERSION=2.4.0
+KMS_VERSION=2.4.0
+USERSYNC_VERSION=2.4.0
+TAGSYNC_VERSION=2.4.0
+
+# plugin versions
+# HDFS_PLUGIN_VERSION=2.4.0
+# YARN_PLUGIN_VERSION=2.4.0
+# HIVE_PLUGIN_VERSION=2.4.0
+# HBASE_PLUGIN_VERSION=2.4.0
+# KAFKA_PLUGIN_VERSION=2.4.0
+# KNOX_PLUGIN_VERSION=2.4.0
+# TRINO_PLUGIN_VERSION=2.4.0

Review Comment:
   @unknowntpo I think we can delete these comments?



##########
dev/docker/ranger/ranger-dependency.sh:
##########
@@ -36,7 +36,36 @@ if [[ ! -d "${ranger_dir}/packages" ]]; then
 fi
 
 if [ ! -f "${ranger_dir}/packages/${RANGER_PACKAGE_NAME}" ]; then
-  curl -L -s -o "${ranger_dir}/packages/${RANGER_PACKAGE_NAME}" 
${RANGER_DOWNLOAD_URL}
+  # Package not exist, we need to build them from source
+       if [ ! -d "${ranger_dir}/packages/apache-ranger" ]; then
+               git clone https://github.com/apache/ranger --branch master 
--single-branch ${ranger_dir}/packages/apache-ranger
+               # set the commit to RANGER-5146: 500 API Error When Deleting 
TagDef with a Linked Tag
+               # 
https://github.com/apache/ranger/commit/ff36aabe36169b94862c51a5b403f59c9d728b94
+               git reset --hard ff36aabe36169b94862c51a5b403f59c9d728b94
+       fi
+
+       cp ${ranger_dir}/.env 
${ranger_dir}/packages/apache-ranger/dev-support/ranger-docker
+
+       cd ${ranger_dir}/packages/apache-ranger/dev-support/ranger-docker

Review Comment:
   Please keep the code style.



##########
dev/docker/ranger/ranger-dependency.sh:
##########
@@ -36,7 +36,36 @@ if [[ ! -d "${ranger_dir}/packages" ]]; then
 fi
 
 if [ ! -f "${ranger_dir}/packages/${RANGER_PACKAGE_NAME}" ]; then
-  curl -L -s -o "${ranger_dir}/packages/${RANGER_PACKAGE_NAME}" 
${RANGER_DOWNLOAD_URL}
+  # Package not exist, we need to build them from source
+       if [ ! -d "${ranger_dir}/packages/apache-ranger" ]; then
+               git clone https://github.com/apache/ranger --branch master 
--single-branch ${ranger_dir}/packages/apache-ranger
+               # set the commit to RANGER-5146: 500 API Error When Deleting 
TagDef with a Linked Tag
+               # 
https://github.com/apache/ranger/commit/ff36aabe36169b94862c51a5b403f59c9d728b94
+               git reset --hard ff36aabe36169b94862c51a5b403f59c9d728b94
+       fi
+
+       cp ${ranger_dir}/.env 
${ranger_dir}/packages/apache-ranger/dev-support/ranger-docker
+
+       cd ${ranger_dir}/packages/apache-ranger/dev-support/ranger-docker
+
+  # Prevent builder to pull remote image
+  # https://github.com/moby/buildkit/issues/2343#issuecomment-1311890308
+  docker builder prune -f
+  docker builder use default

Review Comment:
   hi @unknowntpo I think we need to add space in here? Keep the code style?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to