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

FALCON-2210 Server side changes in submit and submitAndSchedule apis to accept list of feeds and processes #313

Closed
wants to merge 29 commits into from

Conversation

sandeepSamudrala
Copy link
Contributor

No description provided.

…client. I will move that to Server side in the server side changes
validate(process, true);
}

public void validate(Process process, boolean checkDependantFeeds) throws FalconException {

Choose a reason for hiding this comment

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

Nit: Typo checkDependentFeeds (not checkDependantFeeds)

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. Fixed it

@FormDataParam("config") InputStream config) {
checkIfExtensionServiceIsEnabled();
List<Process> processes = getProcesses(processForms);
List<Feed> feeds = getFeeds(feedForms);
Pair<List<Feed>, List<Process>> entityPairs;

Choose a reason for hiding this comment

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

Map<EntityType, List> is more extendable. Can be passed along directly as arg to submitEntities.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made the respective changes.

feeds.add(entity.getName());
} else if (EntityType.PROCESS.equals(entity.getEntityType())) {
processes.add(entity.getName());
private List<Feed> getFeeds(List<FormDataBodyPart> feedForms) {

Choose a reason for hiding this comment

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

Can have single method that takes in Class as an argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thats not possible as the entity class cannot be deserialized.

@FormDataParam("config") InputStream config) {
checkIfExtensionServiceIsEnabled();
List<Process> processes = getProcesses(processForms);

Choose a reason for hiding this comment

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

Can move getProcesses and getFeeds inside getEntityList, cleaner and less repetition between submit and submitAndSchedule.

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. Moved it

}


private void validateFeeds(List<Feed> feeds) throws FalconException {

Choose a reason for hiding this comment

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

validateFeeds and validateEntities can be clubbed into single method, with type as an argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Merging causes a lot of issues and also the functionality being different there is not much gain on merging them. Won't be merging them.

@@ -285,7 +285,16 @@ public APIResult submitExtensionJob(String extensionName, String jobName, String
InputStream configStream = getServletInputStream(configPath);
try {
List<Entity> entities = getEntities(extensionName, jobName, configStream);

Choose a reason for hiding this comment

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

If getEntities can return a Map<EntityType, List>. It can be directly passed to submitExtensionJob. Less redundant code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made the changes.

List<Process> processes = getProcesses(processForms);
List<Feed> feeds = getFeeds(feedForms);
Pair<List<Feed>, List<Process>> entityPairs;
Map<EntityType, List> entityMap;

Choose a reason for hiding this comment

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

Have type for List List

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.

+1

@asfgit asfgit closed this in 3e7e08f Dec 12, 2016
pallavi-rao pushed a commit to pallavi-rao/falcon that referenced this pull request Feb 16, 2018
…to accept list of feeds and processes

Author: sandeep <sandysmdl@gmail.com>

Reviewers: @pallavi-rao

Closes apache#313 from sandeepSamudrala/FALCON-2210 and squashes the following commits:

3b7a3ae [sandeep] FALCON-2210 applied tags to the entities for user extensions
f08cf15 [sandeep] FALCON-2210 Fixed falcon unit client build issues
98d382e [sandeep] FALCON-2210 Incorporated review comments
4004ae7 [sandeep] FALCON-2210 Incorporated review comments
d5e4c53 [sandeep] FALCON-2210 Server side changes in submit and submitAndSchedule apis to accept list of feeds and processes
05b87fb [sandeep] Merge branch 'master' of https://github.com/apache/falcon into FALCON-2210
2bd685f [sandeep] FALCON-2201 Fixed checkstyle issues
c7422e6 [sandeep] FALCON-2201 Incorporated review comments. Removed applying tags from client. I will move that to Server side in the server side changes
86446ad [sandeep] Merge branch 'master' of https://github.com/apache/falcon into FALCON-2201
432cdfd [sandeep] FALCON-2201 Incorporated review comments
a0ce5e0 [sandeep] Merge branch 'master' of https://github.com/apache/falcon into FALCON-2201
519a877 [sandeep] FALCON-2201 Fixed checkstyle issues
c101c7b [sandeep] FALCON-2201 Incorporated review comments
bf0e6ed [sandeep] FALCON-2201 Incorporated review comments and few client side changes
adfd318 [sandeep] FALCON-2201 Falcon Unit changes for extension support and falcon unit tests for extensions and fixes.
03f0c3c [sandeep] Merge branch 'master' of https://github.com/apache/falcon into FALCON-2201
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
Development

Successfully merging this pull request may close these issues.

2 participants