You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Next »

This is an attempt to sketch out the admin and developer visible changes that could be used to support version specific contributors.

Below is a sample of how the ServiceDeploymentContributor contract could be enhanced to declare support for particular versions.

VersionedServiceDeploymentContributor
package org.apache.hadoop.gateway.deploy;
import org.apache.hadoop.gateway.topology.Service;
// An extension to base interface for backward compatibility with existing contributors.
// Service located and loaded via the base interface.
public interface VersionedServiceDeploymentContributor extends ServiceDeploymentContributor {
  // The versions supported by this contributor.
  // Formatted according to the Maven Enforcer plugin syntax.
  // http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html
  // Returning null indicates that all versions are supported and is equivalent to "[0,)"
  String getVersions();
}

Below is a sample of how version could be added to the topology file.

Toplogy File
<topology>
    <gateway>
    ...
    </gateway>
    ....
    <service>
        <role>HIVE</role>
        <version>0.13.0</version>
        <url>http://localhost:10001/cliservice</url>
    </service>
</topology>

Contributor Selection

  1. In general the contributor declaring the latest explicit version support that includes the required version is selected.
  2. In the case of a tie selection will continue with the next latest explicit version support
  3. This will continue until a single contributor is selected.
  4. If this is not possible an arbitrary selection will be made from the remaining candidates.

Open Questions

  • No labels