/// <exception cref="System.IO.IOException"/> public virtual GetCountersResponse GetCounters(GetCountersRequest request) { GetCountersResponse resp = recordFactory.NewRecordInstance <GetCountersResponse>(); Counters counters = recordFactory.NewRecordInstance <Counters>(); counters.AddAllCounterGroups(new Dictionary <string, CounterGroup>()); resp.SetCounters(counters); return(resp); }
/// <exception cref="System.IO.IOException"/> public override GetCountersResponse GetCounters(GetCountersRequest request) { this._enclosing.hsContact = true; Counters counters = TestClientRedirect.GetMyCounters(); GetCountersResponse response = TestClientRedirect.recordFactory.NewRecordInstance <GetCountersResponse>(); response.SetCounters(counters); return(response); }
/// <exception cref="System.IO.IOException"/> public virtual GetCountersResponse GetCounters(GetCountersRequest request) { JobId jobId = request.GetJobId(); Org.Apache.Hadoop.Mapreduce.V2.App.Job.Job job = this.VerifyAndGetJob(jobId, true ); GetCountersResponse response = this.recordFactory.NewRecordInstance <GetCountersResponse >(); response.SetCounters(TypeConverter.ToYarn(job.GetAllCounters())); return(response); }
/// <exception cref="System.IO.IOException"/> public virtual GetCountersResponse GetCounters(GetCountersRequest request) { JobId jobID = request.GetJobId(); this._enclosing.amContact = true; Counters counters = TestClientRedirect.GetMyCounters(); GetCountersResponse response = TestClientRedirect.recordFactory.NewRecordInstance <GetCountersResponse>(); response.SetCounters(counters); return(response); }
/// <exception cref="Com.Google.Protobuf.ServiceException"/> public virtual MRServiceProtos.GetCountersResponseProto GetCounters(RpcController controller, MRServiceProtos.GetCountersRequestProto proto) { GetCountersRequest request = new GetCountersRequestPBImpl(proto); try { GetCountersResponse response = real.GetCounters(request); return(((GetCountersResponsePBImpl)response).GetProto()); } catch (IOException e) { throw new ServiceException(e); } }
private GetCountersResponse GetCountersResponseFromHistoryServer() { GetCountersResponse countersResponse = Org.Apache.Hadoop.Yarn.Util.Records.NewRecord <GetCountersResponse>(); Counter counter = Org.Apache.Hadoop.Yarn.Util.Records.NewRecord <Counter>(); CounterGroup counterGroup = Org.Apache.Hadoop.Yarn.Util.Records.NewRecord <CounterGroup >(); Counters counters = Org.Apache.Hadoop.Yarn.Util.Records.NewRecord <Counters>(); counter.SetDisplayName("dummyCounter"); counter.SetName("dummyCounter"); counter.SetValue(1001); counterGroup.SetName("dummyCounters"); counterGroup.SetDisplayName("dummyCounters"); counterGroup.SetCounter("dummyCounter", counter); counters.SetCounterGroup("dummyCounters", counterGroup); countersResponse.SetCounters(counters); return(countersResponse); }