Skip to content

Commit

Permalink
Fix Dataflow ARM Java Example PostCommit bad gradle cache (#32356)
Browse files Browse the repository at this point in the history
* Fix rawtype warning in Watch and CoGroup

* fix java version matrix
  • Loading branch information
Abacn authored Aug 29, 2024
1 parent 28f2d47 commit 322c47d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
strategy:
fail-fast: false
matrix:
job_name: [beam_PostCommit_Java_Examples__Dataflow_ARM]
job_name: [beam_PostCommit_Java_Examples_Dataflow_ARM]
job_phrase: [Run Java_Examples_Dataflow_ARM PostCommit]
java_version: ['8','11','17','21']
if: |
Expand All @@ -80,7 +80,9 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-environment-action
with:
java-version: ${{ matrix.java_version }}
java-version: |
${{ matrix.java_version != '11' && matrix.java_version || '' }}
11
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: GCloud Docker credential helper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,10 @@
* <p>Do note that cross-product joins while simpler and easier to program, can cause performance problems.
*/
@SuppressWarnings({
"nullness", // TODO(https://github.com/apache/beam/issues/20497)
"rawtypes"
"nullness" // TODO(https://github.com/apache/beam/issues/20497)
})
public class CoGroup {
private static final List NULL_LIST;
private static final List<@Nullable Row> NULL_LIST;

static {
NULL_LIST = Lists.newArrayList();
Expand Down Expand Up @@ -405,7 +404,7 @@ private static JoinInformation from(
FieldAccessDescriptor resolved = fieldAccessDescriptor.resolve(schema);

// Create a new tag for the output.
TupleTag randomTag = new TupleTag<>();
TupleTag<?> randomTag = new TupleTag<>();
String keyedTag = tag + "_" + randomTag;
tagToKeyedTag.put(tagIndex, keyedTag);
PCollection<KV<Row, Row>> keyedPCollection =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@
* href="https://beam.apache.org/documentation/runners/capability-matrix/">capability matrix</a>.
*/
@SuppressWarnings({
"nullness", // TODO(https://github.com/apache/beam/issues/20497)
"rawtypes"
"nullness" // TODO(https://github.com/apache/beam/issues/20497)
})
public class Watch {
private static final Logger LOG = LoggerFactory.getLogger(Watch.class);
Expand Down Expand Up @@ -975,7 +974,7 @@ private HashCode hash128(OutputT value) {
return Hashing.murmur3_128().hashObject(value, coderFunnel);
}

private Growth.PollResult computeNeverSeenBeforeResults(
private Growth.PollResult<OutputT> computeNeverSeenBeforeResults(
PollingGrowthState<TerminationStateT> state, Growth.PollResult<OutputT> pollResult) {
// Collect results to include as newly pending. Note that the poll result may in theory
// contain multiple outputs mapping to the same output key - we need to ignore duplicates
Expand Down Expand Up @@ -1036,7 +1035,7 @@ abstract static class GrowthState {}
@VisibleForTesting
abstract static class NonPollingGrowthState<OutputT> extends GrowthState {
public static <OutputT> NonPollingGrowthState<OutputT> of(Growth.PollResult<OutputT> pending) {
return new AutoValue_Watch_NonPollingGrowthState(pending);
return new AutoValue_Watch_NonPollingGrowthState<>(pending);
}

/**
Expand All @@ -1056,14 +1055,14 @@ public static <OutputT> NonPollingGrowthState<OutputT> of(Growth.PollResult<Outp
abstract static class PollingGrowthState<TerminationStateT> extends GrowthState {
public static <TerminationStateT> PollingGrowthState<TerminationStateT> of(
TerminationStateT terminationState) {
return new AutoValue_Watch_PollingGrowthState(ImmutableMap.of(), null, terminationState);
return new AutoValue_Watch_PollingGrowthState<>(ImmutableMap.of(), null, terminationState);
}

public static <TerminationStateT> PollingGrowthState<TerminationStateT> of(
ImmutableMap<HashCode, Instant> completed,
Instant pollWatermark,
TerminationStateT terminationState) {
return new AutoValue_Watch_PollingGrowthState(completed, pollWatermark, terminationState);
return new AutoValue_Watch_PollingGrowthState<>(completed, pollWatermark, terminationState);
}

// Hashes and timestamps of outputs that have already been output and should be omitted
Expand Down

0 comments on commit 322c47d

Please sign in to comment.