Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable publish StringSet metrics for Dataflow Legacy worker #31821

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"comment": "Modify this file in a trivial way to cause this test suite to run",
"https://github.com/apache/beam/pull/31156": "noting that PR #31156 should run this test",
"https://github.com/apache/beam/pull/31268": "noting that PR #31268 should run this test",
"https://github.com/apache/beam/pull/31490": "noting that PR #31490 should run this test"
"modification": 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -517,12 +517,9 @@ public Iterable<CounterUpdate> extractMetricUpdates(boolean isFinalUpdate) {
.transform(
update ->
MetricsToCounterUpdateConverter.fromDistribution(
update.getKey(), true, update.getUpdate())),
FluentIterable.from(updates.stringSetUpdates())
.transform(
update ->
MetricsToCounterUpdateConverter.fromStringSet(
update.getKey(), update.getUpdate())));
update.getKey(), true, update.getUpdate())));
// TODO(https://github.com/apache/beam/issues/31788): append(stringSetUpdates()) when
// backend support added
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ public Histogram getPerWorkerHistogram(
}

public Iterable<CounterUpdate> extractUpdates() {
return counterUpdates()
.append(distributionUpdates())
.append(gaugeUpdates().append(stringSetUpdates()));
return counterUpdates().append(distributionUpdates()).append(gaugeUpdates());
// TODO(https://github.com/apache/beam/issues/31788): append(stringSetUpdates()) when backend
// support added
}

private FluentIterable<CounterUpdate> counterUpdates() {
Expand Down Expand Up @@ -229,6 +229,7 @@ private FluentIterable<CounterUpdate> gaugeUpdates() {
.filter(Predicates.notNull());
}

@SuppressWarnings("unused") // https://github.com/apache/beam/issues/31788
private FluentIterable<CounterUpdate> stringSetUpdates() {
return FluentIterable.from(stringSet.entries())
.transform(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.apache.beam.sdk.metrics.StringSet;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
import org.hamcrest.Matchers;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
Expand Down Expand Up @@ -162,6 +163,7 @@ public void extractMetricUpdatesDistribution() {
}

@Test
@Ignore("https://github.com/apache/beam/issues/31788")
public void extractMetricUpdatesStringSet() {
BatchModeExecutionContext executionContext =
BatchModeExecutionContext.forTesting(PipelineOptionsFactory.create(), "testStage");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import org.hamcrest.collection.IsEmptyIterable;
import org.hamcrest.collection.IsMapContaining;
import org.joda.time.DateTimeUtils;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
Expand Down Expand Up @@ -271,6 +272,7 @@ public void testGaugeUpdateExtraction() {
}

@Test
@Ignore("https://github.com/apache/beam/issues/31788")
public void testStringSetUpdateExtraction() {
StringSet stringSet = c1.getStringSet(name1);
stringSet.add("ab");
Expand Down
Loading