Package cascading.lingual.catalog

Examples of cascading.lingual.catalog.TableDef


    Optiq.writeSQLPlan( properties, flowFactory.getName(), getVolcanoPlanner() );

    for( Ref head : branch.heads.keySet() )
      {
      TableDef tableDefFor = getTableDefFor( platformBroker, head );
      String[] jarPath = ClassLoaderUtil.getJarPaths( getPlatformBroker(), tableDefFor );

      flowFactory.addSource( head.name, tableDefFor, jarPath );
      }

    FlowListener flowListener = null;

    if( branch.tailTableDef != null )
      {
      TableDef tableDef = branch.tailTableDef;
      String[] jarPath = ClassLoaderUtil.getJarPaths( getPlatformBroker(), tableDef );

      flowFactory.addSink( tableDef.getName(), tableDef, jarPath );
      }
    else
      {
      Resource<Protocol, Format, SinkMode> resource = createResultResource( platformBroker, flowFactory );
View Full Code Here


  private void writeValuesTuple( PlatformBroker platformBroker, Ref head ) throws IOException
    {
    SchemaCatalogManager catalog = platformBroker.getCatalogManager();
    String identifier = getIdentifierFor( platformBroker, head );

    TableDef tableDef = createTableFor( catalog, head, identifier );

    TupleEntryCollector collector = catalog.createTapFor( tableDef, SinkMode.KEEP ).openForWrite( platformBroker.getFlowProcess() );

    for( List<RexLiteral> values : head.tuples )
      collector.add( EnumerableUtil.createTupleFrom( values ) );
View Full Code Here

    }

  private TupleEntryCollector getTupleEntryCollector( PlatformBroker platformBroker, Branch branch )
    {
    LingualFlowFactory flowFactory = platformBroker.getFlowFactory( branch );
    TableDef tableDef = branch.tailTableDef;
    String[] jarPath = ClassLoaderUtil.getJarPaths( getPlatformBroker(), tableDef );

    flowFactory.addSink( tableDef.getName(), tableDef, jarPath );
    ClassLoader jarLoader = ClassLoaderUtil.getJarClassLoader( platformBroker, flowFactory );

    if( jarLoader != null )
      Thread.currentThread().setContextClassLoader( jarLoader );

    FlowProcess flowProcess = platformBroker.getFlowProcess();
    SchemaCatalogManager schemaCatalog = platformBroker.getCatalogManager();
    Map<String, TupleEntryCollector> cache = platformBroker.getCollectorCache();

    TupleEntryCollector collector;

    try
      {
      String identifier = tableDef.getIdentifier();

      if( cache != null && cache.containsKey( identifier ) )
        {
        LOG.debug( "inserting into (cached): {}", identifier );
        collector = cache.get( identifier );
View Full Code Here

TOP

Related Classes of cascading.lingual.catalog.TableDef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.