Skip to content

Commit

Permalink
Update beam to 2.59
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones committed Sep 5, 2024
1 parent 078519c commit 0f1c711
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
7 changes: 4 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ import org.typelevel.scalacoptions.JavaMajorVersion.javaMajorVersion

// To test release candidates, find the beam repo and add it as a resolver
// ThisBuild / resolvers += "apache-beam-staging" at "https://repository.apache.org/content/repositories/"
ThisBuild / resolvers += "apache-beam-staging" at "https://repository.apache.org/content/repositories/orgapachebeam-1385/"
val beamVendorVersion = "0.1"
val beamVersion = "2.58.1"
val beamVersion = "2.59.0"

// check version used by beam
// https://github.com/apache/beam/blob/v2.58.1/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
// https://github.com/apache/beam/blob/v2.59.0-RC1/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
val autoServiceVersion = "1.0.1"
val autoValueVersion = "1.9"
val bigdataossVersion = "2.2.16"
Expand Down Expand Up @@ -61,7 +62,7 @@ val googleApiServicesStorageVersion = s"v1-rev20240319-$googleClientsVersion"
// beam tested versions
val zetasketchVersion = "0.1.0" // sdks/java/extensions/zetasketch/build.gradle
val avroVersion = avroCompilerVersion // sdks/java/extensions/avro/build.gradle
val flinkVersion = "1.18.0" // runners/flink/1.17/build.gradle
val flinkVersion = "1.18.0" // runners/flink/1.18/build.gradle
val flinkMinorVersion = VersionNumber(flinkVersion).numbers.take(2).mkString(".")
val hadoopVersion = "3.2.4" // sdks/java/io/parquet/build.gradle
val sparkVersion = "3.5.0" // runners/spark/3/build.gradle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ package com.spotify.scio.testing

import java.lang.{Iterable => JIterable}
import java.util.{Map => JMap}

import com.spotify.scio.coders.Coder
import com.spotify.scio.values.SCollection
import com.twitter.chill.Externalizer
import org.apache.beam.sdk.testing.PAssert
import org.apache.beam.sdk.testing.PAssert.{IterableAssert, SingletonAssert}
import org.apache.beam.sdk.transforms.SerializableFunction
import org.apache.beam.sdk.transforms.windowing.BoundedWindow
import org.apache.beam.sdk.util.CoderUtils
import org.apache.beam.sdk.util.{CoderUtils, SerializableSupplier}
import org.scalatest.matchers.{MatchResult, Matcher}
import org.{hamcrest => h}
import org.hamcrest.Matchers
Expand Down Expand Up @@ -69,13 +68,10 @@ private object ScioMatchers {
/** Create a hamcrest matcher that can be serialized using a Coder[T]. */
private def supplierFromCoder[A: Coder, B](@transient a: A, @transient context: ScioContext)(
builder: A => B
) = {
): SerializableSupplier[B] = {
val coder = CoderMaterializer.beam(context, Coder[A])
val encoded = CoderUtils.encodeToByteArray(coder, a)
new SerializableMatchers.SerializableSupplier[B] {
def a = CoderUtils.decodeFromByteArray(coder, encoded)
def get() = builder(a)
}
() => builder(CoderUtils.decodeFromByteArray(coder, encoded))
}

/**
Expand Down

0 comments on commit 0f1c711

Please sign in to comment.