Hadoop Questions and Answers – Avro – 2

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

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

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

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

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

advertisement
advertisement

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

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

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

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

Answer: c
Explanation: Avro includes a simple object container file format.

advertisement

9. The __________ codec uses Google’s Snappy compression library.
a) null
b) snappy
c) deflate
d) none of the mentioned
View Answer

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

Answer: b
Explanation: Framing is a layer between messages and transport. It exists to optimize certain operations.

advertisement

Sanfoundry Global Education & Learning Series – Hadoop.

Here’s the list of Best Books in Hadoop.

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

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.