@Override public void delete() throws IOException { this.stateStore.delete(getStoreName(), getTableName()); } }
@Override public T readState() throws IOException { return this.stateStore.get(getStoreName(), getTableName(), ""); }
@Override public Void call() throws Exception { stateStore.put(storeName, fileName, workUnit); return null; } }, "Serialize state to store " + storeName + " file " + fileName);
public void deleteMapping (String jobName) throws IOException { this.stateStore.delete(this.distributedStateStoreName, jobName); }
public List<State> getAllStates() throws IOException { return this.stateStore.getAll(distributedStateStoreName); }
public DatasetStoreDatasetFinder(FileSystem fs, Properties props) throws IOException { this.config = ConfigFactory.parseProperties(props); this.store = DatasetStateStore.buildDatasetStateStore(this.config); this.predicate = buildPredicate(); }
/** * Get a {@link BasicDataSource} based on the config * @param config configuration * @param broker broker * @return a {@link BasicDataSource} * @throws IOException */ public static <S extends ScopeType<S>> BasicDataSource get(Config config, SharedResourcesBroker<S> broker) throws IOException { try { return broker.getSharedResource(new MysqlDataSourceFactory<S>(), new MysqlDataSourceKey(MysqlStateStore.getDataSourceId(config), config)); } catch (NotConfiguredException nce) { throw new IOException(nce); } }
@Override public String datasetURN() { return this.key.getStoreName() + ":::" + this.key.getSanitizedDatasetUrn(); }
@Override public List<JobState.DatasetState> getAll(String storeName) throws IOException { return super.getAll(storeName); }
public DatasetStateStoreEntryManager(String storeName, String tableName, long timestamp, DatasetStateStore.TableNameParser tableNameParser, DatasetStateStore datasetStateStore) { this(storeName, tableName, timestamp, tableNameParser.getSanitizedDatasetUrn(), tableNameParser.getStateId(), datasetStateStore); }
@Override public SharedResourceFactoryResponse<BasicDataSource> createResource(SharedResourcesBroker<S> broker, ScopedConfigView<S, MysqlDataSourceKey> config) throws NotConfiguredException { MysqlDataSourceKey key = config.getKey(); Config configuration = key.getConfig(); BasicDataSource dataSource = MysqlStateStore.newDataSource(configuration); return new ResourceInstance<>(dataSource); }
@Override public List<T> getAll(String storeName) throws IOException { return getAll(storeName, "%", true); }
public MysqlDatasetStateStoreEntryManager(String storeName, String tableName, long modificationTime, MysqlDatasetStateStore stateStore) { super(storeName, tableName, modificationTime, new DatasetStateStore.TableNameParser(tableName), stateStore); this.stateStore = stateStore; }
/** * Deserialize data into a list of {@link State}s. * @param data byte array * @param states output list of states * @throws IOException */ private void deserialize(byte[] data, List<T> states) throws IOException { deserialize(data, states, null); } }
public void deleteStateStore(String storeName) throws IOException { this.datasetStateStore.delete(storeName); }
Iterable<CheckpointableWatermarkState> getAllCommittedWatermarks() throws IOException { return _stateStore.getAll(_storeName); }
@Override public List<T> getAll(String storeName, String tableName) throws IOException { return getAll(storeName, tableName, false); }