Hadoop Questions and Answers – Sqoop with Hadoop – 2

«
»

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

Answer: b
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

Answer: a
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.

advertisement

3. Data can be imported in maximum ______ file formats.
a) 1
b) 2
c) 3
d) All of the mentioned
View Answer

Answer: b
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

Answer: c
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

Answer: b
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

Answer: a
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.

advertisement

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

Answer: d
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

Answer: b
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

Answer: c
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

Answer: a
Explanation: You may, however, specify a package with –package-name in which all generated classes will be placed.

advertisement

Sanfoundry Global Education & Learning Series – Hadoop.

Here’s the list of Best Reference Books in Hadoop.

To practice all interview questions and answers on Sqoop, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn