Skip to content

Commit

Permalink
Improves readiness
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-daroussin committed Dec 20, 2024
1 parent 1fb1acf commit cd41e27
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,19 @@ Ensure to replace state descriptor constructors using `Class[T]` param with cons
```scala mdoc
import org.apache.flink.api.common.state.ValueStateDescriptor
import org.apache.flink.api.common.typeinfo.TypeInformation

// state using Kryo
val eventStateDescriptor = new ValueStateDescriptor[Option[String]]("event", classOf[Option[String]])
val eventStateDescriptor = new ValueStateDescriptor[Option[String]]("event",
classOf[Option[String]])
```
```scala mdoc:reset-object
import org.apache.flinkx.api.serializers._
import org.apache.flink.api.common.state.ValueStateDescriptor
import org.apache.flink.api.common.typeinfo.TypeInformation

// state using flink-scala-api
val eventStateDescriptor = new ValueStateDescriptor[Option[String]]("event", implicitly[TypeInformation[Option[String]]])
val eventStateDescriptor = new ValueStateDescriptor[Option[String]]("event",
implicitly[TypeInformation[Option[String]]])
```

## Usage
Expand Down

0 comments on commit cd41e27

Please sign in to comment.