[ 
https://issues.apache.org/jira/browse/GOBBLIN-1978?focusedWorklogId=896926&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-896926
 ]

ASF GitHub Bot logged work on GOBBLIN-1978:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Dec/23 17:45
            Start Date: 22/Dec/23 17:45
    Worklog Time Spent: 10m 
      Work Description: umustafi commented on code in PR #3851:
URL: https://github.com/apache/gobblin/pull/3851#discussion_r1435248873


##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/DagActionStoreChangeMonitor.java:
##########
@@ -136,6 +142,23 @@ protected void initializeMonitor() {
     }
   }
 
+  /*
+   Override this method to do the same sequence as the parent class, except 
create metrics. Instead, we create metrics
+   earlier upon class initialization because they are used immediately as dag 
actions are loaded and processed from
+   the DagActionStore.
+  */
+  @Override
+  protected void startUp() {

Review Comment:
   A lot of existing tests need to be refactored if I do this and may end up 
having some unintended consequences bc HighLevelConsumer is used in many 
places. I'd rather not invest the time updating tests and debugging changes.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 896926)
    Time Spent: 50m  (was: 40m)

> Create DagActionStoreMonitor metrics before Loading DagActions
> --------------------------------------------------------------
>
>                 Key: GOBBLIN-1978
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1978
>             Project: Apache Gobblin
>          Issue Type: Bug
>          Components: gobblin-service
>            Reporter: Urmi Mustafi
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> We encounter a NullPointerException when initializing the 
> DagActionStoreMonitor after moving the loading of DagActions on startup from 
> the DagManager to the DagActionStoreMonitor. Metrics for the 
> DagActionStoreMonitor were initialized by its parent class the 
> HighLevelConsumer only before starting to consume Kafka messages, however 
> with the refactor these metrics are needed beforehand. In this PR I separate 
> the creation of these metrics into a separate function and call it before 
> loading dagActions. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to