Tabnine Logo
ContextAwareMeter.mark
Code IndexAdd Tabnine to your IDE (free)

How to use
mark
method
in
org.apache.gobblin.metrics.ContextAwareMeter

Best Java code snippets using org.apache.gobblin.metrics.ContextAwareMeter.mark (Showing top 6 results out of 315)

origin: apache/incubator-gobblin

@Override
public void mark(long n) {
 super.mark(n);
 if (this.parentMeter.isPresent()) {
  this.parentMeter.get().mark(n);
 }
}
origin: apache/incubator-gobblin

 @Override
 public DistributeJobResult call()
   throws Exception {
  String planningId = getPlanningJobId(this.jobPlanningProps);
  JobConfig.Builder builder = createJobBuilder(this.jobPlanningProps);
  try {
   long submitStartTime = System.currentTimeMillis();
   GobblinHelixDistributeJobExecutionLauncher.this.helixMetrics.submitMeter.mark();
   submitJobToHelix(planningId, planningId, builder);
   GobblinHelixDistributeJobExecutionLauncher.this.helixMetrics.updateTimeForHelixSubmit(submitStartTime);
   long waitStartTime = System.currentTimeMillis();
   DistributeJobResult rst = waitForJobCompletion(planningId, planningId);
   GobblinHelixDistributeJobExecutionLauncher.this.helixMetrics.updateTimeForHelixWait(waitStartTime);
   return rst;
  } catch (Exception e) {
   log.error(planningId + " is not able to submit.");
   return new DistributeJobResult(false);
  }
 }
}
origin: apache/incubator-gobblin

long submitStart = System.currentTimeMillis();
if (helixMetrics.isPresent()) {
 helixMetrics.get().submitMeter.mark();
origin: apache/incubator-gobblin

@Test(dependsOnMethods = "testChildContext")
public void testContextAwareMeter() {
 ContextAwareMeter jobRecordsProcessRate = this.context.contextAwareMeter(RECORD_PROCESS_RATE);
 Assert.assertEquals(this.context.getMeters()
     .get(jobRecordsProcessRate.getName()),
   jobRecordsProcessRate.getInnerMetric());
 Assert.assertEquals(jobRecordsProcessRate.getContext(), this.context);
 Assert.assertEquals(jobRecordsProcessRate.getName(), RECORD_PROCESS_RATE);
 jobRecordsProcessRate.mark();
 jobRecordsProcessRate.mark(3);
 Assert.assertEquals(jobRecordsProcessRate.getCount(), 4l);
 ContextAwareMeter taskRecordsProcessRate = this.childContext.contextAwareMeter(RECORD_PROCESS_RATE);
 Assert.assertEquals(this.childContext.getMeters()
     .get(taskRecordsProcessRate.getName()),
   taskRecordsProcessRate.getInnerMetric());
 Assert.assertEquals(taskRecordsProcessRate.getContext(), this.childContext);
 Assert.assertEquals(taskRecordsProcessRate.getName(), RECORD_PROCESS_RATE);
 taskRecordsProcessRate.mark(2);
 Assert.assertEquals(taskRecordsProcessRate.getCount(), 2l);
 Assert.assertEquals(jobRecordsProcessRate.getCount(), 6l);
 taskRecordsProcessRate.mark(5);
 Assert.assertEquals(taskRecordsProcessRate.getCount(), 7l);
 Assert.assertEquals(jobRecordsProcessRate.getCount(), 11l);
}
origin: apache/incubator-gobblin

ContextAwareMeter meter = metricContext.contextAwareMeter("testMeter");
WeakReference<ContextAwareMeter> meterWeakReference = new WeakReference<ContextAwareMeter>(meter);
meter.mark();
ContextAwareHistogram histogram = metricContext.contextAwareHistogram("testHistogram");
WeakReference<ContextAwareHistogram> histogramWeakReference = new WeakReference<ContextAwareHistogram>(histogram);
origin: org.apache.gobblin/gobblin-metrics-base

@Override
public void mark(long n) {
 super.mark(n);
 if (this.parentMeter.isPresent()) {
  this.parentMeter.get().mark(n);
 }
}
org.apache.gobblin.metricsContextAwareMetermark

Popular methods of ContextAwareMeter

  • <init>
  • getContext
  • getCount
  • getInnerMetric
  • getName

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JTable (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now