yanghua commented on a change in pull request #2058:
URL: https://github.com/apache/hudi/pull/2058#discussion_r484683967



##########
File path: docker/hoodie/hadoop/hive_base/prepare_binary.sh
##########
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+#  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.
+
+SCRIPT_PATH=$(cd `dirname $0`; pwd)
+# set up root directory
+WS_ROOT=`dirname $SCRIPT_PATH`
+
+echo "Preparing Hive binary file."
+HIVE_VERSION=2.3.3
+HIVE_BINARY_FILE_NAME=hive.tar.gz
+HIVE_BINARY_CACHE_FILE_PATH=$SCRIPT_PATH/binarycache/$HIVE_BINARY_FILE_NAME
+
+if [ -f $HIVE_BINARY_CACHE_FILE_PATH ]; then
+  echo "The binary file $HIVE_BINARY_FILE_NAME has been cached in the binary 
cache directory!"
+else
+  echo "The binary file $HIVE_BINARY_FILE_NAME did not exist in the binary 
cache directory, try to download."
+  wget 
https://archive.apache.org/dist/hive/hive-$HIVE_VERSION/apache-hive-$HIVE_VERSION-bin.tar.gz
 -O ${HIVE_BINARY_CACHE_FILE_PATH}

Review comment:
       My original thought is to download and cache the sha256 file in the 
project and verify the checksum later. However, I find that different 
frameworks have different formats. See here:
   
   
http://archive.apache.org/dist/spark/spark-2.4.4/spark-2.4.4-bin-hadoop2.7.tgz.sha512
   
https://archive.apache.org/dist/hive/hive-2.3.3/apache-hive-2.3.3-bin.tar.gz.sha256
   
    So, I would just copy the hash-value into a customized file.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to