@@ -45,6 +45,7 @@ class EventProcessor<R extends HasMetadata> implements EventHandler, LifecycleAw
4545 private final Map <ResourceID , RetryExecution > retryState = new HashMap <>();
4646 private final ExecutorService executor ;
4747 private final String controllerName ;
48+ private final String resourceType ;
4849 private final ReentrantLock lock = new ReentrantLock ();
4950 private final Metrics metrics ;
5051 private volatile boolean running ;
@@ -54,6 +55,7 @@ class EventProcessor<R extends HasMetadata> implements EventHandler, LifecycleAw
5455 EventProcessor (EventSourceManager <R > eventSourceManager ) {
5556 this (ExecutorServiceManager .instance ().executorService (),
5657 eventSourceManager .getController ().getConfiguration ().getName (),
58+ eventSourceManager .getController ().getConfiguration ().getResourceTypeName (),
5759 new ReconciliationDispatcher <>(eventSourceManager .getController ()),
5860 GenericRetry .fromConfiguration (
5961 eventSourceManager .getController ().getConfiguration ().getRetryConfiguration ()),
@@ -63,16 +65,12 @@ class EventProcessor<R extends HasMetadata> implements EventHandler, LifecycleAw
6365 }
6466
6567 EventProcessor (ReconciliationDispatcher <R > reconciliationDispatcher ,
66- EventSourceManager <R > eventSourceManager ,
67- String relatedControllerName ,
68- Retry retry ) {
69- this (null ,
70- relatedControllerName ,
71- reconciliationDispatcher , retry , null , eventSourceManager );
68+ EventSourceManager <R > eventSourceManager , Retry retry ) {
69+ this (null , "Test" , "Test" , reconciliationDispatcher , retry , null , eventSourceManager );
7270 }
7371
7472 private EventProcessor (ExecutorService executor ,
75- String relatedControllerName ,
73+ String relatedControllerName , String resourceTypeName ,
7674 ReconciliationDispatcher <R > reconciliationDispatcher , Retry retry , Metrics metrics ,
7775 EventSourceManager <R > eventSourceManager ) {
7876 this .executor =
@@ -85,6 +83,7 @@ private EventProcessor(ExecutorService executor,
8583 this .retry = retry ;
8684 this .metrics = metrics != null ? metrics : Metrics .NOOP ;
8785 this .eventSourceManager = eventSourceManager ;
86+ this .resourceType = resourceTypeName ;
8887 }
8988
9089 EventMarker getEventMarker () {
@@ -140,9 +139,7 @@ private void submitReconciliationExecution(ResourceID resourceID) {
140139 controllerUnderExecution ,
141140 latest .isPresent ());
142141 if (latest .isEmpty ()) {
143- log .warn ("No {} resource found in cache for ResourceID: {}" ,
144- eventSourceManager .getController ().getConfiguration ().getResourceTypeName (),
145- resourceID );
142+ log .warn ("No {} resource found in cache for ResourceID: {}" , resourceType , resourceID );
146143 }
147144 }
148145 } finally {
0 commit comments