Examples of PutMetricDataRequest


Examples of com.amazonaws.services.cloudwatch.model.PutMetricDataRequest

        final AmazonCloudWatch client = Mockito.mock(AmazonCloudWatch.class);
        final ScheduledCloudWatch cloudwatch =
            new ScheduledCloudWatch(data, client);
        cloudwatch.run();
        Mockito.verify(client).putMetricData(
            new PutMetricDataRequest()
                .withNamespace("S3Auth")
                .withMetricData(
                    new MetricDatum()
                        .withMetricName("BytesTransferred")
                        .withDimensions(
View Full Code Here

Examples of com.amazonaws.services.cloudwatch.model.PutMetricDataRequest

     * @param bucket The bucket corresponding to these stats
     */
    @RetryOnFailure(delay = Tv.FIVE, unit = TimeUnit.SECONDS)
    private void putData(final Stats stats, final String bucket) {
        this.cloudwatch.putMetricData(
            new PutMetricDataRequest()
                .withNamespace("S3Auth")
                .withMetricData(
                    new MetricDatum()
                        .withMetricName("BytesTransferred")
                        .withDimensions(
View Full Code Here

Examples of com.amazonaws.services.cloudwatch.model.PutMetricDataRequest

    }

    private List<PutMetricDataRequest> newPutMetricDataRequests(Collection<MetricDatum> data) {
        List<PutMetricDataRequest> list = new ArrayList<PutMetricDataRequest>();
        final String ns = AwsSdkMetrics.getMetricNameSpace();
        PutMetricDataRequest req = newPutMetricDataRequest(data, ns);
        list.add(req);
        String perHostNameSpace = null;
        final boolean perHost = AwsSdkMetrics.isPerHostMetricEnabled();
        if (perHost) {
            String hostName = AwsSdkMetrics.getHostMetricName();
View Full Code Here

Examples of com.amazonaws.services.cloudwatch.model.PutMetricDataRequest

        return output;
    }

    private PutMetricDataRequest newPutMetricDataRequest(
            Collection<MetricDatum> data, String namespace) {
        return new PutMetricDataRequest()
            .withNamespace(namespace)
            .withMetricData(data)
            .withRequestMetricCollector(RequestMetricCollector.NONE)
            ;
    }
View Full Code Here

Examples of com.amazonaws.services.cloudwatch.model.PutMetricDataRequest

            // Each CloudWatch API request may contain at maximum 20 datums.
            Iterable<List<MetricDatum>> dataPartitions = Iterables.partition(nonEmptyData, 20);
            List<Future<?>> cloudWatchFutures = Lists.newArrayListWithExpectedSize(data.size());

            for (List<MetricDatum> dataSubset : dataPartitions) {
                cloudWatchFutures.add(cloudWatch.putMetricDataAsync(new PutMetricDataRequest()
                        .withNamespace(metricNamespace)
                        .withMetricData(dataSubset)));
            }
            for (Future<?> cloudWatchFuture : cloudWatchFutures) {
                // We can't let an exception leak out of here, or else the reporter will cease running per mechanics of
View Full Code Here

Examples of com.amazonaws.services.cloudwatch.model.PutMetricDataRequest

            // Each CloudWatch API request may contain at maximum 20 datums.
            List<List<MetricDatum>> dataPartitions = Lists.partition(data, 20);
            List<Future<?>> cloudWatchFutures = new ArrayList<Future<?>>(dataPartitions.size());

            for (List<MetricDatum> dataSubset : dataPartitions) {
                cloudWatchFutures.add(cloudWatch.putMetricDataAsync(new PutMetricDataRequest()
                        .withNamespace(metricNamespace)
                        .withMetricData(dataSubset)));
            }
            for (Future<?> cloudWatchFuture : cloudWatchFutures) {
                // We can't let an exception leak out of here, or else the reporter will cease running per mechanics of
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.