Examples of addSampler()


Examples of org.apache.hadoop.lib.service.Instrumentation.addSampler()

      @Override
      public Long getValue() {
        return (long) count.incrementAndGet();
      }
    };
    instrumentation.addSampler("g", "s", 10, varToSample);

    sleep(2000);
    int i = count.get();
    assertTrue(i > 0);
View Full Code Here

Examples of org.apache.oozie.util.Instrumentation.addSampler()

     */
    public InstrumentedBasicDataSource() {
        InstrumentationService instrumentationService = Services.get().get(InstrumentationService.class);
        if (instrumentationService != null) {
            Instrumentation instr = instrumentationService.get();
            instr.addSampler(INSTR_GROUP, INSTR_NAME, 60, 1, new Instrumentation.Variable<Long>() {
                public Long getValue() {
                    return (long) getNumActive();
                }
            });
        }
View Full Code Here

Examples of org.apache.oozie.util.Instrumentation.addSampler()

    /**
     * The created datasource instruments the active DB connections.
     */
    public InstrumentedBasicDataSource() {
        Instrumentation instr = Services.get().get(InstrumentationService.class).get();
        instr.addSampler(INSTR_GROUP, INSTR_NAME, 60, 1, new Instrumentation.Variable<Long>() {
            public Long getValue() {
                return (long) getNumActive();
            }
        });
    }
View Full Code Here

Examples of org.apache.oozie.util.Instrumentation.addSampler()

     */
    public InstrumentedBasicDataSource() {
        InstrumentationService instrumentationService = Services.get().get(InstrumentationService.class);
        if (instrumentationService != null) {
            Instrumentation instr = instrumentationService.get();
            instr.addSampler(INSTR_GROUP, INSTR_NAME, 60, 1, new Instrumentation.Variable<Long>() {
                public Long getValue() {
                    return (long) getNumActive();
                }
            });
        }
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.