Examples of GetCountersRequest


Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetCountersRequest

  }

  public org.apache.hadoop.mapreduce.Counters getJobCounters(JobID arg0) throws IOException,
  InterruptedException {
    org.apache.hadoop.mapreduce.v2.api.records.JobId jobID = TypeConverter.toYarn(arg0);
      GetCountersRequest request = recordFactory.newRecordInstance(GetCountersRequest.class);
      request.setJobId(jobID);
      Counters cnt = ((GetCountersResponse)
          invoke("getCounters", GetCountersRequest.class, request)).getCounters();
      return TypeConverter.fromYarn(cnt);

  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetCountersRequest

      e.printStackTrace();
      Assert.fail("Failed to crete record");
    }
   
    try {
      GetCountersRequest response = pbRecordFactory.newRecordInstance(GetCountersRequest.class);
      Assert.assertEquals(GetCountersRequestPBImpl.class, response.getClass());
    } catch (YarnRuntimeException e) {
      e.printStackTrace();
      Assert.fail("Failed to crete record");
    }
  }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetCountersRequest

    //verify that all object are fully populated by invoking RPCs.
    YarnRPC rpc = YarnRPC.create(conf);
    MRClientProtocol proxy =
      (MRClientProtocol) rpc.getProxy(MRClientProtocol.class,
          app.clientService.getBindAddress(), conf);
    GetCountersRequest gcRequest =
        recordFactory.newRecordInstance(GetCountersRequest.class);   
    gcRequest.setJobId(job.getID());
    Assert.assertNotNull("Counters is null",
        proxy.getCounters(gcRequest).getCounters());

    GetJobReportRequest gjrRequest =
        recordFactory.newRecordInstance(GetJobReportRequest.class);
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetCountersRequest

    //verify that all object are fully populated by invoking RPCs.
    YarnRPC rpc = YarnRPC.create(conf);
    MRClientProtocol proxy =
      (MRClientProtocol) rpc.getProxy(MRClientProtocol.class,
          app.clientService.getBindAddress(), conf);
    GetCountersRequest gcRequest =
        recordFactory.newRecordInstance(GetCountersRequest.class);   
    gcRequest.setJobId(job.getID());
    Assert.assertNotNull("Counters is null",
        proxy.getCounters(gcRequest).getCounters());

    GetJobReportRequest gjrRequest =
        recordFactory.newRecordInstance(GetJobReportRequest.class);
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetCountersRequest

            .getDiagnostics(diagnosticRequest);
    // it is strange : why one empty string ?
    assertEquals(1, diagnosticResponse.getDiagnosticsCount());
    assertEquals("", diagnosticResponse.getDiagnostics(0));

    GetCountersRequest counterRequest = recordFactory
            .newRecordInstance(GetCountersRequest.class);
    counterRequest.setJobId(job.getID());
    GetCountersResponse counterResponse = protocol.getCounters(counterRequest);
    assertNotNull(counterResponse.getCounters().getCounterGroup("org.apache.hadoop.mapreduce.JobCounter"));
    // test getJobReport
    GetJobReportRequest reportRequest = recordFactory
            .newRecordInstance(GetJobReportRequest.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.