Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/118#discussion_r41883676
  
    --- Diff: core/sqf/sql/scripts/get_libhdfs_files ---
    @@ -0,0 +1,186 @@
    +#!/bin/sh
    +
    +# This script downloads and/or makes the required libhdfs files
    +# to be able to build Trafodion, which acts as a libhdfs client.
    +#
    +# Basically, what we need are three files:
    +#
    +# hdfs.h       (copied to $TGT_INC_DIR)
    +# libhdfs.so   (copied to $TGT_LIB_DIR)
    +# libhadoop.so (copied to $TGT_LIB_DIR)
    +
    +# Working dir in the Trafodion source tree to extract and build libhdfs 
files
    +# (can be specified as an environment variable)
    +if [[ -z ${LIBHDFS_TEMP_DIR} ]]; then
    +  LIBHDFS_TEMP_DIR=${MY_SQROOT}/sql/libhdfs_files
    +fi
    +LOGFILE=${LIBHDFS_TEMP_DIR}/build.log
    +
    +# Hadoop source tar file to build libhdfs from
    
+HADOOP_SRC_MIRROR_URL=https://archive.apache.org/dist/hadoop/common/hadoop-2.6.0
    +HADOOP_ID=hadoop-2.6.0
    +HADOOP_SRC_ID=${HADOOP_ID}-src
    +HADOOP_SRC_TAR=${HADOOP_SRC_ID}.tar.gz
    +
    +# files to build required version of Google Protocol Buffers
    
+PROTOBUF_MIRROR_URL=https://github.com/google/protobuf/releases/download/v2.5.0
    +PROTOBUF_ID=protobuf-2.5.0
    +PROTOBUF_TAR=${PROTOBUF_ID}.tar.gz
    +
    +# result of protobuf build
    +PROTOBUF_TGT_ID=protobuf-tgt
    +
    +# Directories to copy the built libhdfs library and corresponding include 
file
    +TGT_INC_DIR=$MY_SQROOT/export/include
    +TGT_LIB_DIR=$MY_SQROOT/export/lib${SQ_MBTYPE}
    +
    +FORCE_BUILD=false
    +VERBOSE=false
    +
    +USAGE="Usage $0 [ -f | --force ]\
    +                [ -v | --verbose ]\
    +                [ -d <temp dir> | --tempDir <temp dir> ]"
    +
    +while [[ $# > 0 ]]
    +do
    +  arg="$1"
    +
    +  case $arg in
    +    -f|--force)
    +       FORCE_BUILD=true
    +       ;;
    +
    +    -v|--verbose)
    +       VERBOSE=true
    +       ;;
    +
    +    -d|--tempDir)
    +       shift
    +       if [[ $# < 1 ]]; then
    +         echo "Expecting argument after -d or --tempDir"
    +         exit 1
    +       fi
    +       LIBHDFS_TEMP_DIR="$1"
    +       ;;
    +
    +    *)
    +       echo "Unknown command line option: $arg"
    +       echo "Usage $0 [ -f | --force ]"
    --- End diff --
    
    Did you mean to echo $USAGE here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to