-
Notifications
You must be signed in to change notification settings - Fork 117
FALCON-2231 Changes to support Schedule of user extensions #334
Conversation
I have dev-tested the same for submit and then scheduling it. |
if (extensionJobsBean == null) { | ||
// return failure if the extension job doesn't exist | ||
return new APIResult(APIResult.Status.SUCCEEDED, | ||
"Extension job " + jobName + " doesn't exist. Nothing to delete."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing to delete/schedule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack. Typos. I will correct it.
try { | ||
return localExtensionManager.scheduleExtensionJob(jobName, doAsUser); | ||
} catch (FalconException | IOException e) { | ||
throw new FalconCLIException("Failed to delete the extension job:" + jobName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the error msg to "failed to schedule the extension job"
@@ -88,7 +104,19 @@ public APIResult submitAndSchedulableExtensionJob(String extensionName, String j | |||
return new APIResult(APIResult.Status.SUCCEEDED, "Extension job submitted successfully" + jobName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also change the returned message to "scheduled successfully".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its submit api only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be I have commented at wrong place, but messages for both submit and submitAndSchedule was same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this change. But I updated the return message for submitAndScheduleExtensionJob Api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @sandeepSamudrala
… of extension not found while scheduling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also make changes to ExtensionManager to ensure submit and submitSchedule of are not supported when issued against Falcon Sever, but, schedule is supported (will be scheduled on that colo alone).
APIResult scheduleExtensionJob(String jobName, String doAsUser) throws FalconException, IOException{ | ||
ExtensionMetaStore metaStore = ExtensionStore.getMetaStore(); | ||
ExtensionJobsBean extensionJobsBean = metaStore.getExtensionJobDetails(jobName); | ||
SortedMap<EntityType, List<Entity>> entityMap = getJobEntities(extensionJobsBean); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Null check, if the extension job does not exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required its a map and the values are list.. which come as empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required as the map will have entries and the values are lists which will be empty
// return failure if the extension job doesn't exist | ||
return new APIResult(APIResult.Status.FAILED, "Extension job " + jobName + " doesn't exist."); | ||
} | ||
ExtensionMetaStore metaStore = ExtensionStore.getMetaStore(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following lines of code, up until getJobEntities, I believe will be repeated for schedule, delete, suspend and resume. See if you can create a common method. I'm fine even if you do that when you implement suspend/resume.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will be updating the same with the suspend/resume patch.
… submission and colo addition to schedule command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
+1 |
+1 |
merging in some time. |
Author: sandeep <sandysmdl@gmail.com> Reviewers: @pallavi,@pracheer,@praveen Closes apache#334 from sandeepSamudrala/FALCON-2231 and squashes the following commits: d32bf98 [sandeep] FALCON-2231 Fixed checkstyle issues. 2bbd7e2 [sandeep] FALCON-2231 Incoporated review comments and fixed test cases 2269806 [sandeep] FALCON-2231 Incoporated review comments and small fixes for duplicate submission and colo addition to schedule command 44d6f2a [sandeep] FALCON-2231 Corrected message in LocalExtensionManager f165282 [sandeep] FALCON-2231 Updated Error messages and throwing out exception in case of extension not found while scheduling 96a9a1d [sandeep] FALCON-2231 Rebased my patch ca320e0 [sandeep] FACLON-2231 Changes to support Schedule of user extensions 53831ea [sandeep] Merge branch 'master' of https://github.com/apache/falcon into FALCON-2231 cc28658 [sandeep] Merge branch 'master' of https://github.com/apache/falcon 089b10d [sandeep] Merge branch 'master' of https://github.com/apache/falcon 456d4ee [sandeep] Merge branch 'master' of https://github.com/apache/falcon 0cf9af6 [sandeep] Merge branch 'master' of https://github.com/apache/falcon 4a2e23e [sandeep] Merge branch 'master' of https://github.com/apache/falcon b1546ed [sandeep] Merge branch 'master' of https://github.com/apache/falcon 0a433fb [sandeep] Merge branch 'master' of https://github.com/apache/falcon 194f36a [sandeep] Merge branch 'master' of https://github.com/apache/falcon e0ad358 [sandeep] Merge branch 'master' of https://github.com/apache/falcon f96a084 [sandeep] Merge branch 'master' of https://github.com/apache/falcon 9cf36e9 [sandeep] Merge branch 'master' of https://github.com/apache/falcon bbca081 [sandeep] Merge branch 'master' of https://github.com/apache/falcon 48f6afa [sandeep] Merge branch 'master' of https://github.com/apache/falcon 250cc46 [sandeep] Merge branch 'master' of https://github.com/apache/falcon d0393e9 [sandeep] Merge branch 'master' of https://github.com/apache/falcon a178805 [sandeep] Merge branch 'master' of https://github.com/apache/falcon d6dc8bf [sandeep] Merge branch 'master' of https://github.com/apache/falcon 1bb8d3c [sandeep] Merge branch 'master' of https://github.com/apache/falcon c065566 [sandeep] reverting last line changes made 1a4dcd2 [sandeep] rebased and resolved the conflicts from master 271318b [sandeep] FALCON-2097. Adding UT to the new method for getting next instance time with Delay. a94d4fe [sandeep] rebasing from master 9e68a57 [sandeep] FALCON-298. Feed update with replication delay creates holes
No description provided.