250+ TOP MCQs on Introduction to Hive and Answers

Hadoop Multiple Choice Questions on “Introduction to Hive”.

1. Which of the following command sets the value of a particular configuration variable (key)?
a) set -v
b) set =
c) set
d) reset

Answer: b
Clarification: If you misspell the variable name, the CLI will not show an error.

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

Answer: a
Clarification: Commands can be used in HiveQL scripts or directly in the CLI or Beeline.

3. Which of the following operator executes a shell command from the Hive shell?
a) |
b) !
c) ^
d) +

Answer: b
Clarification: Exclamation operator is for execution of command.

4. Which of the following will remove the resource(s) from the distributed cache?
a) delete FILE[S] *
b) delete JAR[S] *
c) delete ARCHIVE[S] *
d) all of the mentioned

Answer: d
Clarification: Delete command is used to remove existing resource.

5. Point out the wrong statement.
a) source FILE executes a script file inside the CLI
b) bfs executes a dfs command from the Hive shell
c) hive is Query language similar to SQL
d) none of the mentioned

Answer: b
Clarification: dfs executes a dfs command from the Hive shell.

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

Answer: c
Clarification: Various types of command line operations are available in the shell utility.

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

Answer: a
Clarification: Variable substitution to apply to hive commands. e.g. -d A=B or –define A=B.

Leave a Reply

Your email address will not be published. Required fields are marked *