Tabnine Logo
JavaSystemConfig.getSystemFactories
Code IndexAdd Tabnine 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)

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

  • Making http post requests using okhttp
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Kernel (java.awt.image)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now