Codota Logo
TableProvider
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: org.apache.samza/samza-core_2.11

/**
 * Shutdown the table manager, internally it shuts down all tables
 */
public void close() {
 tableContexts.values().forEach(ctx -> ctx.tableProvider.close());
}
origin: org.apache.samza/samza-core_2.11

 /**
  * Get a table instance
  * @param tableId Id of the table
  * @return table instance
  */
 public Table getTable(String tableId) {
  Preconditions.checkState(initialized, "TableManager has not been initialized.");

  TableCtx ctx = tableContexts.get(tableId);
  Preconditions.checkNotNull(ctx, "Unknown tableId " + tableId);

  if (ctx.table == null) {
   ctx.table = ctx.tableProvider.getTable();
  }
  return ctx.table;
 }
}
origin: org.apache.samza/samza-core_2.10

/**
 * Initialize table providers with container and task contexts
 * @param context context for the task
 */
public void init(Context context) {
 tableContexts.values().forEach(ctx -> ctx.tableProvider.init(context));
 initialized = true;
}
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.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

/**
 * Shutdown the table manager, internally it shuts down all tables
 */
public void close() {
 tableContexts.values().forEach(ctx -> ctx.tableProvider.close());
}
origin: org.apache.samza/samza-core

/**
 * Initialize table providers with container and task contexts
 * @param context context for the task
 */
public void init(Context context) {
 tableContexts.values().forEach(ctx -> ctx.tableProvider.init(context));
 initialized = true;
}
origin: org.apache.samza/samza-core

 /**
  * Get a table instance
  * @param tableId Id of the table
  * @return table instance
  */
 public Table getTable(String tableId) {
  Preconditions.checkState(initialized, "TableManager has not been initialized.");

  TableCtx ctx = tableContexts.get(tableId);
  Preconditions.checkNotNull(ctx, "Unknown tableId " + tableId);

  if (ctx.table == null) {
   ctx.table = ctx.tableProvider.getTable();
  }
  return ctx.table;
 }
}
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;
}
origin: org.apache.samza/samza-core_2.10

/**
 * Shutdown the table manager, internally it shuts down all tables
 */
public void close() {
 tableContexts.values().forEach(ctx -> ctx.tableProvider.close());
}
origin: org.apache.samza/samza-core_2.11

/**
 * Initialize table providers with container and task contexts
 * @param context context for the task
 */
public void init(Context context) {
 tableContexts.values().forEach(ctx -> ctx.tableProvider.init(context));
 initialized = true;
}
origin: org.apache.samza/samza-core_2.10

 /**
  * Get a table instance
  * @param tableId Id of the table
  * @return table instance
  */
 public Table getTable(String tableId) {
  Preconditions.checkState(initialized, "TableManager has not been initialized.");

  TableCtx ctx = tableContexts.get(tableId);
  Preconditions.checkNotNull(ctx, "Unknown tableId " + tableId);

  if (ctx.table == null) {
   ctx.table = ctx.tableProvider.getTable();
  }
  return ctx.table;
 }
}
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_2.12

/**
 * Shutdown the table manager, internally it shuts down all tables
 */
public void close() {
 tableContexts.values().forEach(ctx -> ctx.tableProvider.close());
}
origin: org.apache.samza/samza-core_2.12

/**
 * Initialize table providers with container and task contexts
 * @param context context for the task
 */
public void init(Context context) {
 tableContexts.values().forEach(ctx -> ctx.tableProvider.init(context));
 initialized = true;
}
origin: org.apache.samza/samza-core_2.12

 /**
  * Get a table instance
  * @param tableId Id of the table
  * @return table instance
  */
 public Table getTable(String tableId) {
  Preconditions.checkState(initialized, "TableManager has not been initialized.");

  TableCtx ctx = tableContexts.get(tableId);
  Preconditions.checkNotNull(ctx, "Unknown tableId " + tableId);

  if (ctx.table == null) {
   ctx.table = ctx.tableProvider.getTable();
  }
  return ctx.table;
 }
}
org.apache.samza.table.descriptorsTableProvider

Javadoc

A table provider provides the implementation for a table. It ensures a table is properly constructed and also manages its lifecycle.

Most used methods

  • close
    Shutdown the underlying table
  • generateConfig
    Generate any configuration for this table, the generated configuration is used by Samza container to
  • getTable
    Get an instance of the table for read/write operations
  • init
    Initialize TableProvider with container and task context

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • runOnUiThread (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • IsNull (org.hamcrest.core)
    Is the value null?
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
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