org.apache.hadoop.mapred
Class SpillRecord

java.lang.Object
  extended by org.apache.hadoop.mapred.SpillRecord

@InterfaceAudience.LimitedPrivate(value="MapReduce")
@InterfaceStability.Unstable
public class SpillRecord
extends Object


Constructor Summary
SpillRecord(int numPartitions)
           
SpillRecord(org.apache.hadoop.fs.Path indexFileName, JobConf job)
           
SpillRecord(org.apache.hadoop.fs.Path indexFileName, JobConf job, Checksum crc, String expectedIndexOwner)
           
SpillRecord(org.apache.hadoop.fs.Path indexFileName, JobConf job, String expectedIndexOwner)
           
 
Method Summary
 IndexRecord getIndex(int partition)
          Get spill offsets for given partition.
 void putIndex(IndexRecord rec, int partition)
          Set spill offsets for given partition.
 int size()
          Return number of IndexRecord entries in this spill.
 void writeToFile(org.apache.hadoop.fs.Path loc, JobConf job)
          Write this spill record to the location provided.
 void writeToFile(org.apache.hadoop.fs.Path loc, JobConf job, Checksum crc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpillRecord

public SpillRecord(int numPartitions)

SpillRecord

public SpillRecord(org.apache.hadoop.fs.Path indexFileName,
                   JobConf job)
            throws IOException
Throws:
IOException

SpillRecord

public SpillRecord(org.apache.hadoop.fs.Path indexFileName,
                   JobConf job,
                   String expectedIndexOwner)
            throws IOException
Throws:
IOException

SpillRecord

public SpillRecord(org.apache.hadoop.fs.Path indexFileName,
                   JobConf job,
                   Checksum crc,
                   String expectedIndexOwner)
            throws IOException
Throws:
IOException
Method Detail

size

public int size()
Return number of IndexRecord entries in this spill.


getIndex

public IndexRecord getIndex(int partition)
Get spill offsets for given partition.


putIndex

public void putIndex(IndexRecord rec,
                     int partition)
Set spill offsets for given partition.


writeToFile

public void writeToFile(org.apache.hadoop.fs.Path loc,
                        JobConf job)
                 throws IOException
Write this spill record to the location provided.

Throws:
IOException

writeToFile

public void writeToFile(org.apache.hadoop.fs.Path loc,
                        JobConf job,
                        Checksum crc)
                 throws IOException
Throws:
IOException


Copyright © 2013 Apache Software Foundation. All Rights Reserved.