org.apache.pig.builtin.mock
Class Storage.Data

java.lang.Object
  extended by org.apache.pig.builtin.mock.Storage.Data
All Implemented Interfaces:
Serializable
Enclosing class:
Storage

public static class Storage.Data
extends Object
implements Serializable

An isolated data store to avoid side effects

See Also:
Serialized Form

Constructor Summary
Storage.Data()
           
 
Method Summary
 List<Tuple> get(String location)
           
 Schema getSchema(String location)
           
 void set(String location, Collection<Tuple> data)
          to set the data in a location
 void set(String location, Schema schema, Collection<Tuple> data)
          to set the data in a location with a known schema
 void set(String location, Schema schema, Tuple... data)
          to set the data in a location with a known schema
 void set(String location, String schema, Collection<Tuple> data)
          to set the data in a location with a known schema
 void set(String location, String schema, Tuple... data)
          to set the data in a location with a known schema
 void set(String location, Tuple... data)
          to set the data in a location
 void setSchema(String location, Schema schema)
          to set the schema for a given location
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Storage.Data

public Storage.Data()
Method Detail

set

public void set(String location,
                String schema,
                Collection<Tuple> data)
         throws ParserException
to set the data in a location with a known schema

Parameters:
location - "where" to store the tuples
schema - the schema of the data
data - the tuples to store
Throws:
ParserException - if schema is invalid

set

public void set(String location,
                String schema,
                Tuple... data)
         throws ParserException
to set the data in a location with a known schema

Parameters:
location - "where" to store the tuples
schema -
data - the tuples to store
Throws:
ParserException - if schema is invalid

set

public void set(String location,
                Schema schema,
                Collection<Tuple> data)
to set the data in a location with a known schema

Parameters:
location - "where" to store the tuples
schema -
data - the tuples to store

set

public void set(String location,
                Schema schema,
                Tuple... data)
to set the data in a location with a known schema

Parameters:
location - "where" to store the tuples
schema -
data - the tuples to store

set

public void set(String location,
                Collection<Tuple> data)
to set the data in a location

Parameters:
location - "where" to store the tuples
data - the tuples to store

set

public void set(String location,
                Tuple... data)
to set the data in a location

Parameters:
location - "where" to store the tuples
data - the tuples to store

get

public List<Tuple> get(String location)
Parameters:
location -
Returns:
the data in this location

getSchema

public Schema getSchema(String location)
Parameters:
location -
Returns:
the schema stored in this location

setSchema

public void setSchema(String location,
                      Schema schema)
to set the schema for a given location

Parameters:
location -
schema -


Copyright © 2007-2012 The Apache Software Foundation