Tabnine Logo
TableProvider.generateConfig
Code IndexAdd Tabnine to your IDE (free)

How to use
generateConfig
method
in
org.apache.samza.table.descriptors.TableProvider

Best Java code snippets using org.apache.samza.table.descriptors.TableProvider.generateConfig (Showing top 4 results out of 315)

origin: org.apache.samza/samza-core_2.12

/**
 * Generate table configurations given a list of table specs
 * @param config the job configuration
 * @param tableSpecs the list of tableSpecs
 * @return configuration for the tables
 */
static public Map<String, String> generateConfigsForTableSpecs(Config config, List<TableSpec> tableSpecs) {
 Map<String, String> tableConfigs = new HashMap<>();
 tableSpecs.forEach(tableSpec -> {
   // Add table provider factory config
   tableConfigs.put(String.format(JavaTableConfig.TABLE_PROVIDER_FACTORY, tableSpec.getId()),
     tableSpec.getTableProviderFactoryClassName());
   // Generate additional configuration
   TableProviderFactory tableProviderFactory =
     Util.getObj(tableSpec.getTableProviderFactoryClassName(), TableProviderFactory.class);
   TableProvider tableProvider = tableProviderFactory.getTableProvider(tableSpec);
   tableConfigs.putAll(tableProvider.generateConfig(config, tableConfigs));
  });
 LOG.info("TableConfigGenerator has generated configs {}", tableConfigs);
 return tableConfigs;
}
origin: org.apache.samza/samza-core_2.11

/**
 * Generate table configurations given a list of table specs
 * @param config the job configuration
 * @param tableSpecs the list of tableSpecs
 * @return configuration for the tables
 */
static public Map<String, String> generateConfigsForTableSpecs(Config config, List<TableSpec> tableSpecs) {
 Map<String, String> tableConfigs = new HashMap<>();
 tableSpecs.forEach(tableSpec -> {
   // Add table provider factory config
   tableConfigs.put(String.format(JavaTableConfig.TABLE_PROVIDER_FACTORY, tableSpec.getId()),
     tableSpec.getTableProviderFactoryClassName());
   // Generate additional configuration
   TableProviderFactory tableProviderFactory =
     Util.getObj(tableSpec.getTableProviderFactoryClassName(), TableProviderFactory.class);
   TableProvider tableProvider = tableProviderFactory.getTableProvider(tableSpec);
   tableConfigs.putAll(tableProvider.generateConfig(config, tableConfigs));
  });
 LOG.info("TableConfigGenerator has generated configs {}", tableConfigs);
 return tableConfigs;
}
origin: org.apache.samza/samza-core_2.10

/**
 * Generate table configurations given a list of table specs
 * @param config the job configuration
 * @param tableSpecs the list of tableSpecs
 * @return configuration for the tables
 */
static public Map<String, String> generateConfigsForTableSpecs(Config config, List<TableSpec> tableSpecs) {
 Map<String, String> tableConfigs = new HashMap<>();
 tableSpecs.forEach(tableSpec -> {
   // Add table provider factory config
   tableConfigs.put(String.format(JavaTableConfig.TABLE_PROVIDER_FACTORY, tableSpec.getId()),
     tableSpec.getTableProviderFactoryClassName());
   // Generate additional configuration
   TableProviderFactory tableProviderFactory =
     Util.getObj(tableSpec.getTableProviderFactoryClassName(), TableProviderFactory.class);
   TableProvider tableProvider = tableProviderFactory.getTableProvider(tableSpec);
   tableConfigs.putAll(tableProvider.generateConfig(config, tableConfigs));
  });
 LOG.info("TableConfigGenerator has generated configs {}", tableConfigs);
 return tableConfigs;
}
origin: org.apache.samza/samza-core

/**
 * Generate table configurations given a list of table specs
 * @param config the job configuration
 * @param tableSpecs the list of tableSpecs
 * @return configuration for the tables
 */
static public Map<String, String> generateConfigsForTableSpecs(Config config, List<TableSpec> tableSpecs) {
 Map<String, String> tableConfigs = new HashMap<>();
 tableSpecs.forEach(tableSpec -> {
   // Add table provider factory config
   tableConfigs.put(String.format(JavaTableConfig.TABLE_PROVIDER_FACTORY, tableSpec.getId()),
     tableSpec.getTableProviderFactoryClassName());
   // Generate additional configuration
   TableProviderFactory tableProviderFactory =
     Util.getObj(tableSpec.getTableProviderFactoryClassName(), TableProviderFactory.class);
   TableProvider tableProvider = tableProviderFactory.getTableProvider(tableSpec);
   tableConfigs.putAll(tableProvider.generateConfig(config, tableConfigs));
  });
 LOG.info("TableConfigGenerator has generated configs {}", tableConfigs);
 return tableConfigs;
}
org.apache.samza.table.descriptorsTableProvidergenerateConfig

Javadoc

Generate any configuration for this table, the generated configuration is used by Samza container to construct this table and any components necessary. Instead of manipulating the input parameters, this method should return the generated configuration.

Popular methods of TableProvider

  • close
    Shutdown the underlying table
  • getTable
    Get an instance of the table for read/write operations
  • init
    Initialize TableProvider with container and task context

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • getSupportFragmentManager (FragmentActivity)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Github Copilot 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