You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by rl...@apache.org on 2016/08/26 01:49:25 UTC
incubator-hawq git commit: HAWQ-984. hawq config is too slow.
Repository: incubator-hawq
Updated Branches:
refs/heads/master 2c1710cee -> 2be55a9d4
HAWQ-984. hawq config is too slow.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/2be55a9d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/2be55a9d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/2be55a9d
Branch: refs/heads/master
Commit: 2be55a9d44112bccf9b851213c76adfdfef1de8d
Parents: 2c1710c
Author: Paul Guo <pa...@gmail.com>
Authored: Wed Aug 24 17:48:14 2016 +0800
Committer: rlei <rl...@pivotal.io>
Committed: Fri Aug 26 09:48:56 2016 +0800
----------------------------------------------------------------------
tools/bin/gppylib/commands/base.py | 2 +-
tools/bin/gpscp | 17 ++++++-----------
2 files changed, 7 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2be55a9d/tools/bin/gppylib/commands/base.py
----------------------------------------------------------------------
diff --git a/tools/bin/gppylib/commands/base.py b/tools/bin/gppylib/commands/base.py
index 877b5fd..7a7049b 100755
--- a/tools/bin/gppylib/commands/base.py
+++ b/tools/bin/gppylib/commands/base.py
@@ -184,7 +184,7 @@ class Worker(Thread):
name=None
logger=None
- def __init__(self,name,pool,timeout=5):
+ def __init__(self,name,pool,timeout=0.1):
self.name=name
self.pool=pool
self.timeout=timeout
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2be55a9d/tools/bin/gpscp
----------------------------------------------------------------------
diff --git a/tools/bin/gpscp b/tools/bin/gpscp
index c02d677..6682234 100755
--- a/tools/bin/gpscp
+++ b/tools/bin/gpscp
@@ -38,7 +38,7 @@ warnings.simplefilter('ignore', DeprecationWarning)
import os
import sys
import getopt
-import popen2
+import subprocess
from gppylib.util import ssh_utils
from gppylib.gpparseopts import OptParser
from gppylib.gpcoverage import GpCoverage
@@ -114,13 +114,11 @@ def parseCommandLine():
#############
def run(cmd, peer):
if GV.opt['-v']: print '[INFO]', cmd
- p = popen2.Popen4(cmd)
+ p = subprocess.Popen(cmd, shell=True)
p.x_cmd = cmd
p.x_peer = peer
- p.tochild.close()
return p
-
#############
coverage = GpCoverage()
coverage.start()
@@ -163,13 +161,10 @@ try:
errmsg = None
for p in proc:
- for out in p.fromchild:
- print '[OUT %s] %s' % (p.x_peer, out)
- status = p.wait()
- if status:
- errmsg = '[ERROR %s] exit %d, cmd - %s' % (p.x_peer, status, p.x_cmd)
- print errmsg
-
+ p.communicate()
+ if p.returncode:
+ errmsg = '[ERROR %s] exit %d, cmd - %s' % (p.x_peer, p.returncode, p.x_cmd)
+ print errmsg
if errmsg: sys.exit(1)
if GV.opt['-v']: print '[INFO] completed successfully'