Filter Function is not executing as expected

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Filter Function is not executing as expected

Coder88
Hi Team, Am trying to execute logic within the filter function, but am not able to see the right output, so any help in troubleshooting will be great 1. Data Flow - Source(KafkaConsumer) -> Flink ->Sink (KafkaProducer) 2. Flatmap operation is applied before filtering and is executing fine 3. Below is the Filter function code. public boolean filter(String value) throws Exception { JSONObject obj = new JSONObject(value); String action = obj.getString("actionTaken"); /*config is a string array with some static values*/ if (Arrays.asList(config).equals(action)) { System.out.println("I am in Education group"); return true; } return false; } 4. The compilation is successful but i dont see the right output even if the string values are matching Pls let me know what am doing incorrect here. Thanks, Hari