@@ -45,6 +45,7 @@ class EventProcessor<R extends HasMetadata> implements EventHandler, LifecycleAw
45
45
private final Map <ResourceID , RetryExecution > retryState = new HashMap <>();
46
46
private final ExecutorService executor ;
47
47
private final String controllerName ;
48
+ private final String resourceType ;
48
49
private final ReentrantLock lock = new ReentrantLock ();
49
50
private final Metrics metrics ;
50
51
private volatile boolean running ;
@@ -54,6 +55,7 @@ class EventProcessor<R extends HasMetadata> implements EventHandler, LifecycleAw
54
55
EventProcessor (EventSourceManager <R > eventSourceManager ) {
55
56
this (ExecutorServiceManager .instance ().executorService (),
56
57
eventSourceManager .getController ().getConfiguration ().getName (),
58
+ eventSourceManager .getController ().getConfiguration ().getResourceTypeName (),
57
59
new ReconciliationDispatcher <>(eventSourceManager .getController ()),
58
60
GenericRetry .fromConfiguration (
59
61
eventSourceManager .getController ().getConfiguration ().getRetryConfiguration ()),
@@ -63,16 +65,12 @@ class EventProcessor<R extends HasMetadata> implements EventHandler, LifecycleAw
63
65
}
64
66
65
67
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 );
72
70
}
73
71
74
72
private EventProcessor (ExecutorService executor ,
75
- String relatedControllerName ,
73
+ String relatedControllerName , String resourceTypeName ,
76
74
ReconciliationDispatcher <R > reconciliationDispatcher , Retry retry , Metrics metrics ,
77
75
EventSourceManager <R > eventSourceManager ) {
78
76
this .executor =
@@ -85,6 +83,7 @@ private EventProcessor(ExecutorService executor,
85
83
this .retry = retry ;
86
84
this .metrics = metrics != null ? metrics : Metrics .NOOP ;
87
85
this .eventSourceManager = eventSourceManager ;
86
+ this .resourceType = resourceTypeName ;
88
87
}
89
88
90
89
EventMarker getEventMarker () {
@@ -140,9 +139,7 @@ private void submitReconciliationExecution(ResourceID resourceID) {
140
139
controllerUnderExecution ,
141
140
latest .isPresent ());
142
141
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 );
146
143
}
147
144
}
148
145
} finally {
0 commit comments