Bird
0
0

Which of the following is the correct way to enable Snappy compression in a Hadoop job configuration XML?

easy📝 Syntax Q12 of 15
Hadoop - Performance Tuning
Which of the following is the correct way to enable Snappy compression in a Hadoop job configuration XML?
A<property><name>mapreduce.output.fileoutputformat.compress.codec</name><value>org.apache.hadoop.io.compress.GzipCodec</value></property>
B<property><name>mapreduce.output.fileoutputformat.compress.codec</name><value>org.apache.hadoop.io.compress.SnappyCodec</value></property>
C<property><name>mapreduce.output.fileoutputformat.compress.codec</name><value>org.apache.hadoop.io.compress.Lz4Codec</value></property>
D<property><name>mapreduce.output.fileoutputformat.compress.codec</name><value>org.apache.hadoop.io.compress.Bzip2Codec</value></property>
Step-by-Step Solution
Solution:
  1. Step 1: Identify the property for compression codec

    The property key is 'mapreduce.output.fileoutputformat.compress.codec' to set codec class.
  2. Step 2: Match the codec class for Snappy

    Snappy codec class is 'org.apache.hadoop.io.compress.SnappyCodec'.
  3. Final Answer:

    Property with SnappyCodec class -> Option B
  4. Quick Check:

    Snappy codec class = org.apache.hadoop.io.compress.SnappyCodec [OK]
Quick Trick: Snappy codec class ends with SnappyCodec [OK]
Common Mistakes:
  • Using GzipCodec or other codec classes by mistake
  • Misspelling the property name
  • Confusing Lz4Codec with LZO

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Hadoop Quizzes