{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-trafodion/pulls/comments/41888302","id":41888302,"diff_hunk":"@@ -0,0 +1,186 @@\n+#!/bin/sh\n+\n+# This script downloads and/or makes the required libhdfs files\n+# to be able to build Trafodion, which acts as a libhdfs client.\n+#\n+# Basically, what we need are three files:\n+#\n+# hdfs.h       (copied to $TGT_INC_DIR)\n+# libhdfs.so   (copied to $TGT_LIB_DIR)\n+# libhadoop.so (copied to $TGT_LIB_DIR)\n+\n+# Working dir in the Trafodion source tree to extract and build libhdfs files\n+# (can be specified as an environment variable)\n+if [[ -z ${LIBHDFS_TEMP_DIR} ]]; then\n+  LIBHDFS_TEMP_DIR=${MY_SQROOT}/sql/libhdfs_files\n+fi\n+LOGFILE=${LIBHDFS_TEMP_DIR}/build.log\n+\n+# Hadoop source tar file to build libhdfs from\n+HADOOP_SRC_MIRROR_URL=https://archive.apache.org/dist/hadoop/common/hadoop-2.6.0\n+HADOOP_ID=hadoop-2.6.0\n+HADOOP_SRC_ID=${HADOOP_ID}-src\n+HADOOP_SRC_TAR=${HADOOP_SRC_ID}.tar.gz\n+\n+# files to build required version of Google Protocol Buffers\n+PROTOBUF_MIRROR_URL=https://github.com/google/protobuf/releases/download/v2.5.0\n+PROTOBUF_ID=protobuf-2.5.0\n+PROTOBUF_TAR=${PROTOBUF_ID}.tar.gz\n+\n+# result of protobuf build\n+PROTOBUF_TGT_ID=protobuf-tgt\n+\n+# Directories to copy the built libhdfs library and corresponding include file\n+TGT_INC_DIR=$MY_SQROOT/export/include\n+TGT_LIB_DIR=$MY_SQROOT/export/lib${SQ_MBTYPE}\n+\n+FORCE_BUILD=false\n+VERBOSE=false\n+\n+USAGE=\"Usage $0 [ -f | --force ]\\\n+                [ -v | --verbose ]\\\n+                [ -d <temp dir> | --tempDir <temp dir> ]\"\n+\n+while [[ $# > 0 ]]\n+do\n+  arg=\"$1\"\n+\n+  case $arg in\n+    -f|--force)\n+       FORCE_BUILD=true\n+       ;;\n+\n+    -v|--verbose)\n+       VERBOSE=true\n+       ;;\n+\n+    -d|--tempDir)\n+       shift\n+       if [[ $# < 1 ]]; then\n+         echo \"Expecting argument after -d or --tempDir\"\n+         exit 1\n+       fi\n+       LIBHDFS_TEMP_DIR=\"$1\"\n+       ;;\n+\n+    *)\n+       echo \"Unknown command line option: $arg\"\n+       echo \"Usage $0 [ -f | --force ]\"\n+       exit 1\n+    ;;\n+  esac\n+\n+  shift\n+done\n+\n+\n+if [[ $FORCE_BUILD == true || \\\n+      ! -e ${TGT_INC_DIR}/hdfs.h || \\\n+      ! -e ${TGT_LIB_DIR}/libhdfs.so ]]; then\n+\n+  if [ ! -d $LIBHDFS_TEMP_DIR ]; then\n+    mkdir $LIBHDFS_TEMP_DIR\n+  fi\n+\n+  cd $LIBHDFS_TEMP_DIR\n+\n+  if [[ ! -f ${PROTOBUF_TAR} ]]; then\n+    echo \"Downloading Google Protocol Buffers...\" | tee -a ${LOGFILE}\n+    wget ${PROTOBUF_MIRROR_URL}/${PROTOBUF_TAR} >${LOGFILE}\n+  fi\n+\n+  if [[ $FORCE_BUILD == true ]]; then\n+    rm -rf ${LIBHDFS_TEMP_DIR}/${PROTOBUF_ID}\n+    rm -rf ${LIBHDFS_TEMP_DIR}/${PROTOBUF_TGT_ID}\n+  fi\n+\n+  if [[ ! -d ${PROTOBUF_ID} ]]; then\n+    echo \"Unpacking Google Protocol Buffer tar file...\" | tee -a ${LOGFILE}\n+    rm -rf ${LIBHDFS_TEMP_DIR}/${PROTOBUF_TGT_ID}\n+    tar -xzf ${PROTOBUF_TAR} >>${LOGFILE}\n+  fi\n+\n+  if [[ ! -d $PROTOBUF_TGT_ID ]]; then\n+    cd ${PROTOBUF_ID}\n+    echo \"Building Google Protocol Buffers, this could take a while...\" | tee -a ${LOGFILE}\n+    if [[ $VERBOSE == true ]]; then","path":"core/sqf/sql/scripts/get_libhdfs_files","position":106,"original_position":106,"commit_id":"77eab6badc3cebaef392a03b25c3d9e1dc5106c2","original_commit_id":"77eab6badc3cebaef392a03b25c3d9e1dc5106c2","user":{"login":"robertamarton","id":13022496,"avatar_url":"https://avatars.githubusercontent.com/u/13022496?v=3","gravatar_id":"","url":"https://api.github.com/users/robertamarton","html_url":"https://github.com/robertamarton","followers_url":"https://api.github.com/users/robertamarton/followers","following_url":"https://api.github.com/users/robertamarton/following{/other_user}","gists_url":"https://api.github.com/users/robertamarton/gists{/gist_id}","starred_url":"https://api.github.com/users/robertamarton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertamarton/subscriptions","organizations_url":"https://api.github.com/users/robertamarton/orgs","repos_url":"https://api.github.com/users/robertamarton/repos","events_url":"https://api.github.com/users/robertamarton/events{/privacy}","received_events_url":"https://api.github.com/users/robertamarton/received_events","type":"User","site_admin":false},"body":"Why can't we just download binaries for protocol buffers?","created_at":"2015-10-13T16:12:45Z","updated_at":"2015-10-13T16:12:45Z","html_url":"https://github.com/apache/incubator-trafodion/pull/118#discussion_r41888302","pull_request_url":"https://api.github.com/repos/apache/incubator-trafodion/pulls/118","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-trafodion/pulls/comments/41888302"},"html":{"href":"https://github.com/apache/incubator-trafodion/pull/118#discussion_r41888302"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-trafodion/pulls/118"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-trafodion/pulls/118","id":47545976,"html_url":"https://github.com/apache/incubator-trafodion/pull/118","diff_url":"https://github.com/apache/incubator-trafodion/pull/118.diff","patch_url":"https://github.com/apache/incubator-trafodion/pull/118.patch","issue_url":"https://api.github.com/repos/apache/incubator-trafodion/issues/118","number":118,"state":"open","locked":false,"title":"TRAFODION-1521 Build Trafodion without having HBase installed","user":{"login":"zellerh","id":7062636,"avatar_url":"https://avatars.githubusercontent.com/u/7062636?v=3","gravatar_id":"","url":"https://api.github.com/users/zellerh","html_url":"https://github.com/zellerh","followers_url":"https://api.github.com/users/zellerh/followers","following_url":"https://api.github.com/users/zellerh/following{/other_user}","gists_url":"https://api.github.com/users/zellerh/gists{/gist_id}","starred_url":"https://api.github.com/users/zellerh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zellerh/subscriptions","organizations_url":"https://api.github.com/users/zellerh/orgs","repos_url":"https://api.github.com/users/zellerh/repos","events_url":"https://api.github.com/users/zellerh/events{/privacy}","received_events_url":"https://api.github.com/users/zellerh/received_events","type":"User","site_admin":false},"body":"Adding a new script, core/sqf/sql/scripts/get_libhdfs_files. The new\r\nscript will download Google Protocol Buffers 2.5.0 and a source tar\r\nfile for Hadoop and build protobuf-2.5.0 and the Hadoop native\r\nlibraries. It will then copy the libraries (libhadoop.so and\r\nlibhdfs.so) to $MY_SQROOT/export/lib$ {SQ_MBTYPE}. It will also copy\r\nthe include file hdfs.h to $MY_SQROOT/include. Since this step is very\r\ntime-consuming, it takes a shortcut if Hadoop is installed\r\n(e.g. with install_local_hadoop), in that case it will copy the\r\nexisting native libraries.  To address the remaining needs for jar\r\nfiles during the build, the hbasetmlib2 build is converted to\r\nMaven.  We also remove the case in sqenvcom.sh where a\r\nconfiguration does not have install_local_hadoop, Cloudera,\r\nHortonworks or MapR installed, but has a TOOLSDIR. Such cases should\r\nuse the recently added case for a native Apache Hadoop installation or\r\nthe case where no HBase installation is found. That last case will\r\nprint out a reminder that can be ignored.\r\n\r\nNote: Users will need to do \"sqgen\" to update their classpath. This is\r\nbecause we need a new jar in the classpath: trafodion-dtm-1.2.0.jar.","created_at":"2015-10-13T15:09:01Z","updated_at":"2015-10-13T16:12:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb692ac453bf52b1541121e1fc8477734eb0f55f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-trafodion/pulls/118/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-trafodion/pulls/118/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-trafodion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-trafodion/issues/118/comments","statuses_url":"https://api.github.com/repos/apache/incubator-trafodion/statuses/77eab6badc3cebaef392a03b25c3d9e1dc5106c2","head":{"label":"zellerh:bug/1521","ref":"bug/1521","sha":"77eab6badc3cebaef392a03b25c3d9e1dc5106c2","user":{"login":"zellerh","id":7062636,"avatar_url":"https://avatars.githubusercontent.com/u/7062636?v=3","gravatar_id":"","url":"https://api.github.com/users/zellerh","html_url":"https://github.com/zellerh","followers_url":"https://api.github.com/users/zellerh/followers","following_url":"https://api.github.com/users/zellerh/following{/other_user}","gists_url":"https://api.github.com/users/zellerh/gists{/gist_id}","starred_url":"https://api.github.com/users/zellerh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zellerh/subscriptions","organizations_url":"https://api.github.com/users/zellerh/orgs","repos_url":"https://api.github.com/users/zellerh/repos","events_url":"https://api.github.com/users/zellerh/events{/privacy}","received_events_url":"https://api.github.com/users/zellerh/received_events","type":"User","site_admin":false},"repo":{"id":37876449,"name":"incubator-trafodion","full_name":"zellerh/incubator-trafodion","owner":{"login":"zellerh","id":7062636,"avatar_url":"https://avatars.githubusercontent.com/u/7062636?v=3","gravatar_id":"","url":"https://api.github.com/users/zellerh","html_url":"https://github.com/zellerh","followers_url":"https://api.github.com/users/zellerh/followers","following_url":"https://api.github.com/users/zellerh/following{/other_user}","gists_url":"https://api.github.com/users/zellerh/gists{/gist_id}","starred_url":"https://api.github.com/users/zellerh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zellerh/subscriptions","organizations_url":"https://api.github.com/users/zellerh/orgs","repos_url":"https://api.github.com/users/zellerh/repos","events_url":"https://api.github.com/users/zellerh/events{/privacy}","received_events_url":"https://api.github.com/users/zellerh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zellerh/incubator-trafodion","description":"Mirror of Apache Trafodion (Incubating)","fork":true,"url":"https://api.github.com/repos/zellerh/incubator-trafodion","forks_url":"https://api.github.com/repos/zellerh/incubator-trafodion/forks","keys_url":"https://api.github.com/repos/zellerh/incubator-trafodion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zellerh/incubator-trafodion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zellerh/incubator-trafodion/teams","hooks_url":"https://api.github.com/repos/zellerh/incubator-trafodion/hooks","issue_events_url":"https://api.github.com/repos/zellerh/incubator-trafodion/issues/events{/number}","events_url":"https://api.github.com/repos/zellerh/incubator-trafodion/events","assignees_url":"https://api.github.com/repos/zellerh/incubator-trafodion/assignees{/user}","branches_url":"https://api.github.com/repos/zellerh/incubator-trafodion/branches{/branch}","tags_url":"https://api.github.com/repos/zellerh/incubator-trafodion/tags","blobs_url":"https://api.github.com/repos/zellerh/incubator-trafodion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zellerh/incubator-trafodion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zellerh/incubator-trafodion/git/refs{/sha}","trees_url":"https://api.github.com/repos/zellerh/incubator-trafodion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zellerh/incubator-trafodion/statuses/{sha}","languages_url":"https://api.github.com/repos/zellerh/incubator-trafodion/languages","stargazers_url":"https://api.github.com/repos/zellerh/incubator-trafodion/stargazers","contributors_url":"https://api.github.com/repos/zellerh/incubator-trafodion/contributors","subscribers_url":"https://api.github.com/repos/zellerh/incubator-trafodion/subscribers","subscription_url":"https://api.github.com/repos/zellerh/incubator-trafodion/subscription","commits_url":"https://api.github.com/repos/zellerh/incubator-trafodion/commits{/sha}","git_commits_url":"https://api.github.com/repos/zellerh/incubator-trafodion/git/commits{/sha}","comments_url":"https://api.github.com/repos/zellerh/incubator-trafodion/comments{/number}","issue_comment_url":"https://api.github.com/repos/zellerh/incubator-trafodion/issues/comments{/number}","contents_url":"https://api.github.com/repos/zellerh/incubator-trafodion/contents/{+path}","compare_url":"https://api.github.com/repos/zellerh/incubator-trafodion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zellerh/incubator-trafodion/merges","archive_url":"https://api.github.com/repos/zellerh/incubator-trafodion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zellerh/incubator-trafodion/downloads","issues_url":"https://api.github.com/repos/zellerh/incubator-trafodion/issues{/number}","pulls_url":"https://api.github.com/repos/zellerh/incubator-trafodion/pulls{/number}","milestones_url":"https://api.github.com/repos/zellerh/incubator-trafodion/milestones{/number}","notifications_url":"https://api.github.com/repos/zellerh/incubator-trafodion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zellerh/incubator-trafodion/labels{/name}","releases_url":"https://api.github.com/repos/zellerh/incubator-trafodion/releases{/id}","created_at":"2015-06-22T19:35:24Z","updated_at":"2015-06-22T19:36:03Z","pushed_at":"2015-10-13T15:05:23Z","git_url":"git://github.com/zellerh/incubator-trafodion.git","ssh_url":"git@github.com:zellerh/incubator-trafodion.git","clone_url":"https://github.com/zellerh/incubator-trafodion.git","svn_url":"https://github.com/zellerh/incubator-trafodion","homepage":null,"size":57103,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"df76babe98897990fe34370bf2fc7416a88af864","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":36349344,"name":"incubator-trafodion","full_name":"apache/incubator-trafodion","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-trafodion","description":"Mirror of Apache Trafodion (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-trafodion","forks_url":"https://api.github.com/repos/apache/incubator-trafodion/forks","keys_url":"https://api.github.com/repos/apache/incubator-trafodion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-trafodion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-trafodion/teams","hooks_url":"https://api.github.com/repos/apache/incubator-trafodion/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-trafodion/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-trafodion/events","assignees_url":"https://api.github.com/repos/apache/incubator-trafodion/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-trafodion/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-trafodion/tags","blobs_url":"https://api.github.com/repos/apache/incubator-trafodion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-trafodion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-trafodion/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-trafodion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-trafodion/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-trafodion/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-trafodion/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-trafodion/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-trafodion/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-trafodion/subscription","commits_url":"https://api.github.com/repos/apache/incubator-trafodion/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-trafodion/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-trafodion/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-trafodion/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-trafodion/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-trafodion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-trafodion/merges","archive_url":"https://api.github.com/repos/apache/incubator-trafodion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-trafodion/downloads","issues_url":"https://api.github.com/repos/apache/incubator-trafodion/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-trafodion/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-trafodion/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-trafodion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-trafodion/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-trafodion/releases{/id}","created_at":"2015-05-27T07:00:05Z","updated_at":"2015-10-05T00:52:23Z","pushed_at":"2015-10-13T15:09:01Z","git_url":"git://github.com/apache/incubator-trafodion.git","ssh_url":"git@github.com:apache/incubator-trafodion.git","clone_url":"https://github.com/apache/incubator-trafodion.git","svn_url":"https://github.com/apache/incubator-trafodion","homepage":null,"size":62134,"stargazers_count":17,"watchers_count":17,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":41,"mirror_url":"git://git.apache.org/incubator-trafodion.git","open_issues_count":5,"forks":41,"open_issues":5,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-trafodion/pulls/118"},"html":{"href":"https://github.com/apache/incubator-trafodion/pull/118"},"issue":{"href":"https://api.github.com/repos/apache/incubator-trafodion/issues/118"},"comments":{"href":"https://api.github.com/repos/apache/incubator-trafodion/issues/118/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-trafodion/pulls/118/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-trafodion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-trafodion/pulls/118/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-trafodion/statuses/77eab6badc3cebaef392a03b25c3d9e1dc5106c2"}}}}