-
Notifications
You must be signed in to change notification settings - Fork 112
FALCON-2210 Server side changes in submit and submitAndSchedule apis to accept list of feeds and processes #313
Conversation
… tests for extensions and fixes.
…client. I will move that to Server side in the server side changes
…to accept list of feeds and processes
validate(process, true); | ||
} | ||
|
||
public void validate(Process process, boolean checkDependantFeeds) throws FalconException { |
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.
Nit: Typo checkDependentFeeds (not checkDependantFeeds)
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. Fixed it
@FormDataParam("config") InputStream config) { | ||
checkIfExtensionServiceIsEnabled(); | ||
List<Process> processes = getProcesses(processForms); | ||
List<Feed> feeds = getFeeds(feedForms); | ||
Pair<List<Feed>, List<Process>> entityPairs; |
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.
Map<EntityType, List> is more extendable. Can be passed along directly as arg to submitEntities.
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.
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) { |
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.
Can have single method that takes in Class as an argument.
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.
Thats not possible as the entity class cannot be deserialized.
@FormDataParam("config") InputStream config) { | ||
checkIfExtensionServiceIsEnabled(); | ||
List<Process> processes = getProcesses(processForms); |
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.
Can move getProcesses and getFeeds inside getEntityList, cleaner and less repetition between submit and submitAndSchedule.
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. Moved it
} | ||
|
||
|
||
private void validateFeeds(List<Feed> feeds) throws FalconException { |
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.
validateFeeds and validateEntities can be clubbed into single method, with type as an argument.
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.
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); |
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.
If getEntities can return a Map<EntityType, List>. It can be directly passed to submitExtensionJob. Less redundant code.
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.
Made the changes.
List<Process> processes = getProcesses(processForms); | ||
List<Feed> feeds = getFeeds(feedForms); | ||
Pair<List<Feed>, List<Process>> entityPairs; | ||
Map<EntityType, List> entityMap; |
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.
Have type for List List
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
…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
No description provided.