Avro Interview Questions & Answers

4 avg. rating (80% score) - 1 votes

Avro Interview Questions

Avro Interview Questions
    1. Question 1. What Is Apache Avro?

      Answer :

      An open source project which offers data serialization as well as data exchange services for Apache Hadoop is what we call Apache Avro. It is possible to use these services together or independently both. However, programs can efficiently serialize data into files or into messages, with the serialization service. In addition, data storage is very compact and efficient in Avo because here data definition is in JSON, so, data itself is stored in the binary format making it compact and efficient.

    2. Question 2. State Some Key Points About Apache Avro?

      Answer :

      Some key points are:

      • Avro is a Data serialization system
      • It uses JSON based schemas
      • Moreover, to send data, it uses RPC calls.
      • And, during data exchange, Schema’s sent.

    3. Question 3. What Avro Offers?

      Answer :

      Avro offers:

      • Avro offers Rich data structures.
      • And, a compact, fast, binary data format.
      • Further, it offers a container file, to store persistent data.
      • Remote procedure calls (RPC).

    4. Question 4. Who Is Intended Audience To Learn Avro?

      Answer :

      Those people who want to learn the basics of Big Data Analytics by using Hadoop Framework and also those who aspire to become a successful Hadoop developer can go for Avro. Further, those aspirants who want to use Avro for data serialization and deserialization can also learn Avro.

    5. Question 5. What Are Prerequisites To Learn Avro?

      Answer :

      Those who want to learn Avro must know Hadoop’s architecture and APIs, before learning Avro. Also must know Java with experience in writing basic applications before going for Avro.

    6. Question 6. Explain Avro Schemas?

      Answer :

      Mainly, Avro heavily depends on its schema. Basically, it permits every data to be written with no prior knowledge of the schema. We can say Avro serialized fast and the data resulting after serialization is least in size with schemas.

    7. Question 7. Explain Thrift & Protocol Buffers Vs. Avro?

      Answer :

      The most competent libraries with Avro are Thrift and Protocol Buffers. 

      The difference between them is: −

      • As per the need, Avro supports both dynamic and static types. Basically, to specify schemas and their types, Protocol Buffers and Thrift uses Interface Definition Languages (IDLs).
      • As Avro is built in the Hadoop ecosystem but Thrift and Protocol Buffers are not.

    8. Question 8. Why Avro?

      Answer :

      Some features where Avro differs from other systems are:

      • Dynamic typing.
      • Untagged data.
      • No manually-assigned field IDs.

    9. Question 9. How To Use Avro?

      Answer :

      The workflow to use Avro is:−

      We need to create schemas at first to read the schemas into our program that is possible in two ways.

      • Generating a Class Corresponding to Schema  
      • Using Parsers Library

      Then perform the serialization by using serialization API provided for Avro. And then perform deserialization by using deserialization API provided for Avro.

    10. Question 10. Name Some Primitive Types Of Data Types, Avro Supports.

      Answer :

      Avro supports a wide range of Primitive datatypes:

      • Null: no value
      • Boolean: a binary value
      • Int: 32-bit signed integer
      • Long: 64-bit signed integer
      • Float: single precision (32-bit) IEEE 754 floating-point number
      • Double: double precision (64-bit) IEEE 754 floating-point number
      • Bytes: the sequence of 8-bit unsigned bytes
      • String: Unicode character sequence

    11. Question 11. Name Some Complex Types Of Data Types, Avro Supports.

      Answer :

      There are six kinds of complex types which Avro supports:

      • Records
      • Enums
      • Arrays
      • Maps
      • Unions
      • Fixed

    12. Question 12. What Are Best Features Of Apache Avro?

      Answer :

      Some of the best features of Avro are:

      • Schema evolution
      • Untagged data
      • Language support
      • Transparent compression
      • Dynamic typing
      • Native support in MapReduce
      • Rich data structures

    13. Question 13. Explain Some Advantages Of Avro.

      Answer :

      Pros of Avro are:

      • The Smallest Size.
      • It Compresses block at a time; split table.
      • Maintained Object structure.
      • Also, supports reading old data w/ new schema.

    14. Question 14. Explain Some Disadvantages Of Avro.

      Answer :

      Cons of Avro are:

      • It is must to use .NET 4.5, in the case of C# Avro, to make the best use of it.
      • Potentially slower serialization.
      • In order to read/write data, need a schema.

    15. Question 15. What Do You Mean By Schema Declaration?

      Answer :

      In JSON, a Schema is represented by one of:

      • A JSON string
      • A JSON object

      {“type”: “typename” …attributes…}

      • A JSON array

    16. Question 16. Explain The Term Serialization?

      Answer :

      To transport the data over the network or to store on some persistent storage, the process of translating data structures or objects state into binary or textual form is what we call Serialization. In other words, serialization is also known as as marshaling and deserialization is known as unmarshalling.

    17. Question 17. What Do You Mean By Schema Resolution?

      Answer :

      Whether from an RPC or a file, a reader of Avro data, can always parse that data since its schema is offered. Yet it is possible that schema may not be exactly the schema what we expect so for that purpose we use Schema Resolution.

    18. Question 18. Explain The Avro Sasl Profile?

      Answer :

      Basically, SASL offers a framework for authentication and security of network protocols. In Avro also we use SASL Profile for authentication and security purpose.

    19. Question 19. What Is The Way Of Creating Avro Schemas?

      Answer :

      In the format “lightweight text-based data interchange”, JavaScript Object Notation (JSON), the Avro schema gets created.

      We can make it in various ways:−

      • A JSON string
      • JSON object
      • A JSON array

    20. Question 20. Name Some Avro Reference Apis?

      Answer :

      The classes and methods which we use in the serialization, as well as deserialization of Avro schemas, are:

      • Specific Datum Writer Class
      • Specific Datum Reader Class
      • Data File Writer
      • Data File Reader
      • Class Schema. Parser
      • Interface Generic Record
      • Class Generic Data. Record

    21. Question 21. When To Use Avro, Explain?

      Answer :

      Mainly, for two purposes, we use Avro, like:

      • Data serialization
      • RPC (Remote procedure call) protocol

      Although, some key points are:

      • We are able to read the data from disk with applications, by using Avro even which are written in other languages besides java or the JVM.
      • Also, Avro allows us to transfer data across a remote system without any overhead of java serialization.
      • We use Avro when we need to store the large set of data on disk, as it conserves space.
      • Further, by using Avro for RPC, we get a better remote data transfer.

    22. Question 22. Explain Sort Order In Brief?

      Answer :

      There is a standard sort order for data in Avro which allows data written by one system to be efficiently sorted by another system. As sort order comparisons are sometimes the most frequent per-object operation, it can be an important optimization.

    23. Question 23. What Is The Advantage Of Hadoop Over Java Serialization?

      Answer :

      As with the help of the Writable objects, Hadoop Writable-based serialization is able to reduce object-creation overhead, which is not possible with the Java native serialization framework that’s why using Hadoop one is an advantage.

    24. Question 24. What Are The Disadvantages Of Hadoop Serialization?

      Answer :

      The only disadvantage of Hadoop Serialization is that the Writable and Sequence Files have only a Java API. Hence to solve this issue, Avro comes in picture.

    25. Question 25. Who Developed Apache Avro?

      Answer :

      By Doug Cutting, the father of Hadoop, Apache AVRO was developed.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Avro Tutorial