forked from elastic/elasticsearch
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK] Fixing version warning for Spark Library level
fixes elastic#824
- Loading branch information
Showing
6 changed files
with
105 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
spark/core/main/scala/org/elasticsearch/spark/rdd/CompatibilityLevel.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package org.elasticsearch.spark.rdd | ||
|
||
trait CompatibilityLevel { | ||
def versionId: String | ||
def versionDescription: String | ||
} |
11 changes: 11 additions & 0 deletions
11
spark/sql-13/src/main/scala/org/elasticsearch/spark/sql/SparkSQLCompatibilityLevel.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.elasticsearch.spark.sql | ||
|
||
import org.elasticsearch.spark.rdd.CompatibilityLevel | ||
|
||
/** | ||
* For determining Spark Version Compatibility | ||
*/ | ||
class SparkSQLCompatibilityLevel extends CompatibilityLevel { | ||
val versionId = "13" | ||
val versionDescription = "1.3-1.6" | ||
} |
15 changes: 15 additions & 0 deletions
15
spark/sql-13/src/test/scala/org/elasticsearch/spark/rdd/CompatibilityCheckTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.elasticsearch.spark.rdd | ||
|
||
import org.junit.Test | ||
|
||
/** | ||
* Created by james.baiera on 8/17/16. | ||
*/ | ||
class CompatibilityCheckTest { | ||
|
||
@Test | ||
def checkCompatibility: Unit = { | ||
CompatUtils.checkSparkLibraryCompatibility(true) | ||
} | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
spark/sql-20/src/main/scala/org/elasticsearch/spark/sql/SparkSQLCompatibilityLevel.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.elasticsearch.spark.sql | ||
|
||
import org.elasticsearch.spark.rdd.CompatibilityLevel | ||
|
||
/** | ||
* For determining Spark Version Compatibility | ||
*/ | ||
class SparkSQLCompatibilityLevel extends CompatibilityLevel { | ||
val versionId = "20" | ||
val versionDescription = "2.0" | ||
} |
15 changes: 15 additions & 0 deletions
15
spark/sql-20/src/test/scala/org/elasticsearch/spark/rdd/CompatibilityCheckTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.elasticsearch.spark.rdd | ||
|
||
import org.junit.Test | ||
|
||
/** | ||
* Created by james.baiera on 8/17/16. | ||
*/ | ||
class CompatibilityCheckTest { | ||
|
||
@Test | ||
def checkCompatibility: Unit = { | ||
CompatUtils.checkSparkLibraryCompatibility(true) | ||
} | ||
|
||
} |