Search in sources :

Example 6 with JobWorkerHealth

use of alluxio.job.wire.JobWorkerHealth in project alluxio by Alluxio.

the class JobMasterIntegrationTest method getAllWorkerHealth.

@Test
public void getAllWorkerHealth() throws Exception {
    final AtomicReference<List<JobWorkerHealth>> singleton = new AtomicReference<>();
    CommonUtils.waitFor("allWorkerHealth", () -> {
        List<JobWorkerHealth> allWorkerHealth = mJobMaster.getAllWorkerHealth();
        singleton.set(allWorkerHealth);
        return allWorkerHealth.size() == 1;
    });
    List<JobWorkerHealth> allWorkerHealth = singleton.get();
    JobWorkerHealth workerHealth = allWorkerHealth.get(0);
    assertNotNull(workerHealth.getHostname());
    assertEquals(3, workerHealth.getLoadAverage().size());
}
Also used : JobWorkerHealth(alluxio.job.wire.JobWorkerHealth) List(java.util.List) AtomicReference(java.util.concurrent.atomic.AtomicReference) BaseIntegrationTest(alluxio.testutils.BaseIntegrationTest) Test(org.junit.Test)

Aggregations

JobWorkerHealth (alluxio.job.wire.JobWorkerHealth)6 ArrayList (java.util.ArrayList)3 Test (org.junit.Test)3 JobMasterClient (alluxio.client.job.JobMasterClient)2 JobInfo (alluxio.job.wire.JobInfo)2 JobServiceSummary (alluxio.job.wire.JobServiceSummary)2 IOException (java.io.IOException)2 List (java.util.List)2 ClientContext (alluxio.ClientContext)1 BlockWorkerInfo (alluxio.client.block.BlockWorkerInfo)1 FileSystemContext (alluxio.client.file.FileSystemContext)1 AlluxioException (alluxio.exception.AlluxioException)1 JobCommand (alluxio.grpc.JobCommand)1 JobInfo (alluxio.grpc.JobInfo)1 StatusSummary (alluxio.job.wire.StatusSummary)1 TaskInfo (alluxio.job.wire.TaskInfo)1 BaseIntegrationTest (alluxio.testutils.BaseIntegrationTest)1 WorkerNetAddress (alluxio.wire.WorkerNetAddress)1 JobMasterClientContext (alluxio.worker.job.JobMasterClientContext)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1