diff --git a/shell/impala_shell.py b/shell/impala_shell.py index 93e10fcf3..a671f2ace 100755 --- a/shell/impala_shell.py +++ b/shell/impala_shell.py @@ -151,7 +151,6 @@ class ImpalaShell(object, cmd.Cmd): self.server_version = ImpalaShell.UNKNOWN_SERVER_VERSION self.webserver_address = ImpalaShell.UNKNOWN_WEBSERVER - self.refresh_after_connect = options.refresh_after_connect self.current_db = options.default_db self.history_file = os.path.expanduser("~/.impalahistory") # Stores the state of user input until a delimiter is seen. @@ -763,9 +762,6 @@ class ImpalaShell(object, cmd.Cmd): self._print_if_verbose('Connected to %s:%s' % self.impalad) self._print_if_verbose('Server version: %s' % self.server_version) self.prompt = "[%s:%s] > " % self.impalad - if self.refresh_after_connect: - self.cmdqueue.append('invalidate metadata' + ImpalaShell.CMD_DELIM) - print_to_stderr("Invalidating Metadata") self._validate_database() try: self.imp_client.build_default_query_options_dict() @@ -1364,13 +1360,6 @@ Welcome to the Impala shell. """ \ % (VERSION_STRING, _format_tip(random.choice(TIPS))) -REFRESH_AFTER_CONNECT_DEPRECATION_WARNING = """ -+==========================================================================+ -| DEPRECATION WARNING: | -| -r/--refresh_after_connect is deprecated and will be removed in a future | -| version of Impala shell. | -+==========================================================================+""" - def print_to_stderr(message): print >> sys.stderr, message @@ -1445,9 +1434,6 @@ def get_intro(options): if not options.ssl and options.creds_ok_in_clear and options.use_ldap: intro += ("\n\nLDAP authentication is enabled, but the connection to Impala is " "not secured by TLS.\nALL PASSWORDS WILL BE SENT IN THE CLEAR TO IMPALA.") - - if options.refresh_after_connect: - intro += '\n'.join(REFRESH_AFTER_CONNECT_DEPRECATION_WARNING) return intro if __name__ == "__main__": diff --git a/shell/impala_shell_config_defaults.py b/shell/impala_shell_config_defaults.py index c50ad8769..c9514770f 100644 --- a/shell/impala_shell_config_defaults.py +++ b/shell/impala_shell_config_defaults.py @@ -38,7 +38,6 @@ impala_shell_defaults = { 'print_summary' : False, 'query': None, 'query_file': None, - 'refresh_after_connect': False, 'show_profiles': False, 'ssl': False, 'use_kerberos': False, diff --git a/shell/option_parser.py b/shell/option_parser.py index a1c37d274..f39e0ce77 100755 --- a/shell/option_parser.py +++ b/shell/option_parser.py @@ -22,7 +22,6 @@ # [impala] # impalad=localhost:21002 # verbose=false -# refresh_after_connect=true # # [impala.query_options] # EXPLAIN_LEVEL=2 @@ -164,9 +163,6 @@ def get_option_parser(defaults): help="Print version information") parser.add_option("-c", "--ignore_query_failure", dest="ignore_query_failure", action="store_true", help="Continue on query failure") - parser.add_option("-r", "--refresh_after_connect", dest="refresh_after_connect", - action="store_true", - help="Refresh Impala catalog after connecting \t") parser.add_option("-d", "--database", dest="default_db", help="Issues a use database command on startup \t") parser.add_option("-l", "--ldap", dest="use_ldap", diff --git a/tests/shell/bad_impalarc b/tests/shell/bad_impalarc index fa9ffe217..7fc331c33 100644 --- a/tests/shell/bad_impalarc +++ b/tests/shell/bad_impalarc @@ -1,3 +1,2 @@ version=true -refresh_after_connect=true -asdf \ No newline at end of file +asdf diff --git a/tests/shell/good_impalarc b/tests/shell/good_impalarc index 7bc8cff27..ea6a27618 100644 --- a/tests/shell/good_impalarc +++ b/tests/shell/good_impalarc @@ -1,3 +1,2 @@ [impala] query=select 1 -refresh_after_connect=true diff --git a/tests/shell/test_shell_commandline.py b/tests/shell/test_shell_commandline.py index 513abdc35..c2e7509fa 100644 --- a/tests/shell/test_shell_commandline.py +++ b/tests/shell/test_shell_commandline.py @@ -121,13 +121,6 @@ class TestImpalaShell(ImpalaTestSuite): result = run_impala_shell_cmd(args) assert "Query: use `parquet`" in result.stderr, result.stderr - @pytest.mark.execute_serially # This tests invalidates metadata, and must run serially - def test_refresh_on_connect(self): - """Confirm that the -r option refreshes the catalog.""" - args = '-r -q "%s"' % DEFAULT_QUERY - result = run_impala_shell_cmd(args) - assert 'Invalidating Metadata' in result.stderr, result.stderr - def test_unsecure_message(self): results = run_impala_shell_cmd("") assert "Starting Impala Shell without Kerberos authentication" in results.stderr @@ -420,7 +413,6 @@ class TestImpalaShell(ImpalaTestSuite): args = '--config_file=%s/good_impalarc' % QUERY_FILE_PATH result = run_impala_shell_cmd(args) assert 'Query: select 1' in result.stderr - assert 'Invalidating Metadata' in result.stderr # override option in config file through command line args = '--config_file=%s/good_impalarc --query="select 2"' % QUERY_FILE_PATH