This set of Hadoop Multiple Choice Questions & Answers (MCQs) focuses on “Thrift with Hadoop – 1”.
1. Which of the following project is interface definition language for hadoop?
a) Oozie
b) Mahout
c) Thrift
d) Impala
View Answer
Explanation: Thrift is an interface definition language and binary communication protocol that is used to define and create services for numerous languages.
2. Point out the correct statement.
a) Thrift is developed for scalable cross-language services development
b) Thrift includes a complete stack for creating clients and servers
c) The top part of the Thrift stack is generated code from the Thrift definition
d) All of the mentioned
View Answer
Explanation: The services generate from this file client and processor code.
3. __________ is used as a remote procedure call (RPC) framework for facebook.
a) Oozie
b) Mahout
c) Thrift
d) Impala
View Answer
Explanation: In contrast to built-in types, created data structures are sent as a result in generated code.
4. Which of the following is a straightforward binary format?
a) TCompactProtocol
b) TDenseProtocol
c) TBinaryProtocol
d) TSimpleJSONProtocol
View Answer
Explanation: TBinaryProtocol is not optimized for space efficiency.
5. Point out the wrong statement.
a) With Thrift, it is not possible to define a service and change the protocol and transport without recompiling the code
b) Thrift includes server infrastructure to tie protocols and transports together, like blocking, non-blocking, and multi threaded servers
c) Thrift supports a number of protocols for service definition
d) None of the mentioned
View Answer
Explanation: The underlying I/O part of the stack is differently implemented for different languages.
6. Which of the following is a more compact binary format?
a) TCompactProtocol
b) TDenseProtocol
c) TBinaryProtocol
d) TSimpleJSONProtocol
View Answer
Explanation: TCompactProtocol is typically more efficient to process as well.
7. Which of the following format is similar to TCompactProtocol?
a) TCompactProtocol
b) TDenseProtocol
c) TBinaryProtocol
d) TSimpleJSONProtocol
View Answer
Explanation: In TDenseProtocol, stripping off the meta information from what is transmitted.
8. ________ is a write-only protocol that cannot be parsed by Thrift.
a) TCompactProtocol
b) TDenseProtocol
c) TBinaryProtocol
d) TSimpleJSONProtocol
View Answer
Explanation: TSimpleJSONProtocol drops metadata using JSON. Suitable for parsing by scripting languages.
9. Which of the following Uses JSON for encoding of data?
a) TCompactProtocol
b) TDenseProtocol
c) TBinaryProtocol
d) None of the mentioned
View Answer
Explanation: TJSONProtocol is used JSON for encoding of data.
10. _____________ is a human-readable text format to aid in debugging.
a) TMemory
b) TDebugProtocol
c) TBinaryProtocol
d) TSimpleJSONProtocol
View Answer
Explanation: TBinaryProtocol is faster to process than the text protocol but more difficult to debug.
Sanfoundry Global Education & Learning Series – Hadoop.
Here’s the list of Best Books in Hadoop.
- Check Programming Books
- Apply for Computer Science Internship
- Practice Programming MCQs
- Check Hadoop Books