This set of Interview Questions & Answers focuses on “Sqoop with Hadoop – 2”.
1. _________ tool can list all the available database schemas.
a) sqoop-list-tables
b) sqoop-list-databases
c) sqoop-list-schema
d) sqoop-list-columns
View Answer
Explanation: Sqoop also includes a primitive SQL execution shell (the sqoop-eval tool).
2. Point out the correct statement.
a) The sqoop command-line program is a wrapper which runs the bin/hadoop script shipped with Hadoop
b) If $HADOOP_HOME is set, Sqoop will use the default installation location for Cloudera’s Distribution for Hadoop
c) The active Hadoop configuration is loaded from $HADOOP_HOME/conf/, unless the $HADOOP_CONF_DIR environment variable is unset
d) None of the mentioned
View Answer
Explanation: If you have multiple installations of Hadoop present on your machine, you can select the Hadoop installation by setting the $HADOOP_HOME environment variable.
3. Data can be imported in maximum ______ file formats.
a) 1
b) 2
c) 3
d) All of the mentioned
View Answer
Explanation: You can import data in one of two file formats: delimited text or SequenceFiles.
4. ________ text is appropriate for most non-binary data types.
a) Character
b) Binary
c) Delimited
d) None of the mentioned
View Answer
Explanation: Delimited text is the default import format.
5. Point out the wrong statement.
a) Avro data files are a compact, efficient binary format that provides interoperability with applications written in other programming languages
b) By default, data is compressed while importing
c) Delimited text also readily supports further manipulation by other tools, such as Hive
d) None of the mentioned
View Answer
Explanation: You can compress your data by using the deflate (gzip) algorithm with the -z or –compress argument, or specify any Hadoop compression codec using the –compression-codec argument.
6. If you set the inline LOB limit to ________ all large objects will be placed in external storage.
a) 0
b) 1
c) 2
d) 3
View Answer
Explanation: The size at which lobs spill into separate files is controlled by the –inline-lob-limit argument, which takes a parameter specifying the largest lob size to keep inline, in bytes.
7. ________ does not support the notion of enclosing characters that may include field delimiters in the enclosed string.
a) Imphala
b) Oozie
c) Sqoop
d) Hive
View Answer
Explanation: Even though Hive supports escaping characters, it does not handle escaping of new-line character.
8. Sqoop can also import the data into Hive by generating and executing a ____________ statement to define the data’s layout in Hive.
a) SET TABLE
b) CREATE TABLE
c) INSERT TABLE
d) All of the mentioned
View Answer
Explanation: Importing data into Hive is as simple as adding the –hive-import option to your Sqoop command line.
9. The __________ tool imports a set of tables from an RDBMS to HDFS.
a) export-all-tables
b) import-all-tables
c) import-tables
d) none of the mentioned
View Answer
Explanation: Data from each table is stored in a separate directory in HDFS.
10. Which of the following argument is not supported by import-all-tables tool?
a) –class-name
b) –package-name
c) –database-name
d) –table-name
View Answer
Explanation: You may, however, specify a package with –package-name in which all generated classes will be placed.
Sanfoundry Global Education & Learning Series – Hadoop.
Here’s the list of Best Books in Hadoop.
- Check Programming Books
- Check Hadoop Books
- Practice Programming MCQs
- Apply for Computer Science Internship