hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lei_ch...@apache.org
Subject incubator-hawq git commit: HAWQ-307. Ubuntu Support Patch
Date Sun, 10 Apr 2016 07:28:54 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 079c499dd -> 2b418bf3f


HAWQ-307. Ubuntu Support Patch


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/2b418bf3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/2b418bf3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/2b418bf3

Branch: refs/heads/master
Commit: 2b418bf3fdd482a9f66a34f1c6e823de745c7645
Parents: 079c499
Author: Clay Baenziger <cwb@clayb.net>
Authored: Mon Dec 28 18:16:51 2015 -0500
Committer: Lei Chang <chang.lei.cn@gmail.com>
Committed: Sun Apr 10 15:28:42 2016 +0800

----------------------------------------------------------------------
 depends/libyarn/CMake/Platform.cmake                | 12 +-----------
 depends/libyarn/bootstrap                           |  2 +-
 .../resourcemanager/communication/rmcomm_QD2RM.c    |  2 +-
 src/test/regress/checkinc.py                        | 16 +++++++++++++++-
 src/tools/fsync/test_fsync.c                        |  2 +-
 tools/bin/gpload.py                                 |  2 +-
 tools/bin/gppylib/commands/unix.py                  |  4 ++--
 tools/bin/hawq                                      |  2 +-
 tools/bin/hawq_ctl                                  |  2 +-
 tools/sbin/gpcheck_hostdump                         |  6 +++---
 10 files changed, 27 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2b418bf3/depends/libyarn/CMake/Platform.cmake
----------------------------------------------------------------------
diff --git a/depends/libyarn/CMake/Platform.cmake b/depends/libyarn/CMake/Platform.cmake
index e56a32b..2655948 100644
--- a/depends/libyarn/CMake/Platform.cmake
+++ b/depends/libyarn/CMake/Platform.cmake
@@ -25,23 +25,13 @@ ELSE(CMAKE_SYSTEM_NAME STREQUAL "Linux")
 ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
 
 IF(CMAKE_COMPILER_IS_GNUCXX)
-    EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} --version  OUTPUT_VARIABLE COMPILER_OUTPUT)
-    
-    STRING(REGEX MATCH "\\(GCC\\) [0-9]\\.[0-9]\\.[0-9]" GCC_COMPILER_VERSION ${COMPILER_OUTPUT})
-    STRING(REGEX MATCHALL "[0-9]" GCC_COMPILER_VERSION ${GCC_COMPILER_VERSION})
-    
-    LIST(LENGTH GCC_COMPILER_VERSION GCC_COMPILER_VERSION_LEN)
-    IF (NOT 3 EQUAL ${GCC_COMPILER_VERSION_LEN})
-        MESSAGE(FATAL_ERROR "Cannot get gcc version from \"${COMPILER_OUTPUT}\"")
-    ENDIF(NOT 3 EQUAL ${GCC_COMPILER_VERSION_LEN})
+    STRING(REGEX MATCHALL "[0-9]+" GCC_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION})
     
     LIST(GET GCC_COMPILER_VERSION 0 GCC_COMPILER_VERSION_MAJOR)
     LIST(GET GCC_COMPILER_VERSION 1 GCC_COMPILER_VERSION_MINOR)
-    LIST(GET GCC_COMPILER_VERSION 2 GCC_COMPILER_VERSION_PATCH)
     
     SET(GCC_COMPILER_VERSION_MAJOR ${GCC_COMPILER_VERSION_MAJOR} CACHE INTERNAL "gcc major
version")
     SET(GCC_COMPILER_VERSION_MINOR ${GCC_COMPILER_VERSION_MINOR} CACHE INTERNAL "gcc minor
version")
-    SET(GCC_COMPILER_VERSION_PATCH ${GCC_COMPILER_VERSION_PATCH} CACHE INTERNAL "gcc patch
version")
     
     MESSAGE(STATUS "checking compiler: GCC (${GCC_COMPILER_VERSION_MAJOR}.${GCC_COMPILER_VERSION_MINOR}.${GCC_COMPILER_VERSION_PATCH})")
 ELSE(CMAKE_COMPILER_IS_GNUCXX)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2b418bf3/depends/libyarn/bootstrap
----------------------------------------------------------------------
diff --git a/depends/libyarn/bootstrap b/depends/libyarn/bootstrap
index 9c5cc0d..6b35bf1 100755
--- a/depends/libyarn/bootstrap
+++ b/depends/libyarn/bootstrap
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2b418bf3/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/communication/rmcomm_QD2RM.c b/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
index f5cd379..b83edae 100644
--- a/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
+++ b/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
@@ -2275,7 +2275,7 @@ int findFile(const char *filename)
 int createFile(const char *filename)
 {
 	int fd = 0;
-	fd = open(filename, O_RDWR|O_CREAT);
+	fd = open(filename, O_RDWR|O_CREAT, S_IRUSR | S_IWUSR);
 	int res = fd > 0 ? FUNC_RETURN_OK : FUNC_RETURN_FAIL;
 	if ( fd >= 0 )
 	{

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2b418bf3/src/test/regress/checkinc.py
----------------------------------------------------------------------
diff --git a/src/test/regress/checkinc.py b/src/test/regress/checkinc.py
index 5c1a1c9..59addf7 100755
--- a/src/test/regress/checkinc.py
+++ b/src/test/regress/checkinc.py
@@ -1,6 +1,15 @@
 #!/usr/bin/env python
 
 import sys, os, re, subprocess
+try:
+    import sysconfig
+    multiarch_triplet = sysconfig.get_config_var('MULTIARCH')
+except ImportError:
+    try:
+        import distutils.sysconfig
+        multiarch_triplet = distutils.sysconfig.get_config_var('MULTIARCH')
+    except ImportError:
+        multiarch_triplet = ''
 
 bindir = ''
 if os.path.exists('../../bin/pg_config'):
@@ -102,10 +111,15 @@ for f in keys:
         if os.path.exists(os.path.join(inc,i)):
             continue
 
-        # 2. It might be a system include
+        # 2.1 It might be a generic system include
         if os.path.exists(os.path.join('/usr/include',i)):
             continue
 
+        # 2.2 It might be a multiarch system include
+        if multiarch_triplet and \
+          os.path.exists(os.path.join('/usr/include',multiarch_triplet,i)):
+            continue
+
         # 3. It might not have been well qualified
         (d,s) = os.path.split(f)
         if fileset.get(os.path.join(d,i)):

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2b418bf3/src/tools/fsync/test_fsync.c
----------------------------------------------------------------------
diff --git a/src/tools/fsync/test_fsync.c b/src/tools/fsync/test_fsync.c
index c07fff4..1cc1b64 100644
--- a/src/tools/fsync/test_fsync.c
+++ b/src/tools/fsync/test_fsync.c
@@ -69,7 +69,7 @@ main(int argc, char *argv[])
 	for (i = 0; i < XLOG_SEG_SIZE; i++)
 		full_buf[i] = 'a';
 
-	if ((tmpfile = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR, 0)) == -1)
+	if ((tmpfile = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) == -1)
 		die("Cannot open output file.");
 	if (write(tmpfile, full_buf, XLOG_SEG_SIZE) != XLOG_SEG_SIZE)
 		die("write failed");

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2b418bf3/tools/bin/gpload.py
----------------------------------------------------------------------
diff --git a/tools/bin/gpload.py b/tools/bin/gpload.py
index 295ccbe..3d6f87f 100755
--- a/tools/bin/gpload.py
+++ b/tools/bin/gpload.py
@@ -1663,7 +1663,7 @@ class gpload:
                         self.log(self.ERROR, 'cannot find greenplum environment ' +
                                     'file: environment misconfigured')
 
-                    cmd = 'source %s ; exec ' % srcfile
+                    cmd = '. %s ; exec ' % srcfile
                     cmd += ' '.join(popenList)
                     needshell = True
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2b418bf3/tools/bin/gppylib/commands/unix.py
----------------------------------------------------------------------
diff --git a/tools/bin/gppylib/commands/unix.py b/tools/bin/gppylib/commands/unix.py
index 5260f55..7e8b1ad 100644
--- a/tools/bin/gppylib/commands/unix.py
+++ b/tools/bin/gppylib/commands/unix.py
@@ -26,7 +26,7 @@ import platform
 import socket
 import sys
 import signal
-import psi.process
+import psi.process 
 
 from gppylib.gplog import *
 from gppylib.commands.base import *
@@ -927,7 +927,7 @@ def getDescendentProcesses(pid):
 
     for p in psi.process.ProcessTable().values():
 
-        if int(p.ppid) == int(pid):
+        if int(p.ppid()) == int(pid):
             children.append(int(p.pid))
 
     # recursion

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2b418bf3/tools/bin/hawq
----------------------------------------------------------------------
diff --git a/tools/bin/hawq b/tools/bin/hawq
index 3251caf..be628be 100755
--- a/tools/bin/hawq
+++ b/tools/bin/hawq
@@ -77,7 +77,7 @@ def main():
 
     cluster_type_list = ('cluster', 'segment', 'master', 'standby', 'allsegments')
     cluster_init_list = ('cluster', 'segment', 'master', 'standby')
-    source_hawq_env = "source %s/greenplum_path.sh" % hawq_home
+    source_hawq_env = ". %s/greenplum_path.sh" % hawq_home
 
     if len(sys.argv) > 2:
         hawq_command = sys.argv[1]

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2b418bf3/tools/bin/hawq_ctl
----------------------------------------------------------------------
diff --git a/tools/bin/hawq_ctl b/tools/bin/hawq_ctl
index ce0130b..ed9436b 100755
--- a/tools/bin/hawq_ctl
+++ b/tools/bin/hawq_ctl
@@ -1038,7 +1038,7 @@ def get_args():
     logger.info("GPHOME is set to:")
     logger.info(opts.GPHOME)
     global source_hawq_env
-    source_hawq_env = "source %s/greenplum_path.sh" % opts.GPHOME 
+    source_hawq_env = ". %s/greenplum_path.sh" % opts.GPHOME 
 
     if opts.user == "":
         opts.user = getpass.getuser()

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2b418bf3/tools/sbin/gpcheck_hostdump
----------------------------------------------------------------------
diff --git a/tools/sbin/gpcheck_hostdump b/tools/sbin/gpcheck_hostdump
index bda194d..7714cc3 100755
--- a/tools/sbin/gpcheck_hostdump
+++ b/tools/sbin/gpcheck_hostdump
@@ -424,7 +424,7 @@ def collectHDFS():
     libhdfs3_site_file = os.environ.get("LIBHDFS3_CONF")
 
     # collect java heap size config
-    p = subprocess.Popen("source %s; echo $JAVA_HEAP_MAX" % hadoop_config_file, shell = True,
+    p = subprocess.Popen(". %s; echo $JAVA_HEAP_MAX" % hadoop_config_file, shell = True,
             stdout = subprocess.PIPE, stderr = subprocess.PIPE)
     result = p.communicate()
 
@@ -435,7 +435,7 @@ def collectHDFS():
         data.max_heap_size = int(re.sub(r'[^\d]+', '', result[0]))
 
     # collect possible namenode/datanode heap size config
-    p = subprocess.Popen("source %s && echo $HADOOP_NAMENODE_OPTS | tr ' ' '\\n'
| grep Xmx | tail -n 1" % hadoop_env_file, shell = True,
+    p = subprocess.Popen(". %s && echo $HADOOP_NAMENODE_OPTS | tr ' ' '\\n' | grep
Xmx | tail -n 1" % hadoop_env_file, shell = True,
             stdout = subprocess.PIPE, stderr = subprocess.PIPE)
     result = p.communicate()
 
@@ -445,7 +445,7 @@ def collectHDFS():
         data.namenode_heap_size = int(re.sub(r'[^\d]+', '', result[0]))
 
     # collect possible namenode/datanode heap size config
-    p = subprocess.Popen("source %s && echo $HADOOP_DATANODE_OPTS | tr ' ' '\\n'
| grep Xmx | tail -n 1" % hadoop_env_file, shell = True,
+    p = subprocess.Popen(". %s && echo $HADOOP_DATANODE_OPTS | tr ' ' '\\n' | grep
Xmx | tail -n 1" % hadoop_env_file, shell = True,
             stdout = subprocess.PIPE, stderr = subprocess.PIPE)
     result = p.communicate()
 


Mime
View raw message