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

Add a fluid interface to EvaluatorRequestor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.15
    • None

    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

              wonook Wonook
              markus.weimer Markus Weimer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: