You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Andrew Chung (JIRA)" <ji...@apache.org> on 2016/05/05 18:12:12 UTC
[jira] [Commented] (REEF-1379) Add a fluid interface to
EvaluatorRequestor
[ https://issues.apache.org/jira/browse/REEF-1379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15272753#comment-15272753 ]
Andrew Chung commented on REEF-1379:
------------------------------------
+1
> Add a fluid interface to EvaluatorRequestor
> -------------------------------------------
>
> Key: REEF-1379
> URL: https://issues.apache.org/jira/browse/REEF-1379
> Project: REEF
> Issue Type: Improvement
> Reporter: Markus Weimer
> Priority: Minor
> Labels: API, beginner
>
> {{EvaluatorRequestor}} and {{EvaluatorRequest.newBuilder()}} are almost always used together in a pattern that looks like this:
> {code}
> requestor.submit(EvaluatorRequest.newBuilder()
> .setNumber(1)
> .setMemory(64)
> .setNumberOfCores(1)
> .build());
> {code}
> It would be good to have a nicer, more fluid API here:
> {code}
> requestor.newRequest()
> .setNumber(1)
> .setMemory(64)
> .setNumberOfCores(1)
> .submit();
> {code}
> This could be done by creating a subclass of {{EvaluatorRequest.Builder}} which has a reference to the {{EvaluatorRequestor}} instance and implements {{.submit()}} as:
> {code}
> void submit(){
> this.requestor.submit(this.build());
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)