Package cascading.scheme

Examples of cascading.scheme.Scheme


  @Test
  public void testTrapTapSourceSink() throws Exception
    {
    getPlatform().copyFromLocal( inputFileApache );

    Scheme scheme = getPlatform().getTestFailScheme();

    Tap source = getPlatform().getTap( scheme, inputFileApache, SinkMode.KEEP );

    Pipe pipe = new Pipe( "map" );
View Full Code Here


  @Test
  public void testSourceConfInit() throws IOException
    {
    getPlatform().copyFromLocal( inputFileNums20 );

    Scheme scheme = new SchemeWithProperties( new Fields( "line" ) );
    Tap source = getPlatform().getTap( scheme, inputFileNums20, SinkMode.KEEP );

    Pipe pipe = new Pipe( "test" );

    Tap sink = getPlatform().getTextFile( getOutputPath( "sourceconfinit" ), SinkMode.REPLACE );
View Full Code Here

    Tap source = getPlatform().getTextFile( new Fields( "line" ), inputFileNums20, SinkMode.KEEP );

    Pipe pipe = new Pipe( "test" );

    Scheme scheme = new SchemeWithProperties( new Fields( "line" ) );
    Tap sink = getPlatform().getTap( scheme, getOutputPath( "sinkconfinit" ), SinkMode.REPLACE );

    Properties properties = new Properties();
    properties.setProperty( "default", "connector-default" );
    properties.setProperty( "replace", "connector-replace" );
View Full Code Here

    return tap;
    }

  public Scheme createScheme( Stereotype<Protocol, Format> stereotype, Protocol protocol, Format format, Properties properties )
    {
    Scheme scheme = null;
    try
      {
      LOG.info( "using " + getDescription() + " to create scheme for stereotype {} with properties: {}", stereotype.getName(), properties );
      scheme = factoryObject.createScheme( protocol.toString(), format.toString(), stereotype.getFields(), properties );
View Full Code Here

    if( formatHandler == null )
      throw new IllegalArgumentException( "no format handler for format: " + format );

    // do not make loadable, tap loadable will handle dynamic classloader issues
    Scheme scheme = formatHandler.createScheme( tableDef.getStereotype(), protocol, format );

    Resource<Protocol, Format, SinkMode> resource = tableDef.getResourceWith( sinkMode );

    return ( (LingualProtocolHandler) protocolHandler ).createLoadableTap( scheme, resource );
    }
View Full Code Here

    if( protocolHandler == null || formatHandler == null )
      return null;

    // do not make loadable, tap loadable will handle dynamic classloader issues
    Scheme scheme = formatHandler.createScheme( stereotype, resource.getProtocol(), resource.getFormat() );

    return ( (LingualProtocolHandler) protocolHandler ).createLoadableTap( scheme, resource );
    }
View Full Code Here

TOP

Related Classes of cascading.scheme.Scheme

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.