Hi Ahmad, Which version of Flink do you use?
Thanks, vino. Ahmad Hassan <ahmad.has...@gmail.com> 于2018年10月19日周五 下午11:32写道: > Hi, > > Initializing mapstate hangs in window function. However if i use > valuestate then it is initialized succcessfully. I am using rocksdb to > store the state. > > public class MyWindowFunction extends RichWindowFunction<Event, Payload, > Tuple, TimeWindow> > { > private transient MapStateDescriptor<String, String> productsDescriptor = > new MapStateDescriptor<>( > "mapState", String.class, String.class); > > @Override > public void apply(Tuple key, TimeWindow window, final Iterable<Event> > input, > final Collector<Payload> out) > { > // do something > } > > @Override > public void open(Configuration parameters) throws Exception > { > System.out.println("## open init window state "); > * MapState<String, String> state = > this.getRuntimeContext().getMapState(productsDescriptor); <<< program hangs > here* > System.out.println("## open window state " + state); > } > } > > Thanks for the help. >