Search in sources :

Example 1 with MetricsClient

use of co.cask.cdap.client.MetricsClient in project cdap by caskdata.

the class GenerateClientUsageExample method metricsClient.

public void metricsClient() throws Exception {
    // Construct the client used to interact with CDAP
    MetricsClient metricsClient = new MetricsClient(clientConfig);
    // Fetch the total number of events that have been processed by a flowlet
    RuntimeMetrics metric = metricsClient.getFlowletMetrics(new NamespaceId("user").app("HelloWorld").flow("someFlow").flowlet("process.events.processed"));
}
Also used : MetricsClient(co.cask.cdap.client.MetricsClient) RuntimeMetrics(co.cask.cdap.api.metrics.RuntimeMetrics) NamespaceId(co.cask.cdap.proto.id.NamespaceId)

Aggregations

RuntimeMetrics (co.cask.cdap.api.metrics.RuntimeMetrics)1 MetricsClient (co.cask.cdap.client.MetricsClient)1 NamespaceId (co.cask.cdap.proto.id.NamespaceId)1