Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Apache Spark version to --version text #1400

Merged
merged 1 commit into from
Feb 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public final class About {
private static final String COMMIT = "${git.commit.id}";
private static final String HADOOP_VERSION = "${hadoop.version}";
private static final String SCALA_VERSION = "${scala.version}";
private static final String SPARK_VERSION = "${spark.version}";
private static final String VERSION = "${project.version}";

/**
Expand Down Expand Up @@ -56,36 +57,45 @@ public String commit() {
}

/**
* Return the Hadoop version.
* Return the Hadoop compile scope dependency version.
*
* @return the Hadoop version
* @return the Hadoop compile scope dependency version
*/
public String hadoopVersion() {
return HADOOP_VERSION;
}

/**
* Return the Scala version.
* Return the Scala compile scope dependency version.
*
* @return the Scala version
* @return the Scala compile scope dependency version
*/
public String scalaVersion() {
return SCALA_VERSION;
}

/**
* Return the version.
* Return the Apache Spark compile scope dependency version.
*
* @return the version
* @return the Apache Spark compile scope dependency version
*/
public String sparkVersion() {
return SPARK_VERSION;
}

/**
* Return the ADAM version.
*
* @return the ADAM version
*/
public String version() {
return VERSION;
}

/**
* Return true if the version is a snapshot.
* Return true if the ADAM version is a snapshot.
*
* @return true if the version is a snapshot
* @return true if the ADAM version is a snapshot
*/
public boolean isSnapshot() {
return VERSION.contains("SNAPSHOT");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ class ADAMMain @Inject() (commandGroups: List[CommandGroup]) extends Logging {
if (about.isSnapshot) {
println("Commit: %s Build: %s".format(about.commit, about.buildTimestamp))
}
println("Built for: Scala %s and Hadoop %s".format(about.scalaVersion, about.hadoopVersion))
println("Built for: Apache Spark %s, Scala %s, and Hadoop %s"
.format(about.sparkVersion, about.scalaVersion, about.hadoopVersion))
}

private def printCommands() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class AboutSuite extends FunSuite {
assert(about.commit !== "${git.commit.id}")
assert(about.hadoopVersion !== "${hadoop.version}")
assert(about.scalaVersion !== "${scala.version}")
assert(about.sparkVersion !== "${spark.version}")
assert(about.version !== "${version}")
}

Expand All @@ -37,6 +38,7 @@ class AboutSuite extends FunSuite {
assert(about.commit.nonEmpty)
assert(about.hadoopVersion.nonEmpty)
assert(about.scalaVersion.nonEmpty)
assert(about.sparkVersion.nonEmpty)
assert(about.version.nonEmpty)
}
}