Hadoop Questions and Answers – Thrift with Hadoop – 1

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

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

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

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

Answer: c
Explanation: TBinaryProtocol is not optimized for space efficiency.

advertisement
advertisement

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

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

Answer: a
Explanation: TCompactProtocol is typically more efficient to process as well.

Note: Join free Sanfoundry classes at Telegram or Youtube

7. Which of the following format is similar to TCompactProtocol?
a) TCompactProtocol
b) TDenseProtocol
c) TBinaryProtocol
d) TSimpleJSONProtocol
View Answer

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

Answer: d
Explanation: TSimpleJSONProtocol drops metadata using JSON. Suitable for parsing by scripting languages.

advertisement

9. Which of the following Uses JSON for encoding of data?
a) TCompactProtocol
b) TDenseProtocol
c) TBinaryProtocol
d) None of the mentioned
View Answer

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

Answer: b
Explanation: TBinaryProtocol is faster to process than the text protocol but more difficult to debug.

advertisement

Sanfoundry Global Education & Learning Series – Hadoop.

Here’s the list of Best Books in Hadoop.

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.