Skip to content
This repository has been archived by the owner on Apr 4, 2021. It is now read-only.

FALCON-2231 Changes to support Schedule of user extensions #334

Closed
wants to merge 31 commits into from

Conversation

sandeepSamudrala
Copy link
Contributor

No description provided.

@sandeepSamudrala
Copy link
Contributor Author

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.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing to delete/schedule?

Copy link
Contributor Author

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);
Copy link
Contributor

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);
Copy link
Contributor

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".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its submit api only.

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @sandeepSamudrala

Copy link

@pallavi-rao pallavi-rao left a 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);

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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();

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.

Copy link
Contributor Author

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.

Copy link

@pallavi-rao pallavi-rao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PracheerAgarwal-zz
Copy link
Contributor

+1

@PraveenAdlakha
Copy link
Contributor

+1

@PraveenAdlakha
Copy link
Contributor

merging in some time.

@asfgit asfgit closed this in 7c5822c Jan 3, 2017
pallavi-rao pushed a commit to pallavi-rao/falcon that referenced this pull request Feb 16, 2018
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants