[ 
https://issues.apache.org/jira/browse/TRAFODION-1521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14955188#comment-14955188
 ] 

ASF GitHub Bot commented on TRAFODION-1521:
-------------------------------------------

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

    https://github.com/apache/incubator-trafodion/pull/118#discussion_r41887305
  
    --- 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"
    +       ;;
    --- End diff --
    
    It looks like someone can set LIBHDFS_TEMP_DIR before calling this script 
but if they specify the -d option, tempDir is overwritten - I assume this is 
the desired action.  Also, LOGFILE is set earlier based on LIBHDFS_TEMP_DIR, if 
the user changes this value here, should the LOGFILE also be changed to match?


> Trafodion build should not require HBase to be installed
> --------------------------------------------------------
>
>                 Key: TRAFODION-1521
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1521
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-general
>    Affects Versions: 1.1 (pre-incubation)
>         Environment: Any
>            Reporter: Hans Zeller
>            Assignee: Hans Zeller
>              Labels: build
>             Fix For: 1.2-incubating
>
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> When we build Trafodion in a source tree, it should not be necessary to 
> install HBase first.
> Until now, several build steps relied on an HBase installation:
> 1. Files in core/sql/executor include the libhdfs header file, hdfs.h. This 
> file isn't available in the Trafodion source tree.
> 2. When we link certain executables like mxosrvr and sqlci, we specify 
> -lhdfs, requiring the libhdfs.so DLL as well as the DLLs it depends on, 
> libhadoop.so and libjvm.so.
> 3. Until recently, executor Java (core/sql/executor) files were compiled with 
> javac invocations from a Makefile, requiring the HBase client jar files in 
> the CLASSPATH. This got changed with TRAFODION-1502.
> 4. I missed some more Java files in the fix for TRAFODION-1502: 
> core/sqf/src/seatrans/tm/hbasetmlib2. Those should also be moved to Maven.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to