I think I do something wrong here because it retur...
# troubleshooting
a
I think I do something wrong here because it return nulls , But am sure it is assigning into mapstate aslo what is the difference between ctx.getBroadcastState(handsets) and
Copy code
getRuntimeContext().getMapState(this.handsets)
@Override
public void processElement(Customer customer, ReadOnlyContext ctx, Collector<Tuple3<String, DeviceInfo, DeviceInfo>> out) throws Exception { String currentTAC = customer.getImei().substring(0, 8); DeviceInfo device = ctx.getBroadcastState(handsets).get(currentTAC); if (device == null) { System.out.println("Device info for TAC " + currentTAC + " is null."); } else { System.out.println("Device info for TAC " + currentTAC + ": " + device); } } @Override public void processBroadcastElement(DeviceInfo value, Context ctx, Collector<Tuple3<String, DeviceInfo, DeviceInfo>> out) throws Exception { ctx.getBroadcastState(handsets).put(value.getTAC(), value); System.out.println("Broadcast element added with TAC: " + value.getTAC()); }