Я хочу получить имя кластера, на котором работает куст.Обычно я делаю
[user@someVM ~]$ hive -H
*Attached to the someCluster Hadoop cluster*
usage: hive
-d,--define <key=value> Variable subsitution to apply to hive
commands. e.g. -d A=B or --define A=B
--database <databasename> Specify the database to use
-e <quoted-query-string> SQL from command line
-f <filename> SQL from files
-h <hostname> connecting to Hive Server on remote host
-H,--help Print help information
--hiveconf <property=value> Use value for given property
--hivevar <key=value> Variable subsitution to apply to hive
commands. e.g. --hivevar A=B
-i <filename> Initialization SQL file
-p <port> connecting to Hive Server on port number
-S,--silent Silent mode in interactive shell
-v,--verbose Verbose mode (echo executed SQL to the
console)
, поэтому здесь я могу легко увидеть *Attached to the someCluster Hadoop cluster*
и сказать, в каком кластере я нахожусь.Затем я попытался
[user@someVM ~]$ hive -H > out.txt
, но вот что было захвачено
[user@someVM ~]$ hive -H > out.txt
[user@someVM ~]$ cat out.txt
usage: hive
-d,--define <key=value> Variable subsitution to apply to hive
commands. e.g. -d A=B or --define A=B
--database <databasename> Specify the database to use
-e <quoted-query-string> SQL from command line
-f <filename> SQL from files
-h <hostname> connecting to Hive Server on remote host
-H,--help Print help information
--hiveconf <property=value> Use value for given property
--hivevar <key=value> Variable subsitution to apply to hive
commands. e.g. --hivevar A=B
-i <filename> Initialization SQL file
-p <port> connecting to Hive Server on port number
-S,--silent Silent mode in interactive shell
-v,--verbose Verbose mode (echo executed SQL to the
console)
обратите внимание, что *Attached to the someCluster Hadoop cluster*
не был отправлен в файл out.txt
Как можноЯ захватил линию *Attached to the someCluster Hadoop cluster*
?