Uploaded image for project: 'REEF'
  1. REEF
  2. REEF-1379

Add a fluid interface to EvaluatorRequestor

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.15
    • Component/s: None
    • Labels:

      Description

      EvaluatorRequestor and EvaluatorRequest.newBuilder() are almost always used together in a pattern that looks like this:

      requestor.submit(EvaluatorRequest.newBuilder()
        .setNumber(1)
        .setMemory(64)
        .setNumberOfCores(1)
        .build());
      

      It would be good to have a nicer, more fluid API here:

      requestor.newRequest()
        .setNumber(1)
        .setMemory(64)
        .setNumberOfCores(1)
        .submit();
      

      This could be done by creating a subclass of EvaluatorRequest.Builder which has a reference to the EvaluatorRequestor instance and implements .submit() as:

      void submit(){
        this.requestor.submit(this.build());
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wonook Won Wook Song
                Reporter:
                markus.weimer Markus Weimer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: