/** * Creates a {@link TaskKvStateRegistry} facade for the {@link Task} * identified by the given JobID and JobVertexID instance. * * @param jobId JobID of the task * @param jobVertexId JobVertexID of the task * @return A {@link TaskKvStateRegistry} facade for the task */ public TaskKvStateRegistry createTaskRegistry(JobID jobId, JobVertexID jobVertexId) { return new TaskKvStateRegistry(this, jobId, jobVertexId); }
public void dispose() { if (kvStateRegistry != null) { kvStateRegistry.unregisterAll(); } states.clear(); lastState = null; lastStateName = null; }
private void publishQueryableStateIfEnabled( StateDescriptor<?, ?> stateDescriptor, InternalKvState<?, ?, ?> kvState) { if (stateDescriptor.isQueryable()) { if (kvStateRegistry == null) { throw new IllegalStateException("State backend has not been initialized for job."); } String name = stateDescriptor.getQueryableStateName(); kvStateRegistry.registerKvState(keyGroupRange, name, kvState); } }
private void publishQueryableStateIfEnabled( StateDescriptor<?, ?> stateDescriptor, InternalKvState<?, ?, ?> kvState) { if (stateDescriptor.isQueryable()) { if (kvStateRegistry == null) { throw new IllegalStateException("State backend has not been initialized for job."); } String name = stateDescriptor.getQueryableStateName(); kvStateRegistry.registerKvState(keyGroupRange, name, kvState); } }
/** * Closes the state backend, releasing all internal resources, but does not delete any persistent * checkpoint data. * */ @Override public void dispose() { IOUtils.closeQuietly(cancelStreamRegistry); if (kvStateRegistry != null) { kvStateRegistry.unregisterAll(); } lastName = null; lastState = null; keyValueStatesByName.clear(); }
/** * Creates a {@link TaskKvStateRegistry} facade for the {@link Task} * identified by the given JobID and JobVertexID instance. * * @param jobId JobID of the task * @param jobVertexId JobVertexID of the task * @return A {@link TaskKvStateRegistry} facade for the task */ public TaskKvStateRegistry createTaskRegistry(JobID jobId, JobVertexID jobVertexId) { return new TaskKvStateRegistry(this, jobId, jobVertexId); }
private void registerAsQueryableState(StateDescriptor stateDesc, State state) { if (stateDesc.isQueryable()) { Preconditions.checkNotNull(kvStateRegistry, "Can not register queryable state, because the registry is null."); kvStateRegistry.registerKvState(internalStateBackend.getKeyGroupRange(), stateDesc.getQueryableStateName(), (InternalKvState) state); } } }
/** * Closes the state backend, releasing all internal resources, but does not delete any persistent * checkpoint data. * */ @Override public void dispose() { IOUtils.closeQuietly(this); if (kvStateRegistry != null) { kvStateRegistry.unregisterAll(); } lastName = null; lastState = null; keyValueStatesByName.clear(); }
/** * Creates a {@link TaskKvStateRegistry} facade for the {@link Task} * identified by the given JobID and JobVertexID instance. * * @param jobId JobID of the task * @param jobVertexId JobVertexID of the task * @return A {@link TaskKvStateRegistry} facade for the task */ public TaskKvStateRegistry createTaskRegistry(JobID jobId, JobVertexID jobVertexId) { return new TaskKvStateRegistry(this, jobId, jobVertexId); }
kvStateRegistry.registerKvState(keyGroupRange, name, kvState);
/** * Closes the state backend, releasing all internal resources, but does not delete any persistent * checkpoint data. * */ @Override public void dispose() { IOUtils.closeQuietly(cancelStreamRegistry); if (kvStateRegistry != null) { kvStateRegistry.unregisterAll(); } lastName = null; lastState = null; keyValueStatesByName.clear(); }
/** * Creates a {@link TaskKvStateRegistry} facade for the {@link Task} * identified by the given JobID and JobVertexID instance. * * @param jobId JobID of the task * @param jobVertexId JobVertexID of the task * @return A {@link TaskKvStateRegistry} facade for the task */ public TaskKvStateRegistry createTaskRegistry(JobID jobId, JobVertexID jobVertexId) { return new TaskKvStateRegistry(this, jobId, jobVertexId); }
/** * Closes the state backend, releasing all internal resources, but does not delete any persistent * checkpoint data. * */ @Override public void dispose() { IOUtils.closeQuietly(cancelStreamRegistry); if (kvStateRegistry != null) { kvStateRegistry.unregisterAll(); } lastName = null; lastState = null; keyValueStatesByName.clear(); }