I agree with Tim. WindowGenerator is as its name suggests is not a general purpose utility class that will be used by operator developer.
On Mon, Dec 14, 2015 at 10:24 AM, Timothy Farkas <[email protected]> wrote: > Hi Siyuan > > The ticket is here > > https://malhar.atlassian.net/browse/MLHR-1940 > > A small set of utility methods have already been added to Malhar library > > > https://github.com/apache/incubator-apex-malhar/blob/devel-3/library/src/main/java/com/datatorrent/lib/util/time/WindowUtils.java > > If you have any requests for additional methods to be used from your > streaming api please let me know. It can also be moved if you need it to > be. Since it looks like there is some interest and these things may change > I will also mark the WinodwUtils class as Unstable. > > David > > I don't think these things should be moved to WindowGenerator since the > time conversion requires information specific to an operator, namely the > application window count. I think the WindowGenerator is a DAG level > construct which has a specialized function, it shouldn't be populated with > operator level conversion methods. > > Thanks, > Tim > > > On Mon, Dec 14, 2015 at 9:46 AM, David Yan <[email protected]> wrote: > > > Similar utilities are already in WindowGenerator in apex core. Maybe add > > to that class instead of creating a separate class? > > > > David > > On Dec 11, 2015 4:13 PM, "Timothy Farkas" <[email protected]> wrote: > > > > > I'd like to propose creating an operator utility in > > > com.datatorrent.lib.operatorutils to convert time into number of > windows > > > and tuples / second into tuples / window. The way in which this > currently > > > can be specified is through a property like operationWindowCount or > > > tuplesPerWindow. This works but I've observed that this can lead to > > > confusion. The confusion comes from the fact that the people who > develop > > > apps are not necessarily the ones who test deployment configurations > and > > > manage the apps, so they think in time not application windows. Also > the > > > default application window count and streaming window size is not > common > > > knowledge, so it's not easy to compute the conversion from windows to > > time. > > > This small utility method could be reused across operators. > > > > > > Any feedback? > > > > > > Thanks, > > > Tim > > > > > >
