This set of Interview Questions and Answers focuses on “Avro – 2”.
1. Which of the following is a primitive data type in Avro?
a) null
b) boolean
c) float
d) all of the mentioned
View Answer
Explanation: Primitive type names are also defined type names.
2. Point out the correct statement.
a) Records use the type name “record” and support three attributes
b) Enum are represented using JSON arrays
c) Avro data is always serialized with its schema
d) All of the mentioned
View Answer
Explanation: A record is encoded by encoding the values of its fields in the order that they are declared.
3. Avro supports ______ kinds of complex types.
a) 3
b) 4
c) 6
d) 7
View Answer
Explanation: Avro supports six kinds of complex types: records, enums, arrays, maps, unions and fixed.
4. ________ are encoded as a series of blocks.
a) Arrays
b) Enum
c) Unions
d) Maps
View Answer
Explanation: Each block of the array consists of a long count value, followed by that many array items. A block with count zero indicates the end of the array. Each item is encoded per the array’s item schema.
5. Point out the wrong statement.
a) Record, enums and fixed are named types
b) Unions may immediately contain other unions
c) A namespace is a dot-separated sequence of such names
d) All of the mentioned
View Answer
Explanation: Unions may not immediately contain other unions.
6. ________ instances are encoded using the number of bytes declared in the schema.
a) Fixed
b) Enum
c) Unions
d) Maps
View Answer
Explanation: Except for unions, the JSON encoding is the same as is used to encode field default values.
7. ________ permits data written by one system to be efficiently sorted by another system.
a) Complex Data type
b) Order
c) Sort Order
d) All of the mentioned
View Answer
Explanation: Avro binary-encoded data can be efficiently ordered without deserializing it to objects.
8. _____________ are used between blocks to permit efficient splitting of files for MapReduce processing.
a) Codec
b) Data Marker
c) Synchronization markers
d) All of the mentioned
View Answer
Explanation: Avro includes a simple object container file format.
9. The __________ codec uses Google’s Snappy compression library.
a) null
b) snappy
c) deflate
d) none of the mentioned
View Answer
Explanation: Snappy is a compression library developed at Google, and, like many technologies that come from Google, Snappy was designed to be fast.
10. Avro messages are framed as a list of _________
a) buffers
b) frames
c) rows
d) none of the mentioned
View Answer
Explanation: Framing is a layer between messages and transport. It exists to optimize certain operations.
Sanfoundry Global Education & Learning Series – Hadoop.
Here’s the list of Best Books in Hadoop.
- Apply for Computer Science Internship
- Practice Programming MCQs
- Check Hadoop Books
- Check Programming Books