Hi, Sorry, this could be the way of specifying the spouts:
On Wed, May 7, 2014 at 12:41 PM, padma priya chitturi < [email protected]> wrote: > Hi, > > Specifying the spout as above won't let you write separate piece of code > as the executors/spout tasks would be executing same nextTuple method. > Instead, to have intended behavior i.e to let one spout task read from even > numbered files and other read from odd numbered files, try specifying the > spouts as below: > > builder.setSpout("word-reader1",new ApiStreamingSpout(),1); > builder.setSpout("word-reader2",new ApiStreamingSpout(),1); > > Now, for word-reader-1, define nextTuple in such a way that it reads from > even numbered files. > And for word-reader-2, define nextTuple to read from odd numbered files. > > I guess the above way of defining the spouts would work. > > > On Tue, May 6, 2014 at 4:27 PM, Lydia Ickler <[email protected]>wrote: > >> Hi there, >> my name is Lydia and i am writing a program for my course „Parallel >> Programming and Distributed Computing“. >> >> for example if i have a spout like this: >> builder.setSpout("word-reader",new ApiStreamingSpout(),2); >> >> Within the spout: Is there a way to address each worker separately? >> Like to tell one to read in all files that are even numbered and the >> other one to take the odd numbered…? >> Thanks in advance! >> >> Best regards, >> Lydia >> >> >> >> >
