Thanks.
Sorry, that’s a copy/paste artefact. Here is an exact copy:
// Entering paste mode (ctrl-D to finish)
case class MonEntier(classe: Int, valeur: Int)
val stream = senv.socketTextStream("localhost", 9000, '\n')
val w = stream.map ( { x => Tuple1(x.toInt) } )
.map( {y => MonEntier(y._1 % 3, y._1) } )
.windowAll(TumblingProcessingTimeWindows.of(Time.seconds(5)))
.fold("") { (acc, v) => acc + " - " + v.valeur }
.print()
senv.execute("Ma gestion de fenêtres ")
// Exiting paste mode, now interpreting.
<console>:68: error: not found: value TumblingProcessingTimeWindows
.windowAll(TumblingProcessingTimeWindows.of(Time.seconds(5)))
> Le 10 sept. 2017 à 18:14, Ted Yu <[email protected]> a écrit :
>
> Is there extra '=' before the windowAll() call ?
>
> On Sun, Sep 10, 2017 at 1:01 AM, philippe <[email protected]> wrote:
>
>>
>> Hi all,
>>
>> I am trying to run a simple example in the Scala shell:
>>
>>
>> case class MonEntier(classe: Int, valeur: Int)
>> val stream =3D senv.socketTextStream("localhost", 9000, '\n')
>> val w =3D stream.map ( { x =3D> Tuple1(x.toInt) } )
>> .map( {y =3D> MonEntier(y._1 % 3, y._1) } )
>> =
>> .windowAll(TumblingProcessingTimeWindows.of(Time.seconds(5)))
>> .print()
>>
>>
>> The socket at 9000 sends a stream of integers
>>
>> I get a compilation error:
>>
>> <console>:68: error: not found: value TumblingProcessingTimeWindows
>> .windowAll(new =
>> TumblingProcessingTimeWindows.of(Time.seconds(5)))
>>
>>
>> The snippet directly comes from the doc. Help welcome !
>>
>> Philippe
>>