Database Reference
In-Depth Information
Connection-specific options
These command options can be use to connect specific impalad located remotely or
to connect a specific database after starting impala-shell. A list of connection-specif-
ic command options is in the following table:
Command option
Description
-I hostname
or
-im-
palad=hostname
This option connects impala-shell to impalad, using a
specific host-passed hostname. By default, connection
is made on port
21000
; however, a different port num-
ber can be passed with the hostname as
host-
name:port
. This command is useful when impala-shell
is connected to such an impala daemon, which is run-
ning on a machine other than the current machine run-
ning impala-shell. You can use this command as follows:
$impala-shell -l
myhostname:21005
-r
or
-re-
fresh_after_connect
This option refreshes Impala metadata after successful
connection. This option is the same as applying the
REFRESH
statement after connecting to the Impala serv-
er. You can use this command to refresh metadata just
after connecting to impalad as follows:
$impalad -r
-d database_name
or
-database data-
base_name
By default, when impala-shell starts and connects to the
Impala server, it connects to a database named
de-
fault
. Using this option, you can pass a desired data-