You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "umustafi (via GitHub)" <gi...@apache.org> on 2023/09/19 19:16:05 UTC

[GitHub] [gobblin] umustafi opened a new pull request, #3779: [GOBBLIN-1913] Remove extra information from scheduler trigger tracing logs

umustafi opened a new pull request, #3779:
URL: https://github.com/apache/gobblin/pull/3779

   Dear Gobblin maintainers,
   
   Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
   
   
   ### JIRA
   - [X] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
       - https://issues.apache.org/jira/browse/GOBBLIN-1913
   
   
   ### Description
   - [X] Here are some details about my PR, including screenshots (if applicable):
   We've determined the correct timezone for timestamp conversions in the scheduler trigger tracing logs. Remove unnecessary information to make log easier to read. 
   
   ### Tests
   - [X] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   
   
   ### Commits
   - [X] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
       1. Subject is separated from body by a blank line
       2. Subject is limited to 50 characters
       3. Subject does not end with a period
       4. Subject uses the imperative mood ("add", not "adding")
       5. Body wraps at 72 characters
       6. Body explains "what" and "why", not "how"
   
   


-- 
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: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [gobblin] umustafi commented on a diff in pull request #3779: [GOBBLIN-1913] Remove extra information from scheduler trigger tracing logs

Posted by "umustafi (via GitHub)" <gi...@apache.org>.
umustafi commented on code in PR #3779:
URL: https://github.com/apache/gobblin/pull/3779#discussion_r1330667276


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java:
##########
@@ -754,25 +753,24 @@ public void executeImpl(JobExecutionContext context) throws JobExecutionExceptio
         Trigger trigger = context.getTrigger();
         // THIS current event has already fired if this method is called, so it now exists in <previousFireTime>
         long triggerTimeMillis = utcDateAsUTCEpochMillis(trigger.getPreviousFireTime());
-        long localTZTriggerTimeMillis = systemDefaultZoneDateAsUTCEpochMillis(trigger.getPreviousFireTime());
         // If the trigger is a reminder type event then utilize the trigger time saved in job properties rather than the
         // actual firing time
         if (jobDetail.getKey().getName().contains("reminder")) {
           String preservedConsensusEventTime = jobProps.getProperty(
               ConfigurationKeys.SCHEDULER_PRESERVED_CONSENSUS_EVENT_TIME_MILLIS_KEY, "0");
           String expectedReminderTime = jobProps.getProperty(
               ConfigurationKeys.SCHEDULER_EXPECTED_REMINDER_TIME_MILLIS_KEY, "0");
-          _log.info(jobSchedulerTracePrefixBuilder(jobProps) + "triggerTime: {} expectedReminderTime: {} - Reminder job "
-              + "triggered by scheduler at {}", preservedConsensusEventTime, expectedReminderTime, triggerTimeMillis);
+          _log.info(jobSchedulerTracePrefixBuilder(jobProps) + "triggerTime  (in UTC): {} expectedReminderTime  (in "
+              + "UTC): {} - Reminder job triggered by scheduler at {}", preservedConsensusEventTime,
+              expectedReminderTime, triggerTimeMillis);
           // TODO: add a metric if expected reminder time far exceeds system time
           jobProps.setProperty(ConfigurationKeys.ORCHESTRATOR_TRIGGER_EVENT_TIME_MILLIS_KEY, preservedConsensusEventTime);
         } else {
           jobProps.setProperty(ConfigurationKeys.ORCHESTRATOR_TRIGGER_EVENT_TIME_MILLIS_KEY,
               String.valueOf(triggerTimeMillis));
-          _log.info(jobSchedulerTracePrefixBuilder(jobProps) + "triggerTime: {} nextTriggerTime: {} "
-              + "localTZTriggerTime: {} localTZNextTriggerTime: {}- Job triggered by scheduler", triggerTimeMillis,
-              utcDateAsUTCEpochMillis(trigger.getNextFireTime()), localTZTriggerTimeMillis,
-              systemDefaultZoneDateAsUTCEpochMillis(trigger.getNextFireTime()));
+          _log.info(jobSchedulerTracePrefixBuilder(jobProps) + "triggerTime (in UTC): {} nextTriggerTime (in UTC): {} -"

Review Comment:
   space is on the next line the diff isn't showing it correctly



-- 
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: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [gobblin] Will-Lo merged pull request #3779: [GOBBLIN-1913] Remove extra information from scheduler trigger tracing logs

Posted by "Will-Lo (via GitHub)" <gi...@apache.org>.
Will-Lo merged PR #3779:
URL: https://github.com/apache/gobblin/pull/3779


-- 
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: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [gobblin] phet commented on a diff in pull request #3779: [GOBBLIN-1913] Remove extra information from scheduler trigger tracing logs

Posted by "phet (via GitHub)" <gi...@apache.org>.
phet commented on code in PR #3779:
URL: https://github.com/apache/gobblin/pull/3779#discussion_r1330654344


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java:
##########
@@ -466,9 +466,8 @@ public synchronized void scheduleJob(Properties jobProps, JobListener jobListene
   @Override
   protected void logNewlyScheduledJob(JobDetail job, Trigger trigger) {
     Properties jobProps = (Properties) job.getJobDataMap().get(PROPERTIES_KEY);
-    log.info(jobSchedulerTracePrefixBuilder(jobProps) + "nextTriggerTime: {} localTZNextTriggerTime:{} - Job newly "
-            + "scheduled", utcDateAsUTCEpochMillis(trigger.getNextFireTime()),
-        systemDefaultZoneDateAsUTCEpochMillis(trigger.getNextFireTime()));
+    log.info(jobSchedulerTracePrefixBuilder(jobProps) + "nextTriggerTime (in UTC): {} - Job newly "

Review Comment:
   rather than sprinkling " (in UTC)" so many places, what if we modified `jobSchedulerTracePrefixBuilder` so it read something like:
   ```
   "Scheduler trigger tracing (in epoch-ms UTC): [flowName:..."
   ```
   ?
   
   (so just once in the log line's prefix)



##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandler.java:
##########
@@ -211,8 +211,7 @@ protected Trigger createAndScheduleReminder(JobKey origJobKey, MultiActiveLeaseA
         triggerEventTimeMillis);
     Trigger reminderTrigger = JobScheduler.createTriggerForJob(reminderJobKey, getJobPropertiesFromJobDetail(jobDetail),
         Optional.of(reminderSuffix));
-    // TODO: remove this comment once we've confirmed this function works
-    log.info("Flow Trigger Handler - [{}, eventTimestamp: {}] -  attempting to schedule reminder for event {} with"
+    log.debug("Flow Trigger Handler - [{}, eventTimestamp: {}] -  attempting to schedule reminder for event {} with"

Review Comment:
   looks like we'd want a space after "with"



##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java:
##########
@@ -754,25 +753,24 @@ public void executeImpl(JobExecutionContext context) throws JobExecutionExceptio
         Trigger trigger = context.getTrigger();
         // THIS current event has already fired if this method is called, so it now exists in <previousFireTime>
         long triggerTimeMillis = utcDateAsUTCEpochMillis(trigger.getPreviousFireTime());
-        long localTZTriggerTimeMillis = systemDefaultZoneDateAsUTCEpochMillis(trigger.getPreviousFireTime());
         // If the trigger is a reminder type event then utilize the trigger time saved in job properties rather than the
         // actual firing time
         if (jobDetail.getKey().getName().contains("reminder")) {
           String preservedConsensusEventTime = jobProps.getProperty(
               ConfigurationKeys.SCHEDULER_PRESERVED_CONSENSUS_EVENT_TIME_MILLIS_KEY, "0");
           String expectedReminderTime = jobProps.getProperty(
               ConfigurationKeys.SCHEDULER_EXPECTED_REMINDER_TIME_MILLIS_KEY, "0");
-          _log.info(jobSchedulerTracePrefixBuilder(jobProps) + "triggerTime: {} expectedReminderTime: {} - Reminder job "
-              + "triggered by scheduler at {}", preservedConsensusEventTime, expectedReminderTime, triggerTimeMillis);
+          _log.info(jobSchedulerTracePrefixBuilder(jobProps) + "triggerTime  (in UTC): {} expectedReminderTime  (in "
+              + "UTC): {} - Reminder job triggered by scheduler at {}", preservedConsensusEventTime,
+              expectedReminderTime, triggerTimeMillis);
           // TODO: add a metric if expected reminder time far exceeds system time
           jobProps.setProperty(ConfigurationKeys.ORCHESTRATOR_TRIGGER_EVENT_TIME_MILLIS_KEY, preservedConsensusEventTime);
         } else {
           jobProps.setProperty(ConfigurationKeys.ORCHESTRATOR_TRIGGER_EVENT_TIME_MILLIS_KEY,
               String.valueOf(triggerTimeMillis));
-          _log.info(jobSchedulerTracePrefixBuilder(jobProps) + "triggerTime: {} nextTriggerTime: {} "
-              + "localTZTriggerTime: {} localTZNextTriggerTime: {}- Job triggered by scheduler", triggerTimeMillis,
-              utcDateAsUTCEpochMillis(trigger.getNextFireTime()), localTZTriggerTimeMillis,
-              systemDefaultZoneDateAsUTCEpochMillis(trigger.getNextFireTime()));
+          _log.info(jobSchedulerTracePrefixBuilder(jobProps) + "triggerTime (in UTC): {} nextTriggerTime (in UTC): {} -"

Review Comment:
   add a space before '-'?



-- 
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: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [gobblin] codecov-commenter commented on pull request #3779: [GOBBLIN-1913] Remove extra information from scheduler trigger tracing logs

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3779:
URL: https://github.com/apache/gobblin/pull/3779#issuecomment-1729959020

   ## [Codecov](https://app.codecov.io/gh/apache/gobblin/pull/3779?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#3779](https://app.codecov.io/gh/apache/gobblin/pull/3779?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (00ae0ea) into [master](https://app.codecov.io/gh/apache/gobblin/commit/a28961370ffbd41e740b9e6b9238b1c9d91ae6ac?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (a289613) will **decrease** coverage by `1.31%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3779      +/-   ##
   ============================================
   - Coverage     47.30%   45.99%   -1.31%     
   + Complexity    10953     2177    -8776     
   ============================================
     Files          2152      416    -1736     
     Lines         85114    17987   -67127     
     Branches       9452     2191    -7261     
   ============================================
   - Hits          40263     8274   -31989     
   + Misses        41197     8830   -32367     
   + Partials       3654      883    -2771     
   ```
   
   
   [see 1737 files with indirect coverage changes](https://app.codecov.io/gh/apache/gobblin/pull/3779/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
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: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org