Tabnine Logo
PipeMonitorCollectorStage
Code IndexAdd Tabnine to your IDE (free)

How to use
PipeMonitorCollectorStage
in
com.ociweb.pronghorn.stage.monitor

Best Java code snippets using com.ociweb.pronghorn.stage.monitor.PipeMonitorCollectorStage (Showing top 20 results out of 315)

origin: oci-pronghorn/Pronghorn

public static PipeMonitorCollectorStage attach(GraphManager gm) {
  return attach(gm,defaultMonitorRate,defaultMonitorRingConfig);
}

origin: oci-pronghorn/Pronghorn

@Override
public void run() {
  int j = batchSize; //max to check before returning thread.
  int pos = position;
  while (--j>=0) {
    if (--pos<0) {
      pos = inputs.length-1;
    }            
    //can pass in null for local hists when not gatering history
    consumeSamples(pos, inputs, pctFull, messagesPerSecond);
  }
  position = pos;
}
origin: oci-pronghorn/Pronghorn

/**
 *
 * @param graphManager
 * @param inputs _in_ Pipes to be monitored.
 */
private PipeMonitorCollectorStage(GraphManager graphManager, Pipe<PipeMonitorSchema> ... inputs) {
  super(graphManager, inputs, NONE);
  this.inputs = inputs;
  this.graphManager = graphManager;
  
  this.batchSize = inputs.length>=64?64:inputs.length;
  
  validateSchema(inputs);
  GraphManager.addNota(graphManager, GraphManager.MONITOR, GraphManager.MONITOR, this);
  
}
origin: oci-pronghorn/Pronghorn

@Override
protected boolean payload(AppendableByteWriter<?> payload, 
             GraphManager gm, 
             ChannelReader params,
             HTTPVerbDefaults verb) {

  
  //logger.info("begin building requested graph");
  monitor.writeAsDot(gm, graphName, payload);
  
  //logger.info("finished requested dot");
  return true;//return false if we are not able to write it all...
}

origin: oci-pronghorn/Pronghorn

@Override
protected boolean payload(AppendableByteWriter<?> payload, 
             GraphManager gm, 
             ChannelReader params,
             HTTPVerbDefaults verb) {

  //logger.info("begin building requested graph");
  //NOTE: this class is exactly the same as DotModuleStage except for this line.
  monitor.writeAsSummary(gm, payload);
  
  //logger.info("finished requested dot");
  return true;
}

origin: oci-pronghorn/Pronghorn

/**
 * Easy entry point for adding monitoring to the graph.  This should be copied by all the other monitor consumers.  TODO: build for JMX, SLF4J, Socket.io
 * @param gm
 * @param monitorRate
 * @param ringBufferMonitorConfig
 */
public static PipeMonitorCollectorStage attach(GraphManager gm, Long monitorRate, PipeConfig<PipeMonitorSchema> ringBufferMonitorConfig) {
  PipeMonitorCollectorStage stage = new PipeMonitorCollectorStage(gm, GraphManager.attachMonitorsToGraph(gm, monitorRate, ringBufferMonitorConfig));
  
  GraphManager.addNota(gm, GraphManager.SCHEDULE_RATE, monitorRate>>5, stage);
  GraphManager.addNota(gm, GraphManager.MONITOR, "dummy", stage);
  return stage;
}
origin: oci-pronghorn/Pronghorn

/**
 * If feature was enabled by setting telemetry port to zero this method uses logging to write out the dot data.
 * @param gm
 */
public static void logTelemetrySnapshot(GraphManager gm) {
  if (null!=gm.telemetryBuffer) {
    gm.telemetryBuffer.clear();
    gm.telemetryTimestamp.write(System.currentTimeMillis(), gm.telemetryBuffer);
    gm.telemetryBuffer.append(".dot\n\n");
    gm.telemetryMonitor.writeAsDot(gm, "gl", gm.telemetryBuffer);
    logger.info("\nTelemetry:{}\n\n", gm.telemetryBuffer
        .toString().replaceAll("µs", "micro")); //UTF8 support offten missing from log subsystem
  } else {
    if (gm.telemetryPort<0) {
      logger.warn("requested telemetry snapshot but this feature is not enabled, turn on telemetry with port set to zero");
    }
  }
}
origin: oci-pronghorn/Pronghorn

public static PipeMonitorCollectorStage attach(GraphManager gm, long rate) {
    return attach(gm,Long.valueOf(rate),defaultMonitorRingConfig);
}

origin: oci-pronghorn/Pronghorn

public static SummaryModuleStage<?, ?, ?, ?> newInstance(GraphManager graphManager, Pipe<HTTPRequestSchema> input, Pipe<ServerResponseSchema> output, HTTPSpecification<?, ?, ?, ?> httpSpec) {
  PipeMonitorCollectorStage monitor = PipeMonitorCollectorStage.attach(graphManager);		
  return new SummaryModuleStage(graphManager, new Pipe[]{input}, new Pipe[]{output}, httpSpec, monitor);
}

origin: oci-pronghorn/Pronghorn

public static DotModuleStage<?, ?, ?, ?> newInstance(GraphManager graphManager, Pipe<HTTPRequestSchema> input, Pipe<ServerResponseSchema> output, HTTPSpecification<?, ?, ?, ?> httpSpec) {
  PipeMonitorCollectorStage monitor = PipeMonitorCollectorStage.attach(graphManager);		
  return new DotModuleStage(graphManager, new Pipe[]{input}, new Pipe[]{output}, httpSpec, monitor);
}

origin: oci-pronghorn/Pronghorn

PipeMonitorCollectorStage.attach(gm);
origin: oci-pronghorn/Pronghorn

PipeMonitorCollectorStage.attach(gm);
origin: oci-pronghorn/Pronghorn

recordElapsedTime = true; //Required to see CPU allocation.
gm.telemetryMonitor = PipeMonitorCollectorStage.attach(gm);
gm.telemetryTimestamp = new ISOTimeFormatterLowGC(true);
gm.telemetryBuffer = new AppendableBuilder();		
origin: oci-pronghorn/Pronghorn

PipeMonitorCollectorStage.attach(gm);
origin: oci-pronghorn/Pronghorn

    monitor = PipeMonitorCollectorStage.attach(graphManager);	
case 2:
  if (null==monitor) {	
    monitor = PipeMonitorCollectorStage.attach(graphManager);	
origin: oci-pronghorn/Pronghorn

PipeMonitorCollectorStage.attach(gm);
origin: oci-pronghorn/Pronghorn

PipeMonitorCollectorStage monitor = PipeMonitorCollectorStage.attach(gm);//TODO: only gets triggered on shutdown call, TODO: need to fix this.
final ThreadPerStageScheduler scheduler = new ThreadPerStageScheduler(gm);
scheduler.playNice = false; //this may or may not help
origin: oci-pronghorn/Pronghorn

PipeMonitorCollectorStage monitor = PipeMonitorCollectorStage.attach(gm);//TODO: only gets triggered on shutdown call, TODO: need to fix this.
final ThreadPerStageScheduler scheduler = new ThreadPerStageScheduler(gm);
scheduler.playNice = false; //this may or may not help
origin: oci-pronghorn/Pronghorn

PipeMonitorCollectorStage.attach(gm);
origin: oci-pronghorn/Pronghorn

PipeMonitorCollectorStage.attach(gm);
com.ociweb.pronghorn.stage.monitorPipeMonitorCollectorStage

Javadoc

_no-docs_ Listens to all the pipe monitoring data and collects them into a single list. This is needed for the telemetry.

Most used methods

  • attach
    Easy entry point for adding monitoring to the graph. This should be copied by all the other monitor
  • <init>
  • consumeSamples
  • validateSchema
  • writeAsDot
  • writeAsSummary

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • getSupportFragmentManager (FragmentActivity)
  • setContentView (Activity)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JTable (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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