Explanation: Empty constructor - required for serialization.
Constructor with two String objects provided as input.
Serializes the fields of this object to out, using write method
Deserializes the fields of this object from in.
compareTo - Compares this object to another StringPairWritable object by comparing the left strings first. If the left strings are equal, then the right strings are compared.
The equals method compares two StringPairWritable objects for equality. The equals and hashCode methods have been automatically generated by Eclipse by right-clicking on an empty line, selecting Source, and then selecting the Generate hashCode() and equals() option
hashcode : The hashCode method generates a hash code for a StringPairWritable object. The equals and hashCode methods have been automatically generated by Eclipse by right-clicking on an empty line, selecting Source, and then selecting the Generate hashCode() and equals() option.
Question :
If you have 100 files of size 100MB and block size is of 64MB then how many maps will run?
Correct Answer : Get Lastest Questions and Answer : 1 file equal to 2 blocks and each block will be processed by Single Mapper hence there would be 200 Mapper running
Question :
If you want to use a file in distributed cache then in which method should you read it?