Codota Logo
SqlIOConfig.getRelSchemaProviderName
Code IndexAdd Codota to your IDE (free)

How to use
getRelSchemaProviderName
method
in
org.apache.samza.sql.interfaces.SqlIOConfig

Best Java code snippets using org.apache.samza.sql.interfaces.SqlIOConfig.getRelSchemaProviderName (Showing top 3 results out of 315)

  • Common ways to obtain SqlIOConfig
private void myMethod () {
SqlIOConfig s =
  • Codota IconSqlIOResolver sqlIOResolver;String sourceName;sqlIOResolver.fetchSourceInfo(sourceName)
  • Smart code suggestions by Codota
}
origin: org.apache.samza/samza-sql

public SamzaSqlApplicationConfig(Config staticConfig, Set<String> inputSystemStreams,
  Set<String> outputSystemStreams) {
 ioResolver = createIOResolver(staticConfig);
 inputSystemStreamConfigBySource = inputSystemStreams.stream()
    .collect(Collectors.toMap(Function.identity(), src -> ioResolver.fetchSourceInfo(src)));
 outputSystemStreamConfigsBySource = outputSystemStreams.stream()
    .collect(Collectors.toMap(Function.identity(), x -> ioResolver.fetchSinkInfo(x)));
 systemStreamConfigsBySource = new HashMap<>(inputSystemStreamConfigBySource);
 systemStreamConfigsBySource.putAll(outputSystemStreamConfigsBySource);
 Set<SqlIOConfig> systemStreamConfigs = new HashSet<>(systemStreamConfigsBySource.values());
 relSchemaProvidersBySource = systemStreamConfigs.stream()
   .collect(Collectors.toMap(SqlIOConfig::getSource,
     x -> initializePlugin("RelSchemaProvider", x.getRelSchemaProviderName(), staticConfig,
       CFG_FMT_REL_SCHEMA_PROVIDER_DOMAIN,
       (o, c) -> ((RelSchemaProviderFactory) o).create(x.getSystemStream(), c))));
 samzaRelConvertersBySource = systemStreamConfigs.stream()
   .collect(Collectors.toMap(SqlIOConfig::getSource,
     x -> initializePlugin("SamzaRelConverter", x.getSamzaRelConverterName(), staticConfig,
       CFG_FMT_SAMZA_REL_CONVERTER_DOMAIN, (o, c) -> ((SamzaRelConverterFactory) o).create(x.getSystemStream(),
         relSchemaProvidersBySource.get(x.getSource()), c))));
 udfResolver = createUdfResolver(staticConfig);
 udfMetadata = udfResolver.getUdfs();
 windowDurationMs = staticConfig.getLong(CFG_GROUPBY_WINDOW_DURATION_MS, DEFAULT_GROUPBY_WINDOW_DURATION_MS);
 // remove the SqlIOConfigs of outputs whose system is "log" out of systemStreamConfigsBySource
 outputSystemStreamConfigsBySource.forEach((k, v) -> {
   if (k.split("\\.")[0].equals(SamzaSqlApplicationConfig.SAMZA_SYSTEM_LOG)) {
     systemStreamConfigsBySource.remove(k);
   }
 });
}
origin: apache/samza

x -> initializePlugin("RelSchemaProvider", x.getRelSchemaProviderName(), staticConfig,
  CFG_FMT_REL_SCHEMA_PROVIDER_DOMAIN,
  (o, c) -> ((RelSchemaProviderFactory) o).create(x.getSystemStream(), c))));
origin: apache/samza

@Override
public SqlSchema getTableSchema(ExecutionContext context, String tableName) {
 /**
  *  currently Shell works only for systems that has Avro schemas
  */
 lastErrorMsg = "";
 int execId = execIdSeq.incrementAndGet();
 Map<String, String> staticConfigs = fetchSamzaSqlConfig(execId, context);
 Config samzaSqlConfig = new MapConfig(staticConfigs);
 SqlSchema sqlSchema = null;
 try {
  SqlIOResolver ioResolver = SamzaSqlApplicationConfig.createIOResolver(samzaSqlConfig);
  SqlIOConfig sourceInfo = ioResolver.fetchSourceInfo(tableName);
  RelSchemaProvider schemaProvider =
      SamzaSqlApplicationConfig.initializePlugin("RelSchemaProvider", sourceInfo.getRelSchemaProviderName(),
          samzaSqlConfig, SamzaSqlApplicationConfig.CFG_FMT_REL_SCHEMA_PROVIDER_DOMAIN,
          (o, c) -> ((RelSchemaProviderFactory) o).create(sourceInfo.getSystemStream(), c));
  sqlSchema =  schemaProvider.getSqlSchema();
 } catch (SamzaException ex) {
  String msg = "getTableSchema failed with exception ";
  lastErrorMsg = msg + ex.toString();
  LOG.error(msg, ex);
 }
 return sqlSchema;
}
org.apache.samza.sql.interfacesSqlIOConfiggetRelSchemaProviderName

Popular methods of SqlIOConfig

  • <init>
  • getSystemStream
  • getTableDescriptor
  • getConfig
  • getSamzaRelConverterName
  • getSource
  • getSourceFromSourceParts
  • getSourceParts
  • getSystemName
  • getSamzaRelTableKeyConverterName
  • getStreamId
  • getStreamName
  • getStreamId,
  • getStreamName,
  • isRemoteTable

Popular in Java

  • Start an intent from android
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
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