Package cascading.flow.planner

Examples of cascading.flow.planner.PlatformInfo


  private static PlatformInfo getPlatformInfoInternal()
    {
    URL url = JobConf.class.getResource( JobConf.class.getSimpleName() + ".class" );

    if( url == null || !url.toString().startsWith( "jar" ) )
      return new PlatformInfo( "Hadoop", null, null );

    String path = url.toString();
    String manifestPath = path.substring( 0, path.lastIndexOf( "!" ) + 1 ) + "/META-INF/MANIFEST.MF";

    Manifest manifest;

    try
      {
      manifest = new Manifest( new URL( manifestPath ).openStream() );
      }
    catch( IOException exception )
      {
      LOG.warn( "unable to get manifest from {}", manifestPath, exception );

      return new PlatformInfo( "Hadoop", null, null );
      }

    Attributes attributes = manifest.getAttributes( "org/apache/hadoop" );

    if( attributes == null )
      {
      LOG.debug( "unable to get Hadoop manifest attributes" );
      return new PlatformInfo( "Hadoop", null, null );
      }

    String vendor = attributes.getValue( "Implementation-Vendor" );
    String version = attributes.getValue( "Implementation-Version" );

    return new PlatformInfo( "Hadoop", vendor, version );
    }
View Full Code Here


    }

  @Override
  public PlatformInfo getPlatformInfo()
    {
    return new PlatformInfo( "local", "Concurrent, Inc.", Version.getRelease() );
    }
View Full Code Here

  @Override
  public String getDatabaseProductName() throws SQLException
    {
    PlatformBroker platformBroker = connection.getPlatformBroker();
    PlatformInfo platformInfo = platformBroker.getPlatformInfo();

    return String.format( "%s [%s %s]",
      Version.getProductName(),
      platformInfo.name,
      platformInfo.vendor
View Full Code Here

  @Override
  public String getDatabaseProductVersion() throws SQLException
    {
    PlatformBroker platformBroker = connection.getPlatformBroker();
    PlatformInfo platformInfo = platformBroker.getPlatformInfo();

    return String.format( "%s [%s]",
      Version.getProductVersion(),
      platformInfo.version
    );
View Full Code Here

TOP

Related Classes of cascading.flow.planner.PlatformInfo

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.