This set of Interview Questions & Answers focuses on “Thrift with Hadoop – 2”.
1. _______ transport is required when using a non-blocking server.
a) TZlibTransport
b) TFramedTransport
c) TMemoryTransport
d) None of the mentioned
View Answer
Explanation: TFramedTransport sends data in frames, where each frame is preceded by length information.
2. Point out the correct statement.
a) To create a Mahout service, one has to write Thrift files that describe it, generate the code in the destination language
b) Thrift is written in Java
c) Thrift is a lean and clean library
d) None of the mentioned
View Answer
Explanation: The predefined serialization styles include: binary, HTTP-friendly and compact binary.
3. __________ uses memory for I/O in Thrift.
a) TZlibTransport
b) TFramedTransport
c) TMemoryTransport
d) None of the mentioned
View Answer
Explanation: The Java implementation uses a simple ByteArrayOutputStream internally.
4. ________ uses blocking socket I/O for transport.
a) TNonblockingServer
b) TSimpleServer
c) TSocket
d) None of the mentioned
View Answer
Explanation: TFramedTransport must be used with this server.
5. Point out the wrong statement.
a) There are no XML configuration files in Thrift
b) Thrift gives cross-language serialization with lower overhead than alternatives such as SOAP due to use of binary format
c) No framework to code is a feature of Thrift
d) None of the mentioned
View Answer
Explanation: There are no build dependencies or non-standard software. No mix of incompatible software licenses.
6. Which of the following is a multi-threaded server using non-blocking I/O?
a) TNonblockingServer
b) TSimpleServer
c) TSocket
d) None of the mentioned
View Answer
Explanation: Java implementation uses NIO channels.
7. __________ is a single-threaded server using standard blocking I/O.
a) TNonblockingServer
b) TSimpleServer
c) TSocket
d) None of the mentioned
View Answer
Explanation: TSimpleServer is useful for testing.
8. Which of the following performs compression using zlib?
a) TZlibTransport
b) TFramedTransport
c) TMemoryTransport
d) None of the mentioned
View Answer
Explanation: TZlibTransport is used in conjunction with another transport. Not available in the Java implementation.
9. ________ is a multi-threaded server using standard blocking I/O.
a) TNonblockingServer
b) TThreadPoolServer
c) TSimpleServer
d) None of the mentioned
View Answer
Explanation: TFramedTransport must be used with this server.
10. _____________ transport writes to a file.
a) TNonblockingServer
b) TFileTransport
c) TFramedTransport
d) TMemoryTransport
View Answer
Explanation: TMemoryTransport uses memory for I/O.
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