org.apache.mahout.math.hadoop.stochasticsvd
Class SplitPartitionedWritable

java.lang.Object
  extended by org.apache.mahout.math.hadoop.stochasticsvd.SplitPartitionedWritable
All Implemented Interfaces:
Comparable<SplitPartitionedWritable>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<SplitPartitionedWritable>

public class SplitPartitionedWritable
extends Object
implements org.apache.hadoop.io.WritableComparable<SplitPartitionedWritable>

a key for vectors allowing to identify them by their coordinates in original split of A. We assume all passes over A results in the same splits, thus, we can always prepare side files that come into contact with A, sp that they are sorted and partitioned same way.

Hashcode is defined the way that all records of the same split go to the same reducer.

In addition, we are defining a grouping comparator allowing group one split into the same reducer group.


Nested Class Summary
static class SplitPartitionedWritable.SplitGroupingComparator
           
 
Constructor Summary
SplitPartitionedWritable()
           
SplitPartitionedWritable(org.apache.hadoop.mapreduce.Mapper.Context mapperContext)
           
 
Method Summary
 int compareTo(SplitPartitionedWritable o)
           
 boolean equals(Object obj)
           
 int getTaskId()
           
 long getTaskItemOrdinal()
           
 int hashCode()
           
 void incrementItemOrdinal()
           
 void readFields(DataInput in)
           
 void setTaskItemOrdinal(long taskItemOrdinal)
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitPartitionedWritable

public SplitPartitionedWritable(org.apache.hadoop.mapreduce.Mapper.Context mapperContext)

SplitPartitionedWritable

public SplitPartitionedWritable()
Method Detail

getTaskId

public int getTaskId()

getTaskItemOrdinal

public long getTaskItemOrdinal()

incrementItemOrdinal

public void incrementItemOrdinal()

setTaskItemOrdinal

public void setTaskItemOrdinal(long taskItemOrdinal)

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

compareTo

public int compareTo(SplitPartitionedWritable o)
Specified by:
compareTo in interface Comparable<SplitPartitionedWritable>


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.