Example #1
0
        /// <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);
        }
Example #2
0
            /// <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);
            }
Example #3
0
            /// <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);
            }
Example #4
0
            /// <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);
            }
Example #5
0
        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);
        }