Skip to content

Commit

Permalink
pravega: adapt to Scala 2.13 (#2803)
Browse files Browse the repository at this point in the history
  • Loading branch information
ennru authored Jan 18, 2022
1 parent a358042 commit f0dc67f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import docs.scaladsl.Serializers._
class PravegaKVTableSpec extends PravegaBaseSpec with Repeated {

private val tablewriterSettings: TableWriterSettings[Int, Person] =
TableWriterSettingsBuilder[Int, Person]
TableWriterSettingsBuilder[Int, Person]()
.withSerializers(id => new TableKey(intSerializer.serialize(id)))
.build()

Expand All @@ -40,7 +40,7 @@ class PravegaKVTableSpec extends PravegaBaseSpec with Repeated {

Await.ready(fut, remainingOrDefault)

val tableSettings = TableReaderSettingsBuilder[Int, Person]
val tableSettings = TableReaderSettingsBuilder[Int, Person]()
.withTableKey(id => new TableKey(intSerializer.serialize(id)))
.build()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class PravegaStreamAndTableSpec extends PravegaBaseSpec with Repeated {
def readTableFlow(scope: String, tableName: String) = {
// #table-reading-flow
val tableSettings: TableSettings[String, Int] =
TableReaderSettingsBuilder[String, Int]
TableReaderSettingsBuilder[String, Int]()
.withTableKey(p => new TableKey(stringSerializer.serialize(p)))
.build()
PravegaTable
Expand All @@ -42,7 +42,7 @@ class PravegaStreamAndTableSpec extends PravegaBaseSpec with Repeated {

def writeTableFlow(scope: String, tableName: String) = {
val tableWriterSettings: TableWriterSettings[String, Int] =
TableWriterSettingsBuilder[String, Int]
TableWriterSettingsBuilder[String, Int]()
.withSerializers(k => new TableKey(stringSerializer.serialize(k)))
.build()
PravegaTable.writeFlow(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class PravegaReadWriteDocs {

}

implicit val tablewriterSettings = TableWriterSettingsBuilder[Int, Person]
implicit val tablewriterSettings = TableWriterSettingsBuilder[Int, Person]()
.withSerializers(id => new TableKey(intSerializer.serialize(id)))
.build()

Expand All @@ -110,7 +110,7 @@ class PravegaReadWriteDocs {

val clientConfig = ClientConfig.builder().build()

val tableSettings = TableReaderSettingsBuilder[Int, Person]
val tableSettings = TableReaderSettingsBuilder[Int, Person]()
.withTableKey(id => new TableKey(intSerializer.serialize(id)))
.build()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class PravegaSettingsSpec extends PravegaBaseSpec with Matchers {

"build TableWriterSettings with programmatic customisation" in {
//#table-writer-settings
val tableWriterSettings = TableWriterSettingsBuilder[Int, String]
val tableWriterSettings = TableWriterSettingsBuilder[Int, String]()
.clientConfigBuilder(_.enableTlsToController(true)) // ClientConfig customization
.withMaximumInflightMessages(5)
.withSerializers(str => new TableKey(intSerializer.serialize(str.hashCode())))
Expand All @@ -90,7 +90,7 @@ class PravegaSettingsSpec extends PravegaBaseSpec with Matchers {

"build TableReaderSettings with programmatic customisation" in {
//#table-reader-settings
val tableReaderSettings = TableReaderSettingsBuilder[Int, String]
val tableReaderSettings = TableReaderSettingsBuilder[Int, String]()
.clientConfigBuilder(_.enableTlsToController(true)) // ClientConfig customization
.withMaximumInflightMessages(5)
.withMaxEntriesAtOnce(100)
Expand Down

0 comments on commit f0dc67f

Please sign in to comment.