[
https://issues.apache.org/jira/browse/GOBBLIN-1822?focusedWorklogId=858820&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-858820
]
ASF GitHub Bot logged work on GOBBLIN-1822:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 25/Apr/23 01:39
Start Date: 25/Apr/23 01:39
Worklog Time Spent: 10m
Work Description: homatthew commented on code in PR #3685:
URL: https://github.com/apache/gobblin/pull/3685#discussion_r1175929507
##########
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnAutoScalingManager.java:
##########
@@ -220,8 +227,21 @@ void runInternal() {
int numPartitions = 0;
String jobTag = defaultHelixInstanceTags;
if (jobContext != null) {
-
inUseInstances.addAll(jobContext.getPartitionSet().stream().map(jobContext::getAssignedParticipant)
- .filter(Objects::nonNull).collect(Collectors.toSet()));
+ log.debug("JobContext {} num partitions {}", jobContext,
jobContext.getPartitionSet().size());
+
+ inUseInstances.addAll(jobContext.getPartitionSet().stream().map(i
-> {
+ if (jobContext.getPartitionNumAttempts(i) >
THRESHOLD_NUMBER_OF_ATTEMPTS_FOR_LOGGING) {
+ log.warn("Helix task {} has been retried for {} times, please
check the config to see how we can handle this task better",
jobContext.getTaskIdForPartition(i), jobContext.getPartitionNumAttempts(i));
+ }
+ if
(!UNUSUAL_HELIX_TASK_STATES.contains(jobContext.getPartitionState(i))) {
+ return jobContext.getAssignedParticipant(i);
+ } else {
Review Comment:
Nit: This else is redundant, IMO it makes sense to remove it especially
since we are 5 indentation levels deep already.
Nit2: This method is a super method, and I'd encourage extracting some of
the logic here. But as-is it's still readable to me (maybe not to a new comer)
Issue Time Tracking
-------------------
Worklog Id: (was: 858820)
Time Spent: 1h (was: 50m)
> Logging Abnormal Helix Task States
> ----------------------------------
>
> Key: GOBBLIN-1822
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1822
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: Zihan Li
> Priority: Major
> Time Spent: 1h
> Remaining Estimate: 0h
>
> Currently, in the autoScalingManager, we iterate through all Helix tasks
> without logging their statuses. This means that if any issues occur and we
> need to restart the pipeline, we lose the Helix status information, making it
> difficult to investigate the problem further.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)