org.apache.pig
Class StoreConfig
java.lang.Object
org.apache.pig.StoreConfig
- All Implemented Interfaces:
- Serializable
public class StoreConfig
- extends Object
- implements Serializable
A Class which will encapsulate metadata information that a
OutputFormat (or possibly StoreFunc) may want to know
about the data that needs to be stored.
- See Also:
- Serialized Form
StoreConfig
public StoreConfig(String location,
Schema schema,
SortInfo sortInfo)
- Parameters:
location
- schema
-
getLocation
public String getLocation()
- Returns:
- the location
setLocation
public void setLocation(String location)
- Parameters:
location
- the location to set
getSchema
public Schema getSchema()
- Returns:
- the schema
setSchema
public void setSchema(Schema schema)
- Parameters:
schema
- the schema to set
toString
public String toString()
- Overrides:
toString
in class Object
setSortInfo
public void setSortInfo(SortInfo sortInfo)
- Parameters:
sortInfo
- the sortInfo to set
getSortInfo
public SortInfo getSortInfo()
- This method returns a
SortInfo
object giving
information on the column names in the output schema which
correspond to the sort columns and which columns are
ascending and those which are descending
- Returns:
- the sortInfo object if one could be determined else null
null is returned in the following scenarios (wherein
the sortInfo could not be determined):
1) the store does not follow an order by
2) There are operators other than limit between "order by"
and store. If there is a limit between order by and store and
if non of the above conditions are true, then sortInfo will be
non-null.
IMPORTANT NOTE:
The caller should check if the return value is null and
take appropriate action
Copyright © ${year} The Apache Software Foundation