Engineering Questions with Answers - Multiple Choice Questions

MCQs on Introduction to Hive

1 - Question

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.




2 - Question

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.




3 - Question

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.




4 - Question

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.




5 - Question

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.




6 - Question

_________ 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.




7 - Question

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.




8 - Question

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.




9 - Question

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.




10 - Question

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.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners