use of org.apache.reef.driver.evaluator.EvaluatorRequest in project incubator-heron by apache.
the class HeronMasterDriver method requestContainerForWorker.
@VisibleForTesting
void requestContainerForWorker(int id, final HeronWorker worker) {
int cpu = worker.cores;
ByteAmount mem = worker.mem;
EvaluatorRequest evaluatorRequest = createEvaluatorRequest(cpu, mem);
LOG.info(String.format("Requesting container for worker: %d, mem: %s, cpu: %d", id, mem, cpu));
requestor.submit(evaluatorRequest);
}
use of org.apache.reef.driver.evaluator.EvaluatorRequest in project heron by twitter.
the class HeronMasterDriver method requestContainerForWorker.
@VisibleForTesting
void requestContainerForWorker(int id, final HeronWorker worker) {
int cpu = worker.cores;
ByteAmount mem = worker.mem;
EvaluatorRequest evaluatorRequest = createEvaluatorRequest(cpu, mem);
LOG.info(String.format("Requesting container for worker: %d, RAM: %s, CPU: %d", id, mem, cpu));
requestor.submit(evaluatorRequest);
}
use of org.apache.reef.driver.evaluator.EvaluatorRequest in project heron by twitter.
the class HeronMasterDriverTest method requestContainerForWorkerSubmitsValidRequest.
@Test
public void requestContainerForWorkerSubmitsValidRequest() {
ByteAmount memory = ByteAmount.fromMegabytes(786);
EvaluatorRequest request = spyDriver.createEvaluatorRequest(5, memory);
doReturn(request).when(spyDriver).createEvaluatorRequest(5, memory);
HeronMasterDriver.HeronWorker worker = new HeronMasterDriver.HeronWorker(3, 5, memory);
spyDriver.requestContainerForWorker(3, worker);
verify(mockRequestor, times(1)).submit(request);
}
use of org.apache.reef.driver.evaluator.EvaluatorRequest in project heron by twitter.
the class HeronMasterDriverTest method requestContainerForWorkerSubmitsValidRequest.
@Test
public void requestContainerForWorkerSubmitsValidRequest() {
ByteAmount memory = ByteAmount.fromMegabytes(786);
EvaluatorRequest request = spyDriver.createEvaluatorRequest(5, memory);
doReturn(request).when(spyDriver).createEvaluatorRequest(5, memory);
HeronMasterDriver.HeronWorker worker = new HeronMasterDriver.HeronWorker(3, 5, memory);
spyDriver.requestContainerForWorker(3, worker);
verify(mockRequestor, times(1)).submit(request);
}
use of org.apache.reef.driver.evaluator.EvaluatorRequest in project heron by twitter.
the class HeronMasterDriver method requestContainerForWorker.
@VisibleForTesting
void requestContainerForWorker(int id, final HeronWorker worker) {
int cpu = worker.cores;
ByteAmount mem = worker.mem;
EvaluatorRequest evaluatorRequest = createEvaluatorRequest(cpu, mem);
LOG.info(String.format("Requesting container for worker: %d, mem: %s, cpu: %d", id, mem, cpu));
requestor.submit(evaluatorRequest);
}
Aggregations