Re: StreamTransformation object

2017-10-29 Thread AndreaKinn
Thanks for your help, I solved the issue refactoring HTMStream adding new api's -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: StreamTransformation object

2017-10-27 Thread Tony Wei
Hi Andrea, I don't think you need to touch `StreamTransformation`. If you can get the result from build(), you can do the same thing I mentioned above: casting it as SingleOutputStreamOperator. Then, you can pass it to select function to add the next operator, and get the result to add another slo

Re: StreamTransformation object

2017-10-27 Thread AndreaKinn
I'm trying to create an API to get results from build() but anyway I'm stuck on the StreamTransformation which is essential to implement slotSharingGroup(...). I have to provide it from the main class. Tony Wei wrote > Hi Andrea, > > The `learn` operator is defined in this method [1]. If you nee

Re: StreamTransformation object

2017-10-26 Thread Tony Wei
Hi Andrea, The `learn` operator is defined in this method [1]. If you need to set its slotSharing group, you should add `slotSharingGroup(...)` behind line 97 [2] or a new API to get the result from `inferenceStreamBuilder.build()`. Best Regards, Tony Wei [1] https://github.com/htm-community/fli

Re: StreamTransformation object

2017-10-26 Thread AndreaKinn
Can you be clearer about this part? I'm really appreciating your help Tony Wei wrote > you need to refactor `HTMStream` to expose > `InferenceStreamBuilder.build()`. -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: StreamTransformation object

2017-10-26 Thread Tony Wei
Hi Andrea, In this way, you will only set a slotSharing group on select operator and learn operator will remain in the default group. If you want to set lean operator as well, I am afraid that you need to refactor `HTMStream` to expose `InferenceStreamBuilder.build()`. Best Regards, Tony Wei 201

Re: StreamTransformation object

2017-10-26 Thread AndreaKinn
Mmm looks good. This solution would be great. In this way am I setting a slotSharing group for both learn and select method and not only on select? I believed I need to call slotSharingGroup exactly on the return type of learn. -- Sent from: http://apache-flink-user-mailing-list-archive.233605

Re: StreamTransformation object

2017-10-26 Thread Tony Wei
Hi Andrea, I roughly read that external library[1], and I think the return object of "select" function could be casted as `SingleOutputStreamOperator` type [2]. How about trying the following code? DataStream> LCxAccResult = HTM.learn(LCxAccStream, new Harness.AnomalyNetwork()) .select(new

Re: StreamTransformation object

2017-10-26 Thread AndreaKinn
Sorry Tony it is my fault, I was wrong the first post. Actually now my situation is the following: DataStream> LCxAccResult = HTM.learn(LCxAccStream, new Harness.AnomalyNetwork()) .select(new InferenceSelectFunction>() {...} so actually the return value of "Lear

Re: StreamTransformation object

2017-10-25 Thread Tony Wei
} > }/ > > so I changed the constructor of external library class which has to offer > the slotSharingGroup() method making it more adherent to > SingleOutputStreamOperator template. > > Now my problem is how to call it (see below) because I don't understand > what &g

StreamTransformation object

2017-10-25 Thread AndreaKinn
because I don't understand what is StreamTransformation object among the parameters of the constructor of SingleOutputStreamOperator and how to obtain it in main class. Following the method I call: /DataStream> LCxAccResult = HTM.learn(env, */* what STREAMTRANSFORMATION here? */*).slotSharing