Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3B863200D7D for ; Wed, 13 Dec 2017 22:21:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3A5CB160C23; Wed, 13 Dec 2017 21:21:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 62891160C27 for ; Wed, 13 Dec 2017 22:21:45 +0100 (CET) Received: (qmail 85390 invoked by uid 500); 13 Dec 2017 21:21:44 -0000 Mailing-List: contact commits-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list commits@phoenix.apache.org Received: (qmail 85305 invoked by uid 99); 13 Dec 2017 21:21:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Dec 2017 21:21:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 92EB4E943C; Wed, 13 Dec 2017 21:21:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: elserj@apache.org To: commits@phoenix.apache.org Date: Wed, 13 Dec 2017 21:21:49 -0000 Message-Id: <3cbba9a13f9b448d917f993e4cfe1eb7@git.apache.org> In-Reply-To: <8efcc565b3384df4ba3215870248fbba@git.apache.org> References: <8efcc565b3384df4ba3215870248fbba@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [07/12] phoenix git commit: PHOENIX-4449 Bundle a copy of Argparse-1.4.0 for installations that need it archived-at: Wed, 13 Dec 2017 21:21:46 -0000 http://git-wip-us.apache.org/repos/asf/phoenix/blob/83b55dd6/bin/sqlline-thin.py ---------------------------------------------------------------------- diff --git a/bin/sqlline-thin.py b/bin/sqlline-thin.py index 47384d8..fecc96c 100755 --- a/bin/sqlline-thin.py +++ b/bin/sqlline-thin.py @@ -25,7 +25,14 @@ import sys import phoenix_utils import atexit import urlparse -import argparse + +# import argparse +try: + import argparse +except ImportError: + current_dir = os.path.dirname(os.path.abspath(__file__)) + sys.path.append(os.path.join(current_dir, 'argparse-1.4.0')) + import argparse global childProc childProc = None http://git-wip-us.apache.org/repos/asf/phoenix/blob/83b55dd6/bin/sqlline.py ---------------------------------------------------------------------- diff --git a/bin/sqlline.py b/bin/sqlline.py index 7a724de..4a676ee 100755 --- a/bin/sqlline.py +++ b/bin/sqlline.py @@ -24,7 +24,14 @@ import subprocess import sys import phoenix_utils import atexit -import argparse + +# import argparse +try: + import argparse +except ImportError: + current_dir = os.path.dirname(os.path.abspath(__file__)) + sys.path.append(os.path.join(current_dir, 'argparse-1.4.0')) + import argparse global childProc childProc = None @@ -39,8 +46,9 @@ atexit.register(kill_child) phoenix_utils.setPath() parser = argparse.ArgumentParser(description='Launches the Apache Phoenix Client.') -# Positional argument 'zookeepers' is optional -parser.add_argument('zookeepers', nargs='?', help='The ZooKeeper quorum string', default='localhost:2181:/hbase') +# Positional argument 'zookeepers' is optional. The PhoenixDriver will automatically populate +# this if it's not provided by the user (so, we want to leave a default value of empty) +parser.add_argument('zookeepers', nargs='?', help='The ZooKeeper quorum string', default='') # Positional argument 'sqlfile' is optional parser.add_argument('sqlfile', nargs='?', help='A file of SQL commands to execute', default='') # Common arguments across sqlline.py and sqlline-thin.py