reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobin Baker (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (REEF-1379) Add a fluid interface to EvaluatorRequestor
Date Thu, 05 May 2016 20:02:13 GMT

    [ https://issues.apache.org/jira/browse/REEF-1379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15272963#comment-15272963
] 

Tobin Baker 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)

Mime
View raw message