org.apache.mahout.classifier.df.mapreduce.inmem
Class InMemInputFormat.InMemInputSplit
java.lang.Object
org.apache.hadoop.mapreduce.InputSplit
org.apache.mahout.classifier.df.mapreduce.inmem.InMemInputFormat.InMemInputSplit
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
- Enclosing class:
- InMemInputFormat
public static class InMemInputFormat.InMemInputSplit
- extends org.apache.hadoop.mapreduce.InputSplit
- implements org.apache.hadoop.io.Writable
Custom InputSplit that indicates how many trees are built by each mapper
InMemInputFormat.InMemInputSplit
public InMemInputFormat.InMemInputSplit()
InMemInputFormat.InMemInputSplit
public InMemInputFormat.InMemInputSplit(int firstId,
int nbTrees,
Long seed)
getFirstId
public int getFirstId()
- Returns:
- the Id of the first tree of this split
getNbTrees
public int getNbTrees()
- Returns:
- the number of trees
getSeed
public Long getSeed()
- Returns:
- the random seed or null if no seed is available
getLength
public long getLength()
throws IOException
- Specified by:
getLength
in class org.apache.hadoop.mapreduce.InputSplit
- Throws:
IOException
getLocations
public String[] getLocations()
throws IOException
- Specified by:
getLocations
in class org.apache.hadoop.mapreduce.InputSplit
- Throws:
IOException
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
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
read
public static InMemInputFormat.InMemInputSplit read(DataInput in)
throws IOException
- Throws:
IOException
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.