String systemStreamName = systemStreamPartition.substring(0, hashPosition); String partitionSegment = systemStreamPartition.substring(hashPosition + 1); SystemStream systemStream = StreamUtil.getSystemStreamFromNames(systemStreamName);
String systemStreamName = systemStreamPartition.substring(0, hashPosition); String partitionSegment = systemStreamPartition.substring(hashPosition + 1); SystemStream systemStream = StreamUtil.getSystemStreamFromNames(systemStreamName);
String systemStreamName = systemStreamPartition.substring(0, hashPosition); String partitionSegment = systemStreamPartition.substring(hashPosition + 1); SystemStream systemStream = StreamUtil.getSystemStreamFromNames(systemStreamName);
String systemStreamName = systemStreamPartition.substring(0, hashPosition); String partitionSegment = systemStreamPartition.substring(hashPosition + 1); SystemStream systemStream = StreamUtil.getSystemStreamFromNames(systemStreamName);
String systemStreamName = systemStreamPartition.substring(0, hashPosition); String partitionSegment = systemStreamPartition.substring(hashPosition + 1); SystemStream systemStream = StreamUtil.getSystemStreamFromNames(systemStreamName);
/** * Get the changelog streams and the storage factories from the config file * and put them into the maps */ private void getChangeLogSystemStreamsAndStorageFactories() { JavaStorageConfig config = new JavaStorageConfig(jobConfig); List<String> storeNames = config.getStoreNames(); log.info("Got store names: " + storeNames.toString()); for (String storeName : storeNames) { String streamName = config.getChangelogStream(storeName); log.info("stream name for " + storeName + " is " + streamName); if (streamName != null) { changeLogSystemStreams.put(storeName, StreamUtil.getSystemStreamFromNames(streamName)); } String factoryClass = config.getStorageFactoryClassName(storeName); if (factoryClass != null) { storageEngineFactories.put(storeName, Util.getObj(factoryClass, StorageEngineFactory.class)); } else { throw new SamzaException("Missing storage factory for " + storeName + "."); } } }
/** * get the changelog streams and the storage factories from the config file * and put them into the maps */ private void getChangeLogSystemStreamsAndStorageFactories() { JavaStorageConfig config = new JavaStorageConfig(jobConfig); List<String> storeNames = config.getStoreNames(); log.info("Got store names: " + storeNames.toString()); for (String storeName : storeNames) { String streamName = config.getChangelogStream(storeName); log.info("stream name for " + storeName + " is " + streamName); if (streamName != null) { changeLogSystemStreams.put(storeName, StreamUtil.getSystemStreamFromNames(streamName)); } String factoryClass = config.getStorageFactoryClassName(storeName); if (factoryClass != null) { storageEngineFactories.put(storeName, Util.getObj(factoryClass, StorageEngineFactory.class)); } else { throw new SamzaException("Missing storage factory for " + storeName + "."); } } }
/** * get the changelog streams and the storage factories from the config file * and put them into the maps */ private void getChangeLogSystemStreamsAndStorageFactories() { JavaStorageConfig config = new JavaStorageConfig(jobConfig); List<String> storeNames = config.getStoreNames(); log.info("Got store names: " + storeNames.toString()); for (String storeName : storeNames) { String streamName = config.getChangelogStream(storeName); log.info("stream name for " + storeName + " is " + streamName); if (streamName != null) { changeLogSystemStreams.put(storeName, StreamUtil.getSystemStreamFromNames(streamName)); } String factoryClass = config.getStorageFactoryClassName(storeName); if (factoryClass != null) { storageEngineFactories.put(storeName, Util.getObj(factoryClass, StorageEngineFactory.class)); } else { throw new SamzaException("Missing storage factory for " + storeName + "."); } } }
/** * get the changelog streams and the storage factories from the config file * and put them into the maps */ private void getChangeLogSystemStreamsAndStorageFactories() { JavaStorageConfig config = new JavaStorageConfig(jobConfig); List<String> storeNames = config.getStoreNames(); log.info("Got store names: " + storeNames.toString()); for (String storeName : storeNames) { String streamName = config.getChangelogStream(storeName); log.info("stream name for " + storeName + " is " + streamName); if (streamName != null) { changeLogSystemStreams.put(storeName, StreamUtil.getSystemStreamFromNames(streamName)); } String factoryClass = config.getStorageFactoryClassName(storeName); if (factoryClass != null) { storageEngineFactories.put(storeName, Util.getObj(factoryClass, StorageEngineFactory.class)); } else { throw new SamzaException("Missing storage factory for " + storeName + "."); } } }
/** * get the changelog streams and the storage factories from the config file * and put them into the maps */ private void getChangeLogSystemStreamsAndStorageFactories() { JavaStorageConfig config = new JavaStorageConfig(jobConfig); List<String> storeNames = config.getStoreNames(); log.info("Got store names: " + storeNames.toString()); for (String storeName : storeNames) { String streamName = config.getChangelogStream(storeName); log.info("stream name for " + storeName + " is " + streamName); if (streamName != null) { changeLogSystemStreams.put(storeName, StreamUtil.getSystemStreamFromNames(streamName)); } String factoryClass = config.getStorageFactoryClassName(storeName); if (factoryClass != null) { storageEngineFactories.put(storeName, Util.getObj(factoryClass, StorageEngineFactory.class)); } else { throw new SamzaException("Missing storage factory for " + storeName + "."); } } }
.filter(name -> StringUtils.isNotBlank(storageConfig.getChangelogStream(name))) .collect(Collectors.toMap(name -> name, name -> StreamUtil.getSystemStreamFromNames(storageConfig.getChangelogStream(name))));
.filter(name -> StringUtils.isNotBlank(storageConfig.getChangelogStream(name))) .collect(Collectors.toMap(name -> name, name -> StreamUtil.getSystemStreamFromNames(storageConfig.getChangelogStream(name))));
.filter(name -> StringUtils.isNotBlank(storageConfig.getChangelogStream(name))) .collect(Collectors.toMap(name -> name, name -> StreamUtil.getSystemStreamFromNames(storageConfig.getChangelogStream(name))));
.filter(name -> StringUtils.isNotBlank(storageConfig.getChangelogStream(name))) .collect(Collectors.toMap(name -> name, name -> StreamUtil.getSystemStreamFromNames(storageConfig.getChangelogStream(name))));
.filter(name -> StringUtils.isNotBlank(storageConfig.getChangelogStream(name))) .collect(Collectors.toMap(name -> name, name -> StreamUtil.getSystemStreamFromNames(storageConfig.getChangelogStream(name))));
if (changelog != null) { LOGGER.info("Clear store {} changelog {}", store, changelog); SystemStream systemStream = StreamUtil.getSystemStreamFromNames(changelog); StreamSpec spec = StreamSpec.createChangeLogStreamSpec(systemStream.getStream(), systemStream.getSystem(), 1); systemAdmins.getSystemAdmin(spec.getSystemName()).clearStream(spec);
if (changelog != null) { LOGGER.info("Clear store {} changelog {}", store, changelog); SystemStream systemStream = StreamUtil.getSystemStreamFromNames(changelog); StreamSpec spec = StreamSpec.createChangeLogStreamSpec(systemStream.getStream(), systemStream.getSystem(), 1); systemAdmins.getSystemAdmin(spec.getSystemName()).clearStream(spec);
if (changelog != null) { LOGGER.info("Clear store {} changelog {}", store, changelog); SystemStream systemStream = StreamUtil.getSystemStreamFromNames(changelog); StreamSpec spec = StreamSpec.createChangeLogStreamSpec(systemStream.getStream(), systemStream.getSystem(), 1); systemAdmins.getSystemAdmin(spec.getSystemName()).clearStream(spec);
if (changelog != null) { LOGGER.info("Clear store {} changelog {}", store, changelog); SystemStream systemStream = StreamUtil.getSystemStreamFromNames(changelog); StreamSpec spec = StreamSpec.createChangeLogStreamSpec(systemStream.getStream(), systemStream.getSystem(), 1); systemAdmins.getSystemAdmin(spec.getSystemName()).clearStream(spec);
if (changelog != null) { LOGGER.info("Clear store {} changelog {}", store, changelog); SystemStream systemStream = StreamUtil.getSystemStreamFromNames(changelog); StreamSpec spec = StreamSpec.createChangeLogStreamSpec(systemStream.getStream(), systemStream.getSystem(), 1); systemAdmins.getSystemAdmin(spec.getSystemName()).clearStream(spec);