abstract class FlinkStreamletLogic extends StreamletLogic[FlinkStreamletContext]
The FlinkStreamletLogic
provides methods to read and write data streams, and provides access to the configuration of the streamlet, among other things.
A FlinkStreamletLogic
must provide a method for executing streaming queries that process the Flink computation graph. The method buildExecutionGraph
has to be overridden by implementation classes that process one or more DataStream
{empty}s. The resulting graph is then submitted by executeStreamingQueries
to the Flink runtime StreamExecutionEnvironment
to generate the final output.
These jobs will be run by the run
method of FlinkStreamlet
to produce a StreamletExecution
class, the StreamletExecution
class manages the execution of a Flink Job.
The FlinkStreamletLogic
may contain instance values since it's only constructed in runtime. The Streamlet
, however, is also instantiated during compile-time, to extract metadata, and must not contain any instance values.
Overide the method buildExecutionGraph
to build the computation graph that needs
to run as part of the business logic for the FlinkStreamlet
.
Here's an example of how to provide a specialized implementation of FlinkStreamletLogic
as part
of implementing a custom FlinkStreamlet
:
// new custom `FlinkStreamlet` // define inlets, outlets and shape // provide custom implementation of `FlinkStreamletLogic` override def createLogic() = new FlinkStreamletLogic { override def buildExecutionGraph = { val ins: DataStream[Data] = readStream(in) val simples: DataStream[Simple] = ins.map(r => new Simple(r.getName())) writeStream(out, simples) } } }
- Alphabetic
- By Inheritance
- FlinkStreamletLogic
- StreamletLogic
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new FlinkStreamletLogic()(implicit context: FlinkStreamletContext)
Abstract Value Members
-
abstract
def
buildExecutionGraph(): Unit
Derived classes need to override this method to provide a custom implementation of the logic to start execution of queries.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- final def config: Config
-
implicit
val
context: FlinkStreamletContext
- Definition Classes
- FlinkStreamletLogic → StreamletLogic
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def executeStreamingQueries(env: StreamExecutionEnvironment): JobExecutionResult
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getContext(): FlinkStreamletContext
- Definition Classes
- FlinkStreamletLogic → StreamletLogic
-
final
def
getMountedPath(volumeMount: VolumeMount): Path
The path mounted for a VolumeMount request from a streamlet.
The path mounted for a VolumeMount request from a streamlet. In a clustered deployment, the mounted path will correspond to the requested mount path in the VolumeMount definition. In a local environment, this path will be replaced by a local folder.
- volumeMount
the volumeMount declaration for which we want to obtain the mounted path.
- returns
the path where the volume is mounted.
- Exceptions thrown
[[cloudflow.streamlets.MountedPathUnavailableException
MountedPathUnavailableException ]] in the case the path is not available.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
readStream[In](inlet: CodecInlet[In], clazz: Class[In]): DataStream[In]
Java API Read from the underlying external storage through the inlet
inlet
and return a DataStreamJava API Read from the underlying external storage through the inlet
inlet
and return a DataStream- inlet
the inlet port to read from
- clazz
the class of data flowing from
inlet
- returns
the data read as
DataStream[In]
-
final
def
readStream[In](inlet: CodecInlet[In])(implicit arg0: TypeInformation[In]): DataStream[In]
Read from the underlying external storage through the inlet
inlet
and return a DataStreamRead from the underlying external storage through the inlet
inlet
and return a DataStream- inlet
the inlet port to read from
- returns
the data read as
DataStream[In]
- final def streamletRef: String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
writeStream[Out](outlet: CodecOutlet[Out], stream: DataStream[Out], clazz: Class[Out]): DataStreamSink[Out]
Java API Write to the external storage using the outlet
outlet
from the streamstream
and return the same streamJava API Write to the external storage using the outlet
outlet
from the streamstream
and return the same stream- outlet
the outlet port to write to
- stream
the data stream to write
- clazz
the class of data flowing from
inlet
- returns
the result
DataStreamSink[Out]
-
final
def
writeStream[Out](outlet: CodecOutlet[Out], stream: DataStream[Out])(implicit arg0: TypeInformation[Out]): DataStreamSink[Out]
Write to the external storage using the outlet
outlet
from the streamstream
and return the same streamWrite to the external storage using the outlet
outlet
from the streamstream
and return the same stream- outlet
the outlet port to write to
- stream
the data stream to write
- returns
the result
DataStreamSink[Out]
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated