use of org.apache.flink.runtime.state.InternalPriorityQueue in project beam by apache.
the class Workarounds method retrieveInternalProcessingTimerQueue.
@SuppressWarnings("all")
public static InternalPriorityQueue<InternalTimer<Object, TimerInternals.TimerData>> retrieveInternalProcessingTimerQueue(InternalTimerService<TimerInternals.TimerData> timerService) {
Field internalProcessingTimerQueue = null;
try {
internalProcessingTimerQueue = InternalTimerServiceImpl.class.getDeclaredField("processingTimeTimersQueue");
internalProcessingTimerQueue.setAccessible(true);
return (InternalPriorityQueue) internalProcessingTimerQueue.get(timerService);
} catch (Exception e) {
throw new IllegalStateException("Failed to retrieve processing timer queue.", e);
} finally {
if (internalProcessingTimerQueue != null) {
internalProcessingTimerQueue.setAccessible(false);
}
}
}
Aggregations