[
https://issues.apache.org/jira/browse/GOBBLIN-1437?focusedWorklogId=590103&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-590103
]
ASF GitHub Bot logged work on GOBBLIN-1437:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 28/Apr/21 01:39
Start Date: 28/Apr/21 01:39
Worklog Time Spent: 10m
Work Description: arjun4084346 commented on a change in pull request
#3268:
URL: https://github.com/apache/gobblin/pull/3268#discussion_r621744675
##########
File path:
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/job_monitor/KafkaJobMonitor.java
##########
@@ -100,17 +100,29 @@ protected void shutdownMetrics()
@Override
protected void processMessage(DecodeableKafkaRecord<byte[],byte[]> message) {
try {
- Collection<Either<JobSpec, URI>> parsedCollection =
parseJobSpec(message.getValue());
- for (Either<JobSpec, URI> parsedMessage : parsedCollection) {
- if (parsedMessage instanceof Either.Left) {
- this.newSpecs.inc();
- this.jobCatalog.put(((Either.Left<JobSpec, URI>)
parsedMessage).getLeft());
- } else if (parsedMessage instanceof Either.Right) {
- this.removedSpecs.inc();
- URI jobSpecUri = ((Either.Right<JobSpec, URI>)
parsedMessage).getRight();
- this.jobCatalog.remove(jobSpecUri, true);
- // Delete the job state if it is a delete spec request
- deleteStateStore(jobSpecUri);
+ Collection<JobSpec> parsedCollection = parseJobSpec(message.getValue());
+ for (JobSpec parsedMessage : parsedCollection) {
+ SpecExecutor.Verb verb =
SpecExecutor.Verb.valueOf(parsedMessage.getMetadata().get(SpecExecutor.VERB_KEY));
+
+ switch (verb) {
+ case ADD:
+ case UPDATE:
+ case UNKNOWN: // unknown are considered as add request to maintain
backward compatibility
Review comment:
JobSpecs created in `SimpleKafkaSpecProducer` uses correct `verb` for
all operations; and only those are consumed by this JobMonitor, unless
implemented in other way in forked repositories. But some code flows,
especially unit tests, do not set `verb`. When `verb` is not set, it is set to
`unknown` by default.
If the old JobMonitor reads a new Verb, I have updated the PR to ignore new
values.
--
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 590103)
Time Spent: 40m (was: 0.5h)
> Segregate FlowConfigs/Delete and FlowExecutions/Delete functions #3268
> ----------------------------------------------------------------------
>
> Key: GOBBLIN-1437
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1437
> Project: Apache Gobblin
> Issue Type: Bug
> Reporter: Arjun Singh Bora
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> there are some mixup of work in FlowConfigs/Delete and FlowExecutions/Delete
> which is to be fixed
> FlowConfigs/Delete
> 1) is not cancelling the current running execution on cluster (i.e. when
> KafkaSpecProducer is used)
> 2) is not deleting state store when DagManager is used and KafkaSpecProducer
> is used
> FlowExecutions/Delete
> 1) is not calling SpecProducer.cancel()
> 2) is deleting the state store when KafkaSpecProducer is used, because
> cluster thinks it is a DELETE request
--
This message was sent by Atlassian Jira
(v8.3.4#803005)