[jira] [Work logged] (GOBBLIN-1042) ForkMetrics generates parent metric object with incorrect type
[ https://issues.apache.org/jira/browse/GOBBLIN-1042?focusedWorklogId=386960=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-386960 ] ASF GitHub Bot logged work on GOBBLIN-1042: --- Author: ASF GitHub Bot Created on: 13/Feb/20 23:54 Start Date: 13/Feb/20 23:54 Worklog Time Spent: 10m Work Description: asfgit commented on pull request #2882: [GOBBLIN-1042] Fix ForkMetric incorrect return type of parent metric object and relevant unit tests URL: https://github.com/apache/incubator-gobblin/pull/2882 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 386960) Time Spent: 1h 40m (was: 1.5h) > ForkMetrics generates parent metric object with incorrect type > -- > > Key: GOBBLIN-1042 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1042 > Project: Apache Gobblin > Issue Type: Improvement >Reporter: Lei Sun >Priority: Major > Time Spent: 1h 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (GOBBLIN-1042) ForkMetrics generates parent metric object with incorrect type
[ https://issues.apache.org/jira/browse/GOBBLIN-1042?focusedWorklogId=386952=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-386952 ] ASF GitHub Bot logged work on GOBBLIN-1042: --- Author: ASF GitHub Bot Created on: 13/Feb/20 23:36 Start Date: 13/Feb/20 23:36 Worklog Time Spent: 10m Work Description: codecov-io commented on issue #2882: [GOBBLIN-1042] Fix ForkMetric incorrect return type of parent metric object and relevant unit tests URL: https://github.com/apache/incubator-gobblin/pull/2882#issuecomment-583152328 # [Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=h1) Report > Merging [#2882](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-gobblin/commit/10f593223902aaed18d045095e812a2e04da04db?src=pr=desc) will **increase** coverage by `0.09%`. > The diff coverage is `19.23%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/graphs/tree.svg?width=650=4MgURJ0bGc=150=pr)](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=tree) ```diff @@ Coverage Diff @@ ## master#2882 +/- ## + Coverage 45.72% 45.82% +0.09% - Complexity 9129 9147 +18 Files 1926 1929 +3 Lines 7256372599 +36 Branches 7993 7993 + Hits 3318033265 +85 + Misses3634836298 -50 - Partials 3035 3036 +1 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=tree) | Coverage Δ | Complexity Δ | | |---|---|---|---| | [...apache/gobblin/metrics/GobblinMetricsRegistry.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1tZXRyaWNzLWxpYnMvZ29iYmxpbi1tZXRyaWNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL21ldHJpY3MvR29iYmxpbk1ldHJpY3NSZWdpc3RyeS5qYXZh) | `27.58% <ø> (ø)` | `6 <0> (ø)` | :arrow_down: | | [...ache/gobblin/cluster/InMemorySingleTaskRunner.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSW5NZW1vcnlTaW5nbGVUYXNrUnVubmVyLmphdmE=) | `100% <0%> (ø)` | `3 <0> (?)` | | | [...g/apache/gobblin/cluster/InMemoryWuSingleTask.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSW5NZW1vcnlXdVNpbmdsZVRhc2suamF2YQ==) | `100% <0%> (ø)` | `3 <0> (?)` | | | [...a/org/apache/gobblin/cluster/SingleTaskRunner.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvU2luZ2xlVGFza1J1bm5lci5qYXZh) | `87.71% <0%> (+85.86%)` | `11 <0> (+10)` | :arrow_up: | | [...ava/org/apache/gobblin/metrics/GobblinMetrics.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1tZXRyaWNzLWxpYnMvZ29iYmxpbi1tZXRyaWNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL21ldHJpY3MvR29iYmxpbk1ldHJpY3MuamF2YQ==) | `18.8% <0%> (-0.06%)` | `15 <0> (ø)` | | | [...he/gobblin/cluster/InMemoryWuFailedSingleTask.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSW5NZW1vcnlXdUZhaWxlZFNpbmdsZVRhc2suamF2YQ==) | `100% <0%> (ø)` | `3 <0> (?)` | | | [...in/java/org/apache/gobblin/cluster/SingleTask.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvU2luZ2xlVGFzay5qYXZh) | `81.48% <0%> (+0.34%)` | `10 <0> (ø)` | :arrow_down: | | [...a/org/apache/gobblin/cluster/ContainerMetrics.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvQ29udGFpbmVyTWV0cmljcy5qYXZh) | `100% <0%> (ø)` | `4 <0> (ø)` | :arrow_down: | | [...pache/gobblin/runtime/GobblinMultiTaskAttempt.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvR29iYmxpbk11bHRpVGFza0F0dGVtcHQuamF2YQ==) | `56.88% <100%> (+0.38%)` | `27 <0> (ø)` | :arrow_down: | |
[jira] [Work logged] (GOBBLIN-1042) ForkMetrics generates parent metric object with incorrect type
[ https://issues.apache.org/jira/browse/GOBBLIN-1042?focusedWorklogId=386951=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-386951 ] ASF GitHub Bot logged work on GOBBLIN-1042: --- Author: ASF GitHub Bot Created on: 13/Feb/20 23:35 Start Date: 13/Feb/20 23:35 Worklog Time Spent: 10m Work Description: codecov-io commented on issue #2882: [GOBBLIN-1042] Fix ForkMetric incorrect return type of parent metric object and relevant unit tests URL: https://github.com/apache/incubator-gobblin/pull/2882#issuecomment-583152328 # [Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=h1) Report > Merging [#2882](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-gobblin/commit/10f593223902aaed18d045095e812a2e04da04db?src=pr=desc) will **increase** coverage by `0.09%`. > The diff coverage is `94.23%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/graphs/tree.svg?width=650=4MgURJ0bGc=150=pr)](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=tree) ```diff @@ Coverage Diff @@ ## master#2882 +/- ## + Coverage 45.72% 45.82% +0.09% - Complexity 9129 9147 +18 Files 1926 1929 +3 Lines 7256372599 +36 Branches 7993 7993 + Hits 3318033265 +85 + Misses3634836298 -50 - Partials 3035 3036 +1 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=tree) | Coverage Δ | Complexity Δ | | |---|---|---|---| | [...apache/gobblin/metrics/GobblinMetricsRegistry.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1tZXRyaWNzLWxpYnMvZ29iYmxpbi1tZXRyaWNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL21ldHJpY3MvR29iYmxpbk1ldHJpY3NSZWdpc3RyeS5qYXZh) | `27.58% <ø> (ø)` | `6 <0> (ø)` | :arrow_down: | | [...ache/gobblin/cluster/InMemorySingleTaskRunner.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSW5NZW1vcnlTaW5nbGVUYXNrUnVubmVyLmphdmE=) | `100% <100%> (ø)` | `3 <3> (?)` | | | [...g/apache/gobblin/cluster/InMemoryWuSingleTask.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSW5NZW1vcnlXdVNpbmdsZVRhc2suamF2YQ==) | `100% <100%> (ø)` | `3 <3> (?)` | | | [...pache/gobblin/runtime/GobblinMultiTaskAttempt.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvR29iYmxpbk11bHRpVGFza0F0dGVtcHQuamF2YQ==) | `56.88% <100%> (+0.38%)` | `27 <0> (ø)` | :arrow_down: | | [...a/org/apache/gobblin/runtime/util/ForkMetrics.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvdXRpbC9Gb3JrTWV0cmljcy5qYXZh) | `100% <100%> (ø)` | `5 <2> (-1)` | :arrow_down: | | [...a/org/apache/gobblin/runtime/util/TaskMetrics.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvdXRpbC9UYXNrTWV0cmljcy5qYXZh) | `81.25% <100%> (ø)` | `8 <1> (ø)` | :arrow_down: | | [...he/gobblin/cluster/InMemoryWuFailedSingleTask.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSW5NZW1vcnlXdUZhaWxlZFNpbmdsZVRhc2suamF2YQ==) | `100% <100%> (ø)` | `3 <3> (?)` | | | [...in/java/org/apache/gobblin/cluster/SingleTask.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvU2luZ2xlVGFzay5qYXZh) | `81.48% <100%> (+0.34%)` | `10 <0> (ø)` | :arrow_down: | | [...a/org/apache/gobblin/cluster/ContainerMetrics.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvQ29udGFpbmVyTWV0cmljcy5qYXZh) | `100% <100%> (ø)` | `4 <1> (ø)` | :arrow_down: | |
[jira] [Work logged] (GOBBLIN-1042) ForkMetrics generates parent metric object with incorrect type
[ https://issues.apache.org/jira/browse/GOBBLIN-1042?focusedWorklogId=386333=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-386333 ] ASF GitHub Bot logged work on GOBBLIN-1042: --- Author: ASF GitHub Bot Created on: 13/Feb/20 01:07 Start Date: 13/Feb/20 01:07 Worklog Time Spent: 10m Work Description: autumnust commented on pull request #2882: [GOBBLIN-1042] Fix ForkMetric incorrect return type of parent metric object and relevant unit tests URL: https://github.com/apache/incubator-gobblin/pull/2882#discussion_r378601088 ## File path: gobblin-cluster/src/main/java/org/apache/gobblin/cluster/InMemoryWuSingleTask.java ## @@ -0,0 +1,94 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + *http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.gobblin.cluster; + +import java.io.IOException; +import java.util.List; + +import org.apache.gobblin.configuration.ConfigurationKeys; +import org.apache.gobblin.runtime.JobState; +import org.apache.gobblin.runtime.util.StateStores; +import org.apache.gobblin.source.workunit.WorkUnit; +import org.apache.gobblin.writer.DataWriter; +import org.apache.gobblin.writer.DataWriterBuilder; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; + +import com.google.common.collect.Lists; +import com.typesafe.config.Config; + +/** + * Instead of deserializing {@link JobState} and {@link WorkUnit} from filesystem, create them in memory. + * Uses {@link DummyDataWriter} so that the execution of a Task goes through. + */ +public class InMemoryWuSingleTask extends InMemoryWuFailedSingleTask { Review comment: SGTM. Addressed. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 386333) Time Spent: 1h 10m (was: 1h) > ForkMetrics generates parent metric object with incorrect type > -- > > Key: GOBBLIN-1042 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1042 > Project: Apache Gobblin > Issue Type: Improvement >Reporter: Lei Sun >Priority: Major > Time Spent: 1h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (GOBBLIN-1042) ForkMetrics generates parent metric object with incorrect type
[ https://issues.apache.org/jira/browse/GOBBLIN-1042?focusedWorklogId=386332=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-386332 ] ASF GitHub Bot logged work on GOBBLIN-1042: --- Author: ASF GitHub Bot Created on: 13/Feb/20 01:03 Start Date: 13/Feb/20 01:03 Worklog Time Spent: 10m Work Description: autumnust commented on pull request #2882: [GOBBLIN-1042] Fix ForkMetric incorrect return type of parent metric object and relevant unit tests URL: https://github.com/apache/incubator-gobblin/pull/2882#discussion_r378599944 ## File path: gobblin-runtime/src/main/java/org/apache/gobblin/runtime/GobblinMultiTaskAttempt.java ## @@ -400,15 +403,20 @@ private boolean taskSuccessfulInPriorAttempt(String taskId) { // task could not be created, so directly count down countDownLatch.countDown(); log.error("Could not create task for workunit {}", workUnit, e); -} else if (!task.hasTaskFuture()) { - // Task was created and may have been registered, but not submitted, so call the - // task state tracker task run completion directly since the task cancel does nothing if not submitted - this.taskStateTracker.onTaskRunCompletion(task); - log.error("Could not submit task for workunit {}", workUnit, e); } else { - // task was created and submitted, but failed later, so cancel the task to decrement the CountDownLatch - task.cancel(); - log.error("Failure after task submitted for workunit {}", workUnit, e); + if (!task.hasTaskFuture()) { +// Task was created and may have been registered, but not submitted, so call the +// task state tracker task run completion directly since the task cancel does nothing if not submitted +this.taskStateTracker.onTaskRunCompletion(task); +log.error("Could not submit task for workunit {}", workUnit, e); + } else { +// task was created and submitted, but failed later, so cancel the task to decrement the CountDownLatch +task.cancel(); +log.error("Failure after task submitted for workunit {}", workUnit, e); + } + + // Remove entry in the metrics registry when task failed to be executed . + this.cleanMetrics(); Review comment: Looks like I shouldn't clean the metric registry since it is a class-static variable shared by all instances. Adjust the logic. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 386332) Time Spent: 1h (was: 50m) > ForkMetrics generates parent metric object with incorrect type > -- > > Key: GOBBLIN-1042 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1042 > Project: Apache Gobblin > Issue Type: Improvement >Reporter: Lei Sun >Priority: Major > Time Spent: 1h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (GOBBLIN-1042) ForkMetrics generates parent metric object with incorrect type
[ https://issues.apache.org/jira/browse/GOBBLIN-1042?focusedWorklogId=386328=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-386328 ] ASF GitHub Bot logged work on GOBBLIN-1042: --- Author: ASF GitHub Bot Created on: 13/Feb/20 00:45 Start Date: 13/Feb/20 00:45 Worklog Time Spent: 10m Work Description: sv2000 commented on pull request #2882: [GOBBLIN-1042] Fix ForkMetric incorrect return type of parent metric object and relevant unit tests URL: https://github.com/apache/incubator-gobblin/pull/2882#discussion_r378591669 ## File path: gobblin-cluster/src/test/java/org/apache/gobblin/cluster/TestSingleTaskRerun.java ## @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + *http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.gobblin.cluster; + +import org.junit.Assert; +import org.testng.annotations.Test; + + +/** + * Notes & Usage: + * 0. This test could be used to reproduce task-execution issue in Gobblin-Cluster, within each container. + * 1. The workunit is being drafted in {@link InMemoryWuFailedSingleTask}. Review comment: drafted -> created? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 386328) Time Spent: 40m (was: 0.5h) > ForkMetrics generates parent metric object with incorrect type > -- > > Key: GOBBLIN-1042 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1042 > Project: Apache Gobblin > Issue Type: Improvement >Reporter: Lei Sun >Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (GOBBLIN-1042) ForkMetrics generates parent metric object with incorrect type
[ https://issues.apache.org/jira/browse/GOBBLIN-1042?focusedWorklogId=386330=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-386330 ] ASF GitHub Bot logged work on GOBBLIN-1042: --- Author: ASF GitHub Bot Created on: 13/Feb/20 00:45 Start Date: 13/Feb/20 00:45 Worklog Time Spent: 10m Work Description: sv2000 commented on pull request #2882: [GOBBLIN-1042] Fix ForkMetric incorrect return type of parent metric object and relevant unit tests URL: https://github.com/apache/incubator-gobblin/pull/2882#discussion_r378594183 ## File path: gobblin-cluster/src/main/java/org/apache/gobblin/cluster/InMemoryWuSingleTask.java ## @@ -0,0 +1,94 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + *http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.gobblin.cluster; + +import java.io.IOException; +import java.util.List; + +import org.apache.gobblin.configuration.ConfigurationKeys; +import org.apache.gobblin.runtime.JobState; +import org.apache.gobblin.runtime.util.StateStores; +import org.apache.gobblin.source.workunit.WorkUnit; +import org.apache.gobblin.writer.DataWriter; +import org.apache.gobblin.writer.DataWriterBuilder; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; + +import com.google.common.collect.Lists; +import com.typesafe.config.Config; + +/** + * Instead of deserializing {@link JobState} and {@link WorkUnit} from filesystem, create them in memory. + * Uses {@link DummyDataWriter} so that the execution of a Task goes through. + */ +public class InMemoryWuSingleTask extends InMemoryWuFailedSingleTask { Review comment: Perhaps better to not have a successful task extend a "meant-to-fail" task. If avoiding code duplication is the intention here, we can perhaps refactor the getJobState and getWorkUnits method of InMemoryWuFailedSingleTask to an abstract InMemorySingleTask class and have both failed/successful tasks extend the abstract class? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 386330) Time Spent: 50m (was: 40m) > ForkMetrics generates parent metric object with incorrect type > -- > > Key: GOBBLIN-1042 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1042 > Project: Apache Gobblin > Issue Type: Improvement >Reporter: Lei Sun >Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (GOBBLIN-1042) ForkMetrics generates parent metric object with incorrect type
[ https://issues.apache.org/jira/browse/GOBBLIN-1042?focusedWorklogId=386329=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-386329 ] ASF GitHub Bot logged work on GOBBLIN-1042: --- Author: ASF GitHub Bot Created on: 13/Feb/20 00:45 Start Date: 13/Feb/20 00:45 Worklog Time Spent: 10m Work Description: sv2000 commented on pull request #2882: [GOBBLIN-1042] Fix ForkMetric incorrect return type of parent metric object and relevant unit tests URL: https://github.com/apache/incubator-gobblin/pull/2882#discussion_r378591196 ## File path: gobblin-runtime/src/main/java/org/apache/gobblin/runtime/GobblinMultiTaskAttempt.java ## @@ -400,15 +403,20 @@ private boolean taskSuccessfulInPriorAttempt(String taskId) { // task could not be created, so directly count down countDownLatch.countDown(); log.error("Could not create task for workunit {}", workUnit, e); -} else if (!task.hasTaskFuture()) { - // Task was created and may have been registered, but not submitted, so call the - // task state tracker task run completion directly since the task cancel does nothing if not submitted - this.taskStateTracker.onTaskRunCompletion(task); - log.error("Could not submit task for workunit {}", workUnit, e); } else { - // task was created and submitted, but failed later, so cancel the task to decrement the CountDownLatch - task.cancel(); - log.error("Failure after task submitted for workunit {}", workUnit, e); + if (!task.hasTaskFuture()) { +// Task was created and may have been registered, but not submitted, so call the +// task state tracker task run completion directly since the task cancel does nothing if not submitted +this.taskStateTracker.onTaskRunCompletion(task); +log.error("Could not submit task for workunit {}", workUnit, e); + } else { +// task was created and submitted, but failed later, so cancel the task to decrement the CountDownLatch +task.cancel(); +log.error("Failure after task submitted for workunit {}", workUnit, e); + } + + // Remove entry in the metrics registry when task failed to be executed . + this.cleanMetrics(); Review comment: Should we be cleaning metrics when task execution fails? Currently, cleanMetrics() will clean up metrics for all tasks associated with a Multi-task attempt. Won't we delete metrics for tasks which may be currently running? 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 386329) Time Spent: 40m (was: 0.5h) > ForkMetrics generates parent metric object with incorrect type > -- > > Key: GOBBLIN-1042 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1042 > Project: Apache Gobblin > Issue Type: Improvement >Reporter: Lei Sun >Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (GOBBLIN-1042) ForkMetrics generates parent metric object with incorrect type
[ https://issues.apache.org/jira/browse/GOBBLIN-1042?focusedWorklogId=383234=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-383234 ] ASF GitHub Bot logged work on GOBBLIN-1042: --- Author: ASF GitHub Bot Created on: 06/Feb/20 23:01 Start Date: 06/Feb/20 23:01 Worklog Time Spent: 10m Work Description: codecov-io commented on issue #2882: [GOBBLIN-1042] Fix ForkMetric incorrect return type of parent metric object and relevant unit tests URL: https://github.com/apache/incubator-gobblin/pull/2882#issuecomment-583152328 # [Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=h1) Report > Merging [#2882](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-gobblin/commit/ef3003c85531aaeacb760a4e30fca2d3069001aa?src=pr=desc) will **increase** coverage by `0.08%`. > The diff coverage is `18.51%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/graphs/tree.svg?width=650=4MgURJ0bGc=150=pr)](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=tree) ```diff @@ Coverage Diff @@ ## master#2882 +/- ## + Coverage 45.73% 45.81% +0.08% - Complexity 9112 9130 +18 Files 1921 1924 +3 Lines 7239172424 +33 Branches 7967 7967 + Hits 3310633182 +76 + Misses3626236220 -42 + Partials 3023 3022 -1 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=tree) | Coverage Δ | Complexity Δ | | |---|---|---|---| | [...apache/gobblin/metrics/GobblinMetricsRegistry.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1tZXRyaWNzLWxpYnMvZ29iYmxpbi1tZXRyaWNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL21ldHJpY3MvR29iYmxpbk1ldHJpY3NSZWdpc3RyeS5qYXZh) | `27.58% <ø> (ø)` | `6 <0> (ø)` | :arrow_down: | | [...ache/gobblin/cluster/InMemorySingleTaskRunner.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSW5NZW1vcnlTaW5nbGVUYXNrUnVubmVyLmphdmE=) | `100% <0%> (ø)` | `3 <0> (?)` | | | [...g/apache/gobblin/cluster/InMemoryWuSingleTask.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSW5NZW1vcnlXdVNpbmdsZVRhc2suamF2YQ==) | `100% <0%> (ø)` | `2 <0> (?)` | | | [...a/org/apache/gobblin/cluster/SingleTaskRunner.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvU2luZ2xlVGFza1J1bm5lci5qYXZh) | `87.71% <0%> (+85.86%)` | `11 <0> (+10)` | :arrow_up: | | [...ava/org/apache/gobblin/metrics/GobblinMetrics.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1tZXRyaWNzLWxpYnMvZ29iYmxpbi1tZXRyaWNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL21ldHJpY3MvR29iYmxpbk1ldHJpY3MuamF2YQ==) | `18.8% <0%> (-0.06%)` | `15 <0> (ø)` | | | [...he/gobblin/cluster/InMemoryWuFailedSingleTask.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSW5NZW1vcnlXdUZhaWxlZFNpbmdsZVRhc2suamF2YQ==) | `100% <0%> (ø)` | `3 <0> (?)` | | | [...in/java/org/apache/gobblin/cluster/SingleTask.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvU2luZ2xlVGFzay5qYXZh) | `81.48% <0%> (+0.34%)` | `9 <0> (ø)` | :arrow_down: | | [...a/org/apache/gobblin/cluster/ContainerMetrics.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvQ29udGFpbmVyTWV0cmljcy5qYXZh) | `100% <0%> (ø)` | `4 <0> (ø)` | :arrow_down: | | [...a/org/apache/gobblin/runtime/util/ForkMetrics.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvdXRpbC9Gb3JrTWV0cmljcy5qYXZh) | `100% <100%> (ø)` | `5 <2> (-1)` | :arrow_down: | |
[jira] [Work logged] (GOBBLIN-1042) ForkMetrics generates parent metric object with incorrect type
[ https://issues.apache.org/jira/browse/GOBBLIN-1042?focusedWorklogId=383232=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-383232 ] ASF GitHub Bot logged work on GOBBLIN-1042: --- Author: ASF GitHub Bot Created on: 06/Feb/20 22:58 Start Date: 06/Feb/20 22:58 Worklog Time Spent: 10m Work Description: codecov-io commented on issue #2882: [GOBBLIN-1042] Fix ForkMetric incorrect return type of parent metric object and relevant unit tests URL: https://github.com/apache/incubator-gobblin/pull/2882#issuecomment-583152328 # [Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=h1) Report > Merging [#2882](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-gobblin/commit/ef3003c85531aaeacb760a4e30fca2d3069001aa?src=pr=desc) will **decrease** coverage by `41.64%`. > The diff coverage is `18.51%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/graphs/tree.svg?width=650=4MgURJ0bGc=150=pr)](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #2882 +/- ## - Coverage 45.73% 4.09% -41.65% + Complexity 9112 747 -8365 Files 19211924+3 Lines 72391 72424 +33 Branches 79677967 - Hits 331062963-30143 - Misses36262 69143+32881 + Partials 3023 318 -2705 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-gobblin/pull/2882?src=pr=tree) | Coverage Δ | Complexity Δ | | |---|---|---|---| | [...apache/gobblin/metrics/GobblinMetricsRegistry.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1tZXRyaWNzLWxpYnMvZ29iYmxpbi1tZXRyaWNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL21ldHJpY3MvR29iYmxpbk1ldHJpY3NSZWdpc3RyeS5qYXZh) | `0% <ø> (-27.59%)` | `0 <0> (-6)` | | | [...ache/gobblin/cluster/InMemorySingleTaskRunner.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSW5NZW1vcnlTaW5nbGVUYXNrUnVubmVyLmphdmE=) | `0% <0%> (ø)` | `0 <0> (?)` | | | [...g/apache/gobblin/cluster/InMemoryWuSingleTask.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSW5NZW1vcnlXdVNpbmdsZVRhc2suamF2YQ==) | `0% <0%> (ø)` | `0 <0> (?)` | | | [...a/org/apache/gobblin/cluster/SingleTaskRunner.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvU2luZ2xlVGFza1J1bm5lci5qYXZh) | `0% <0%> (-1.86%)` | `0 <0> (-1)` | | | [...ava/org/apache/gobblin/metrics/GobblinMetrics.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1tZXRyaWNzLWxpYnMvZ29iYmxpbi1tZXRyaWNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL21ldHJpY3MvR29iYmxpbk1ldHJpY3MuamF2YQ==) | `0% <0%> (-18.87%)` | `0 <0> (-15)` | | | [...he/gobblin/cluster/InMemoryWuFailedSingleTask.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSW5NZW1vcnlXdUZhaWxlZFNpbmdsZVRhc2suamF2YQ==) | `0% <0%> (ø)` | `0 <0> (?)` | | | [...in/java/org/apache/gobblin/cluster/SingleTask.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvU2luZ2xlVGFzay5qYXZh) | `0% <0%> (-81.14%)` | `0 <0> (-9)` | | | [...a/org/apache/gobblin/cluster/ContainerMetrics.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvQ29udGFpbmVyTWV0cmljcy5qYXZh) | `0% <0%> (-100%)` | `0 <0> (-4)` | | | [...a/org/apache/gobblin/runtime/util/ForkMetrics.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvdXRpbC9Gb3JrTWV0cmljcy5qYXZh) | `100% <100%> (ø)` | `5 <2> (-1)` | :arrow_down: | | [...a/org/apache/gobblin/runtime/util/TaskMetrics.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2882/diff?src=pr=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvdXRpbC9UYXNrTWV0cmljcy5qYXZh) | `81.25% <100%> (ø)`
[jira] [Work logged] (GOBBLIN-1042) ForkMetrics generates parent metric object with incorrect type
[ https://issues.apache.org/jira/browse/GOBBLIN-1042?focusedWorklogId=383210=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-383210 ] ASF GitHub Bot logged work on GOBBLIN-1042: --- Author: ASF GitHub Bot Created on: 06/Feb/20 22:18 Start Date: 06/Feb/20 22:18 Worklog Time Spent: 10m Work Description: autumnust commented on pull request #2882: [GOBBLIN-1042] Fix ForkMetric incorrect return type of parent metric object and relevant unit tests URL: https://github.com/apache/incubator-gobblin/pull/2882 Along with some documentation enhancement, typo fixing, renaming of methods, etc. ### JIRA - [ ] 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-1042 ### Description - [ ] Here are some details about my PR, including screenshots (if applicable): ### Tests - [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason: ### Commits - [ ] 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 383210) Remaining Estimate: 0h Time Spent: 10m > ForkMetrics generates parent metric object with incorrect type > -- > > Key: GOBBLIN-1042 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1042 > Project: Apache Gobblin > Issue Type: Improvement >Reporter: Lei Sun >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)