org.apache.spark.input
Class PortableDataStream

Object
  extended by org.apache.spark.input.PortableDataStream
All Implemented Interfaces:
java.io.Serializable

public class PortableDataStream
extends Object
implements scala.Serializable

A class that allows DataStreams to be serialized and moved around by not creating them until they need to be read

See Also:
Serialized Form

Constructor Summary
PortableDataStream(org.apache.hadoop.mapreduce.lib.input.CombineFileSplit isplit, org.apache.hadoop.mapreduce.TaskAttemptContext context, Integer index)
           
 
Method Summary
 void close()
          Close the file (if it is currently open)
 String getPath()
           
 java.io.DataInputStream open()
          Create a new DataInputStream from the split and context
 byte[] toArray()
          Read the file as a byte array
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortableDataStream

public PortableDataStream(org.apache.hadoop.mapreduce.lib.input.CombineFileSplit isplit,
                          org.apache.hadoop.mapreduce.TaskAttemptContext context,
                          Integer index)
Method Detail

open

public java.io.DataInputStream open()
Create a new DataInputStream from the split and context

Returns:
(undocumented)

toArray

public byte[] toArray()
Read the file as a byte array

Returns:
(undocumented)

close

public void close()
Close the file (if it is currently open)


getPath

public String getPath()