[
https://issues.apache.org/jira/browse/FLINK-5133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15882746#comment-15882746
]
ASF GitHub Bot commented on FLINK-5133:
---------------------------------------
Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/flink/pull/3303#discussion_r102946762
--- Diff:
flink-scala/src/main/scala/org/apache/flink/api/scala/DataSet.scala ---
@@ -178,6 +178,60 @@ class DataSet[T: ClassTag](set: JavaDataSet[T]) {
}
/**
+ * Sets the minimum and maximum resources of this operation.
+ */
+ def setResource(minResource: ResourceSpec, maxResource: ResourceSpec) = {
+ javaSet match {
+ case ds: DataSource[_] => ds.setResource(minResource, maxResource)
+ case op: Operator[_, _] => op.setResource(minResource, maxResource)
+ case di: DeltaIterationResultSet[_, _] =>
+ di.getIterationHead.setResource(minResource, maxResource)
+ case _ =>
+ throw new UnsupportedOperationException("Operator " +
javaSet.toString + " cannot have " +
--- End diff --
I would suggest to change the error message in all places to something like
"Operator <op> does not support configuring custom resources specs".
> Support to set resource for operator in DataStream and DataSet
> --------------------------------------------------------------
>
> Key: FLINK-5133
> URL: https://issues.apache.org/jira/browse/FLINK-5133
> Project: Flink
> Issue Type: Sub-task
> Components: DataSet API, DataStream API
> Reporter: zhijiang
> Assignee: zhijiang
>
> This is part of the fine-grained resource configuration.
> For *DataStream*, the *setResource* API will be setted onto
> *SingleOutputStreamOperator* similar with other existing properties like
> parallelism, name, etc.
> For *DataSet*, the *setResource* API will be setted onto *Operator* in the
> similar way.
> There are two parameters described with minimum *ResourceSpec* and maximum
> *ResourceSpec* separately in the API for considering resource resize in
> future improvements.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)