Hadoop Multiple Choice Questions on “Introduction to Sqoop”.
1. BigDecimal is comprised of a ________ with an integer ‘scale’ field.
a) BigInt
b) BigInteger
c) MediumInt
d) SmallInt
Answer: b
Clarification: The BigDecimal/BigInteger can also return itself as a ‘long’ value.
2. Point out the correct statement.
a) BooleanSerializer is used to parse string representations of boolean values into boolean scalar types
b) BlobRef is a wrapper that holds a BLOB either directly
c) BooleanParse is used to parse string representations of boolean values into boolean scalar types
d) All of the mentioned
Answer: b
Clarification: BlobRef is used for reference to a file that holds the BLOB data.
3. ClobRef is a wrapper that holds a CLOB either directly or a reference to a file that holds the ______ data.
a) CLOB
b) BLOB
c) MLOB
d) All of the mentioned
Answer: a
Clarification: Create a ClobRef based on parsed data from a line of text.
4. __________ encapsulates a set of delimiters used to encode a record.
a) LargeObjectLoader
b) FieldMapProcessor
c) DelimiterSet
d) LobSerializer
Answer: c
Clarification: Delimiter set is created with the specified delimiters.
5. Point out the wrong statement.
a) Abstract base class that holds a reference to a Blob or a Clob
b) ACCESSORTYPE is the type used to access this data in a streaming fashion
c) CONTAINERTYPE is the type used to hold this data (e.g., BytesWritable)
d) None of the mentioned
Answer: d
Clarification: DATATYPE is the type being held (e.g., a byte array).
6. _________ supports null values for all types.
a) SmallObjectLoader
b) FieldMapProcessor
c) DelimiterSet
d) JdbcWritableBridge
Answer: d
Clarification: JdbcWritableBridge class contains a set of methods which can read db columns from a ResultSet into Java types.
7. Which of the following is a singleton instance class?
a) LargeObjectLoader
b) FieldMapProcessor
c) DelimiterSet
d) LobSerializer
Answer: a
Clarification: Lifetime is limited to the current TaskInputOutputContext’s life.
8. Which of the following class is used for general processing of error?
a) LargeObjectLoader
b) ProcessingException
c) DelimiterSet
d) LobSerializer
Answer: b
Clarification: General error occurs during the processing of a SqoopRecord.
9. Records are terminated by a __________ character.
a) RECORD_DELIMITER
b) FIELD_DELIMITER
c) FIELD_LIMITER
d) None of the mentioned
Answer: a
Clarification: Class RecordParser parses a record containing one or more fields.
10.The fields parsed by ____________ are backed by an internal buffer.
a) LargeObjectLoader
b) ProcessingException
c) RecordParser
d) None of the Mentioned
Answer: c
Clarification: Multiple threads must use separate instances of RecordParser.
