Engineering Questions with Answers - Multiple Choice Questions
Home » MCQs » Computer Science » MCQs on Introduction to Hive
MCQs on Introduction to Hive
Which of the following command sets the value of a particular configuration variable (key)?
a) set -v
b) set <key>=<value>
c) set
d) reset
View Answer
Answer: b
Explanation: If you misspell the variable name, the CLI will not show an error.
Point out the correct statement.
a) Hive Commands are non-SQL statement such as setting a property or adding a resource
b) Set -v prints a list of configuration variables that are overridden by the user or Hive
c) Set sets a list of variables that are overridden by the user or Hive
d) None of the mentioned
View Answer
Answer: a
Explanation: Commands can be used in HiveQL scripts or directly in the CLI or Beeline.
Which of the following operator executes a shell command from the Hive shell?
a) |
b) !
c) ^
d) +
View Answer
Answer: b
Explanation: Exclamation operator is for execution of command.
Which of the following will remove the resource(s) from the distributed cache?
a) delete FILE[S] <filepath>*
b) delete JAR[S] <filepath>*
c) delete ARCHIVE[S] <filepath>*
d) all of the mentioned
View Answer
Answer: d
Explanation: Delete command is used to remove existing resource.
Point out the wrong statement.
a) source FILE <filepath> executes a script file inside the CLI
b) bfs <bfs command> executes a dfs command from the Hive shell
c) hive is Query language similar to SQL
d) none of the mentioned
View Answer
Answer: b
Explanation: dfs <dfs command> executes a dfs command from the Hive shell.
_________ is a shell utility which can be used to run Hive queries in either interactive or batch mode.
a) $HIVE/bin/hive
b) $HIVE_HOME/hive
c) $HIVE_HOME/bin/hive
d) All of the mentioned
View Answer
Answer: c
Explanation: Various types of command line operations are available in the shell utility.
Which of the following is a command line option?
a) -d,–define <key=value>
b) -e,–define <key=value>
c) -f,–define <key=value>
d) None of the mentioned
View Answer
Answer: a
Explanation: Variable substitution to apply to hive commands. e.g. -d A=B or –define A=B.
Which is the additional command line option is available in Hive 0.10.0?
a) –database <dbname>
b) –db <dbname>
c) –dbase <<dbname>
d) All of the mentioned
View Answer
Answer: a
Explanation: Database is specified which is to be used.
The CLI when invoked without the -i option will attempt to load $HIVE_HOME/bin/.hiverc and $HOME/.hiverc as _______ files.
a) processing
b) termination
c) initialization
d) none of the mentioned
View Answer
Answer: c
Explanation: Hiverc file is loaded as per options selected.
When $HIVE_HOME/bin/hive is run without either the -e or -f option, it enters _______ mode.
a) Batch
b) Interactive shell
c) Multiple
d) None of the mentioned
View Answer
Answer: b
Explanation: Use “;” (semicolon) to terminate commands for multiple options available.