public class DataSink<T> extends Object
Constructor and Description |
---|
DataSink(DataSet<T> data,
OutputFormat<T> format,
TypeInformation<T> type) |
Modifier and Type | Method and Description |
---|---|
DataSet<T> |
getDataSet() |
OutputFormat<T> |
getFormat() |
int |
getParallelism()
Returns the parallelism of this data sink.
|
Configuration |
getParameters() |
TypeInformation<T> |
getType() |
DataSink<T> |
name(String name) |
DataSink<T> |
setParallelism(int parallelism)
Sets the parallelism for this data sink.
|
DataSink<T> |
sortLocalOutput(int field,
Order order)
Sorts each local partition of a
Tuple data set
on the specified field in the specified Order before it is emitted by the output format.Note: Only tuple data sets can be sorted using integer field indices. The tuple data set can be sorted on multiple fields in different orders by chaining sortLocalOutput(int, Order) calls. |
DataSink<T> |
sortLocalOutput(String fieldExpression,
Order order)
Sorts each local partition of a data set on the field(s) specified by the field expression
in the specified
Order before it is emitted by the output format.Note: Non-composite types can only be sorted on the full element which is specified by a wildcard expression ("*" or "_"). Data sets of composite types (Tuple or Pojo) can be sorted on multiple fields in different orders by chaining sortLocalOutput(String, Order) calls. |
String |
toString() |
protected GenericDataSinkBase<T> |
translateToDataFlow(Operator<T> input) |
DataSink<T> |
withParameters(Configuration parameters)
Pass a configuration to the OutputFormat
|
public DataSink(DataSet<T> data, OutputFormat<T> format, TypeInformation<T> type)
public OutputFormat<T> getFormat()
public TypeInformation<T> getType()
public DataSink<T> withParameters(Configuration parameters)
parameters
- Configuration parameterspublic DataSink<T> sortLocalOutput(int field, Order order)
Tuple
data set
on the specified field in the specified Order
before it is emitted by the output format.sortLocalOutput(int, Order)
calls.public DataSink<T> sortLocalOutput(String fieldExpression, Order order)
Order
before it is emitted by the output format.sortLocalOutput(String, Order)
calls.fieldExpression
- The field expression for the field(s) on which the data set is locally sorted.order
- The Order in which the specified field(s) are locally sorted.Order
public Configuration getParameters()
protected GenericDataSinkBase<T> translateToDataFlow(Operator<T> input)
public int getParallelism()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.