Codota Logo
JavaSystemConfig.getSystemFactories
Code IndexAdd Codota to your IDE (free)

How to use
getSystemFactories
method
in
org.apache.samza.config.JavaSystemConfig

Best Java code snippets using org.apache.samza.config.JavaSystemConfig.getSystemFactories (Showing top 10 results out of 315)

  • Common ways to obtain JavaSystemConfig
private void myMethod () {
JavaSystemConfig j =
  • Codota IconConfig config;new JavaSystemConfig(config)
  • Smart code suggestions by Codota
}
origin: apache/samza

/**
 * Get {@link SystemAdmin} instances for all the systems defined in this config.
 *
 * @return map of system name to {@link SystemAdmin}
 */
public Map<String, SystemAdmin> getSystemAdmins() {
 return getSystemFactories().entrySet()
   .stream()
   .collect(Collectors.toMap(systemNameToFactoryEntry -> systemNameToFactoryEntry.getKey(),
     systemNameToFactoryEntry -> systemNameToFactoryEntry.getValue()
       .getAdmin(systemNameToFactoryEntry.getKey(), this)));
}
origin: org.apache.samza/samza-core

/**
 * Get {@link SystemAdmin} instances for all the systems defined in this config.
 *
 * @return map of system name to {@link SystemAdmin}
 */
public Map<String, SystemAdmin> getSystemAdmins() {
 return getSystemFactories().entrySet()
   .stream()
   .collect(Collectors.toMap(systemNameToFactoryEntry -> systemNameToFactoryEntry.getKey(),
     systemNameToFactoryEntry -> systemNameToFactoryEntry.getValue()
       .getAdmin(systemNameToFactoryEntry.getKey(), this)));
}
origin: org.apache.samza/samza-core_2.12

/**
 * Get {@link SystemAdmin} instances for all the systems defined in this config.
 *
 * @return map of system name to {@link SystemAdmin}
 */
public Map<String, SystemAdmin> getSystemAdmins() {
 return getSystemFactories().entrySet()
   .stream()
   .collect(Collectors.toMap(systemNameToFactoryEntry -> systemNameToFactoryEntry.getKey(),
     systemNameToFactoryEntry -> systemNameToFactoryEntry.getValue()
       .getAdmin(systemNameToFactoryEntry.getKey(), this)));
}
origin: org.apache.samza/samza-core_2.11

/**
 * Get {@link SystemAdmin} instances for all the systems defined in this config.
 *
 * @return map of system name to {@link SystemAdmin}
 */
public Map<String, SystemAdmin> getSystemAdmins() {
 return getSystemFactories().entrySet()
   .stream()
   .collect(Collectors.toMap(systemNameToFactoryEntry -> systemNameToFactoryEntry.getKey(),
     systemNameToFactoryEntry -> systemNameToFactoryEntry.getValue()
       .getAdmin(systemNameToFactoryEntry.getKey(), this)));
}
origin: org.apache.samza/samza-core_2.10

/**
 * Get {@link SystemAdmin} instances for all the systems defined in this config.
 *
 * @return map of system name to {@link SystemAdmin}
 */
public Map<String, SystemAdmin> getSystemAdmins() {
 return getSystemFactories().entrySet()
   .stream()
   .collect(Collectors.toMap(systemNameToFactoryEntry -> systemNameToFactoryEntry.getKey(),
     systemNameToFactoryEntry -> systemNameToFactoryEntry.getValue()
       .getAdmin(systemNameToFactoryEntry.getKey(), this)));
}
origin: org.apache.samza/samza-core_2.12

/**
 * get the SystemConsumers for the stores
 */
private HashMap<String, SystemConsumer> getStoreConsumers() {
 HashMap<String, SystemConsumer> storeConsumers = new HashMap<>();
 Map<String, SystemFactory> systemFactories = new JavaSystemConfig(jobConfig).getSystemFactories();
 for (Entry<String, SystemStream> entry : changeLogSystemStreams.entrySet()) {
  String storeSystem = entry.getValue().getSystem();
  if (!systemFactories.containsKey(storeSystem)) {
   throw new SamzaException("Changelog system " + storeSystem + " for store " + entry.getKey() + " does not exist in the config.");
  }
  storeConsumers.put(entry.getKey(), systemFactories.get(storeSystem).getConsumer(storeSystem, jobConfig, new MetricsRegistryMap()));
 }
 return storeConsumers;
}
origin: org.apache.samza/samza-core

/**
 * get the SystemConsumers for the stores
 */
private HashMap<String, SystemConsumer> getStoreConsumers() {
 HashMap<String, SystemConsumer> storeConsumers = new HashMap<>();
 Map<String, SystemFactory> systemFactories = new JavaSystemConfig(jobConfig).getSystemFactories();
 for (Entry<String, SystemStream> entry : changeLogSystemStreams.entrySet()) {
  String storeSystem = entry.getValue().getSystem();
  if (!systemFactories.containsKey(storeSystem)) {
   throw new SamzaException("Changelog system " + storeSystem + " for store " + entry.getKey() + " does not exist in the config.");
  }
  storeConsumers.put(entry.getKey(), systemFactories.get(storeSystem).getConsumer(storeSystem, jobConfig, new MetricsRegistryMap()));
 }
 return storeConsumers;
}
origin: org.apache.samza/samza-core_2.11

/**
 * get the SystemConsumers for the stores
 */
private HashMap<String, SystemConsumer> getStoreConsumers() {
 HashMap<String, SystemConsumer> storeConsumers = new HashMap<>();
 Map<String, SystemFactory> systemFactories = new JavaSystemConfig(jobConfig).getSystemFactories();
 for (Entry<String, SystemStream> entry : changeLogSystemStreams.entrySet()) {
  String storeSystem = entry.getValue().getSystem();
  if (!systemFactories.containsKey(storeSystem)) {
   throw new SamzaException("Changelog system " + storeSystem + " for store " + entry.getKey() + " does not exist in the config.");
  }
  storeConsumers.put(entry.getKey(), systemFactories.get(storeSystem).getConsumer(storeSystem, jobConfig, new MetricsRegistryMap()));
 }
 return storeConsumers;
}
origin: org.apache.samza/samza-core_2.10

/**
 * get the SystemConsumers for the stores
 */
private HashMap<String, SystemConsumer> getStoreConsumers() {
 HashMap<String, SystemConsumer> storeConsumers = new HashMap<>();
 Map<String, SystemFactory> systemFactories = new JavaSystemConfig(jobConfig).getSystemFactories();
 for (Entry<String, SystemStream> entry : changeLogSystemStreams.entrySet()) {
  String storeSystem = entry.getValue().getSystem();
  if (!systemFactories.containsKey(storeSystem)) {
   throw new SamzaException("Changelog system " + storeSystem + " for store " + entry.getKey() + " does not exist in the config.");
  }
  storeConsumers.put(entry.getKey(), systemFactories.get(storeSystem).getConsumer(storeSystem, jobConfig, new MetricsRegistryMap()));
 }
 return storeConsumers;
}
origin: apache/samza

 /**
  * create one TaskStorageManager for each task. Add all of them to the
  * List<TaskStorageManager>
  */
 @SuppressWarnings({"unchecked", "rawtypes"})
 private void getContainerStorageManagers() {
  Clock clock = SystemClock.instance();
  StreamMetadataCache streamMetadataCache = new StreamMetadataCache(systemAdmins, 5000, clock);
  // don't worry about prefetching for this; looks like the tool doesn't flush to offset files anyways

  Map<String, SystemFactory> systemFactories = new JavaSystemConfig(jobConfig).getSystemFactories();

  for (ContainerModel containerModel : containers.values()) {
   ContainerContext containerContext = new ContainerContextImpl(containerModel, new MetricsRegistryMap());

   ContainerStorageManager containerStorageManager =
     new ContainerStorageManager(containerModel, streamMetadataCache, systemAdmins, changeLogSystemStreams,
       storageEngineFactories, systemFactories, this.getSerdes(), jobConfig, new HashMap<>(),
       new SamzaContainerMetrics(containerModel.getId(), new MetricsRegistryMap()),
       JobContextImpl.fromConfigWithDefaults(jobConfig), containerContext, new HashMap<>(),
       storeBaseDir, storeBaseDir, maxPartitionNumber, new SystemClock());
   this.containerStorageManagers.put(containerModel.getId(), containerStorageManager);
  }
 }
}
org.apache.samza.configJavaSystemConfiggetSystemFactories

Javadoc

Get SystemFactory instances for all the systems defined in this config.

Popular methods of JavaSystemConfig

  • <init>
  • getSystemFactory
  • getSystemNames
    Get a list of system names.
  • get
  • getSystemAdmin
    Get SystemAdmin instance for given system name.
  • getSystemAdmins
    Get SystemAdmin instances for all the systems defined in this config.
  • subset
  • getSystemOffsetDefault
    Get system offset default value. systems.'system'.default.stream.samza.offset.default is the config.

Popular in Java

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Collectors (java.util.stream)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now