Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 361c2da6a -> 83b55dd63 refs/heads/4.x-HBase-1.2 1625dd620 -> 6d19972b0 refs/heads/5.x-HBase-2.0 5019be449 -> 7a0caf838 refs/heads/master 90c724161 -> 5cb02da74
http://git-wip-us.apache.org/repos/asf/phoenix/blob/5cb02da7/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/5cb02da7/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