Skip to content

Commit

Permalink
use different proto
Browse files Browse the repository at this point in the history
  • Loading branch information
Naireen committed Nov 1, 2024
1 parent 210b7f0 commit c46ed3b
Show file tree
Hide file tree
Showing 48 changed files with 2,114 additions and 2,398 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ message MonitoringInfoSpecs {
]
}];

//import com.google.api.services.dataflow.model.PerWorkerMetrics;
API_REQUEST_LATENCIES = 20 [(monitoring_info_spec) = {
urn: "beam:metric:io:api_request_latencies:v1",
type: "beam:metrics:histogram_int64:v1",
Expand Down Expand Up @@ -587,9 +586,7 @@ message MonitoringInfoTypeUrns {
SET_STRING_TYPE = 11 [(org.apache.beam.model.pipeline.v1.beam_urn) =
"beam:metrics:set_string:v1"];

// Encoding: <iter><value1><value2>...<valueN></iter>
// - iter: beam:coder:iterable:v1
// - valueX: beam:coder:stringutf8:v1
// Represents histograms
PER_WORKER_HISTOGRAM = 12 [(org.apache.beam.model.pipeline.v1.beam_urn) =
"beam:metrics:per_worker_histogram_int64:v1"];

Expand Down
10 changes: 1 addition & 9 deletions runners/core-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,21 @@ test {
}
}

// def google_api_services_dataflow = library.java.google_api_services_dataflow

dependencies {
implementation project(path: ":model:pipeline", configuration: "shadow")
implementation project(path: ":sdks:java:core", configuration: "shadow")
implementation project(path: ":model:job-management", configuration: "shadow")
implementation library.java.google_api_services_dataflow
implementation library.java.vendored_guava_32_1_2_jre
implementation library.java.joda_time
implementation library.java.vendored_grpc_1_60_1
implementation library.java.slf4j_api
implementation library.java.jackson_core
implementation library.java.jackson_databind
// implementation library.java.proto_google_common_protos
implementation library.java.google_cloud_dataflow_java_proto_library_all

testImplementation project(path: ":sdks:java:core", configuration: "shadowTest")
testImplementation library.java.junit
testImplementation library.java.mockito_core
testImplementation library.java.slf4j_api
testRuntimeOnly library.java.slf4j_simple
provided(library.java.google_api_services_dataflow)
provided library.java.google_cloud_dataflow_java_proto_library_all
testImplementation library.java.google_cloud_dataflow_java_proto_library_all
testImplementation(library.java.google_api_services_dataflow)
implementation project(path: ":runners:google-cloud-dataflow-java:worker:windmill", configuration: "shadow") // need histogram proto
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
import org.apache.beam.sdk.util.HistogramData;
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Iterables;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Default implementation of {@link org.apache.beam.sdk.metrics.MetricResults}, which takes static
Expand All @@ -40,7 +38,6 @@
"nullness" // TODO(https://github.com/apache/beam/issues/20497)
})
public class DefaultMetricResults extends MetricResults {
private static final Logger LOG = LoggerFactory.getLogger(DefaultMetricResults.class);

private final Iterable<MetricResult<Long>> counters;
private final Iterable<MetricResult<DistributionResult>> distributions;
Expand All @@ -54,7 +51,6 @@ public DefaultMetricResults(
Iterable<MetricResult<GaugeResult>> gauges,
Iterable<MetricResult<StringSetResult>> stringSets,
Iterable<MetricResult<HistogramData>> perWorkerHistograms) {
LOG.info("xxx does this get here? DefaultMetricResults ");
this.counters = counters;
this.distributions = distributions;
this.gauges = gauges;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public void update(double value) {
dirty.afterModification();
}

/** Update it by another Histogram Data. */
@Override
public void update(HistogramData data) {
this.value.update(data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,4 @@ public static Histogram histogram(
boolean processWideContainer) {
return new DelegatingHistogram(metricName, bucketType, processWideContainer);
}

public static Histogram histogram(
MonitoringInfoMetricName metricName,
HistogramData.BucketType bucketType,
boolean processWideContainer,
boolean perWorkerHistogram) {
return new DelegatingHistogram(
metricName, bucketType, processWideContainer, perWorkerHistogram);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public static MetricUpdates create(
Iterable<MetricUpdate<GaugeData>> gaugeUpdates,
Iterable<MetricUpdate<StringSetData>> stringSetUpdates,
Iterable<MetricUpdate<HistogramData>> perWorkerHistogramsUpdates) {
// System.out.println("xxx metric create");
return new AutoValue_MetricUpdates(
counterUpdates,
distributionUpdates,
Expand Down
Loading

0 comments on commit c46ed3b

Please sign in to comment.