hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject incubator-hawq git commit: HAWQ-307. Ubuntu Support
Date Tue, 15 Mar 2016 19:47:46 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/HAWQ-307 [created] bb02845e0


HAWQ-307. Ubuntu Support

The patch is committed from https://github.com/apache/incubator-hawq/pull/250
A tiny conflict in tools/bin/hawq was manually resolved


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

Branch: refs/heads/HAWQ-307
Commit: bb02845e04be554b4156c1f89cdb11d779280c5a
Parents: ca2a770
Author: Konstantin Boudnik <cos@boudnik.org>
Authored: Tue Mar 15 12:46:14 2016 -0700
Committer: Konstantin Boudnik <cos@boudnik.org>
Committed: Tue Mar 15 12:46:14 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/bb02845e/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/bb02845e/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/bb02845e/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 d601383..108eb70 100644
--- a/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
+++ b/src/backend/resourcemanager/communication/rmcomm_QD2RM.c
@@ -2232,7 +2232,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/bb02845e/src/test/regress/checkinc.py
----------------------------------------------------------------------
diff --git a/src/test/regress/checkinc.py b/src/test/regress/checkinc.py
index 5c1a1c9..390f59f 100755
--- a/src/test/regress/checkinc.py
+++ b/src/test/regress/checkinc.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 
 import sys, os, re, subprocess
+try:
+    import sysconfig
+    multiarch_triplet = sysconfig.get_config_var('MULTIARCH')
+except ImportError:
+    multiarch_triplet = sysconfig.get_config_var('MULTIARCH')
 
 bindir = ''
 if os.path.exists('../../bin/pg_config'):
@@ -102,10 +107,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/bb02845e/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/bb02845e/tools/bin/gpload.py
----------------------------------------------------------------------
diff --git a/tools/bin/gpload.py b/tools/bin/gpload.py
index 454da7a..06e055f 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/bb02845e/tools/bin/gppylib/commands/unix.py
----------------------------------------------------------------------
diff --git a/tools/bin/gppylib/commands/unix.py b/tools/bin/gppylib/commands/unix.py
index 5260f55..5dc67fc 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 psutil
 
 from gppylib.gplog import *
 from gppylib.commands.base import *
@@ -925,7 +925,7 @@ def getDescendentProcesses(pid):
     children = list()
     grandchildren = list()
 
-    for p in psi.process.ProcessTable().values():
+    for p in psutil.process.ProcessTable().values():
 
         if int(p.ppid) == int(pid):
             children.append(int(p.pid))

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/bb02845e/tools/bin/gppylib/programs/kill.py
----------------------------------------------------------------------
diff --git a/tools/bin/gppylib/programs/kill.py b/tools/bin/gppylib/programs/kill.py
index bd2661f..baa1375 100644
--- a/tools/bin/gppylib/programs/kill.py
+++ b/tools/bin/gppylib/programs/kill.py
@@ -24,7 +24,7 @@ from gppylib.gpparseopts import OptParser, OptChecker
 from gppylib.mainUtils import addStandardLoggingAndHelpOptions, ProgramArgumentValidationException
 from gppylib.commands.unix import kill_sequence, check_pid 
 from gppylib.operations.package import dereference_symlink
-from psi.process import Process, NoSuchProcessError
+from psutil import Process, NoSuchProcessError
 
 logger = gplog.get_default_logger()
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/bb02845e/tools/bin/gppylib/test/regress/test_regress_gpssh.py
----------------------------------------------------------------------
diff --git a/tools/bin/gppylib/test/regress/test_regress_gpssh.py b/tools/bin/gppylib/test/regress/test_regress_gpssh.py
index d89b794..4139640 100755
--- a/tools/bin/gppylib/test/regress/test_regress_gpssh.py
+++ b/tools/bin/gppylib/test/regress/test_regress_gpssh.py
@@ -18,7 +18,7 @@
 
 import os, signal, time, re
 import unittest2 as unittest
-import psi.process, subprocess
+import psutil, subprocess
 
 class GpsshTestCase(unittest.TestCase):
 
@@ -28,7 +28,7 @@ class GpsshTestCase(unittest.TestCase):
         euid = os.getuid()
         count = 0
 
-        for p in psi.process.ProcessTable().values():
+        for p in psutil.process.ProcessTable().values():
             if p.euid != euid:
                 continue
             if not re.search('ssh', p.command):

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/bb02845e/tools/bin/hawq
----------------------------------------------------------------------
diff --git a/tools/bin/hawq b/tools/bin/hawq
index 3251caf..66006b2 100755
--- a/tools/bin/hawq
+++ b/tools/bin/hawq
@@ -77,7 +77,8 @@ 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/bb02845e/tools/bin/hawq_ctl
----------------------------------------------------------------------
diff --git a/tools/bin/hawq_ctl b/tools/bin/hawq_ctl
index d94a4c2..54e7ac0 100755
--- a/tools/bin/hawq_ctl
+++ b/tools/bin/hawq_ctl
@@ -945,7 +945,7 @@ def get_args():
         sys.exit()
     logger.debug("GPHOME is %s" % 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/bb02845e/tools/sbin/gpcheck_hostdump
----------------------------------------------------------------------
diff --git a/tools/sbin/gpcheck_hostdump b/tools/sbin/gpcheck_hostdump
index 648fca1..4ce6a72 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