Sometimes we had to start our flink app with ignor...
# random
s
Sometimes we had to start our flink app with ignore savepoints/checkpoints how to check if flink state variable not empty in right way?
Copy code
private var onlineState: ValueState[Boolean] = _
...
if (onlineStateValue == null) {}
?
c
Copy code
* Returns the current value for the state. When the state is not partitioned the returned value
 * is the same for all inputs in a given operator instance. If state partitioning is applied,
 * the value returned depends on the current operator input, as the operator maintains an
 * independent state for each partition.
 *
 * <p>If you didn't specify a default value when creating the {@link ValueStateDescriptor} this
 * will return {@code null} when no value was previously set using {@link #update(Object)}.
 *
 * @return The state value corresponding to the current input.
 * @throws IOException Thrown if the system cannot access the state.
 */
T value() throws IOException;
See second paragraph.