In order to emit 2 matrices as Key Value pairs:
Key - Matrix A
Value - Matrix B
.
Should I create a custom
datatype or can directly go with TwoDArrayWritable
? And what about the compareTo() method in custom class?
In order to emit 2 matrices as Key Value pairs:
Key - Matrix A
Value - Matrix B
.
Should I create a custom
datatype or can directly go with TwoDArrayWritable
? And what about the compareTo() method in custom class?
You'll definitely need to write a custom class for your Key as TwoDArrayWritable
doesn't implement WritableComparable
(even if you just extend the TwoDArrayWritable
class to add the interface and compareTo
method).
As for whether you should use TwoDArrayWritable over a custom class - depends on a couple of factors (in my opinion):