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

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

                Author: ASF GitHub Bot
            Created on: 28/Jul/21 19:54
            Start Date: 28/Jul/21 19:54
    Worklog Time Spent: 10m 
      Work Description: sv2000 commented on a change in pull request #3340:
URL: https://github.com/apache/gobblin/pull/3340#discussion_r678608777



##########
File path: 
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java
##########
@@ -202,8 +202,9 @@ private void scheduleSpecsFromCatalog() {
     while (specUris.hasNext()) {
       Spec spec = this.flowCatalog.get().getSpecWrapper(specUris.next());
       try {
-        // Disable FLOW_RUN_IMMEDIATELY on service startup or leadership change
-        if (spec instanceof FlowSpec) {
+        // Disable FLOW_RUN_IMMEDIATELY on service startup or leadership 
change if the property is set to true
+        if (spec instanceof FlowSpec && ((FlowSpec) 
spec).getConfigAsProperties()
+            .getProperty(ConfigurationKeys.FLOW_RUN_IMMEDIATELY, 
"false").equals("true")) {

Review comment:
       Use PropertiesUtils.getPropAsBoolean() here and check for the boolean 
instead of the string value.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 630739)
    Time Spent: 2h 50m  (was: 2h 40m)

> Reduce the number of calls to create FlowSpecs and configToProperties
> ---------------------------------------------------------------------
>
>                 Key: GOBBLIN-1497
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1497
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: William Lo
>            Priority: Major
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> FlowSpecs contain both configs and property fields that duplicate the same 
> key/value information, however there are slight differences with properties 
> being mutable, configs being type-safe, and legacy code being compatible with 
> properties but not configs.
> As such, FlowSpec creation and configToProperties are memory expensive 
> operations at scale, and we should aim to minimize them as much as possible.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to