Re: Naming Scala Operators

Posted by Stefan Bunk on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Naming-Scala-Operators-tp7p11.html

Hi,

thanks for that!

How about adding a name-method to the DataSet, that sets the name and returns itself? That would allow to stay in the fluent interface, and make naming intermediate results easier:
def name(name: String): DataSet[T] = {
contract.setName(name)
this
}
Something like that.

Cheers
Stefan


On Thu, Jul 31, 2014 at 6:32 PM, Aljoscha Krettek <[hidden email]> wrote:
Hi Stefan,
right now you have to use something like this:

val words = input.flatMap { ... }
words.contract.setName("the name")

contract is a field of DataSet with which you can access the underlying Operator.

Cheers,
Aljoscha


On Thu, Jul 31, 2014 at 5:28 PM, Stefan Bunk <[hidden email]> wrote:
Hi,

is there a way to give a name to some operators in the Scala API?
So that the log lines
    Reduce(<Unnamed Reducer>) (1/1) switched to READY
are more helpful?

Cheers
Stefan