IN
- OUT
- public class PythonMapPartition<IN,OUT> extends RichMapPartitionFunction<IN,OUT> implements ResultTypeQueryable<OUT>
Constructor and Description |
---|
PythonMapPartition(Configuration config,
int envId,
int setId,
TypeInformation<OUT> typeInformation) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this function.
|
TypeInformation<OUT> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
void |
mapPartition(Iterable<IN> values,
Collector<OUT> out)
A user-implemented function that modifies or transforms an incoming object.
|
void |
open(Configuration config)
Opens this function.
|
getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
public PythonMapPartition(Configuration config, int envId, int setId, TypeInformation<OUT> typeInformation)
public void open(Configuration config) throws IOException
open
in interface RichFunction
open
in class AbstractRichFunction
config
- configurationIOException
Configuration
public void mapPartition(Iterable<IN> values, Collector<OUT> out) throws Exception
MapPartitionFunction
mapPartition
in interface MapPartitionFunction<IN,OUT>
mapPartition
in class RichMapPartitionFunction<IN,OUT>
values
- All records for the mapperout
- The collector to hand results to.Exception
- This method may throw exceptions. Throwing an exception will cause the operation
to fail and may trigger recovery.public void close() throws IOException
close
in interface RichFunction
close
in class AbstractRichFunction
IOException
public TypeInformation<OUT> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<OUT>
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.