aboutsummaryrefslogtreecommitdiff
path: root/sql/hive/src/test/resources
diff options
context:
space:
mode:
authorAndrew Or <andrew@databricks.com>2016-04-25 13:23:05 -0700
committerAndrew Or <andrew@databricks.com>2016-04-25 13:23:05 -0700
commit3c5e65c339a9b4d5e01375d7f073e444898d34c8 (patch)
tree039f7e382124f03495e9b22cdc00df7791affeb7 /sql/hive/src/test/resources
parent6bfe42a3be4fbf8bc6f93a4709038fda8ad0610b (diff)
downloadspark-3c5e65c339a9b4d5e01375d7f073e444898d34c8.tar.gz
spark-3c5e65c339a9b4d5e01375d7f073e444898d34c8.tar.bz2
spark-3c5e65c339a9b4d5e01375d7f073e444898d34c8.zip
[SPARK-14721][SQL] Remove HiveContext (part 2)
## What changes were proposed in this pull request? This removes the class `HiveContext` itself along with all code usages associated with it. The bulk of the work was already done in #12485. This is mainly just code cleanup and actually removing the class. Note: A couple of things will break after this patch. These will be fixed separately. - the python HiveContext - all the documentation / comments referencing HiveContext - there will be no more HiveContext in the REPL (fixed by #12589) ## How was this patch tested? No change in functionality. Author: Andrew Or <andrew@databricks.com> Closes #12585 from andrewor14/delete-hive-context.
Diffstat (limited to 'sql/hive/src/test/resources')
-rw-r--r--sql/hive/src/test/resources/regression-test-SPARK-8489/Main.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/hive/src/test/resources/regression-test-SPARK-8489/Main.scala b/sql/hive/src/test/resources/regression-test-SPARK-8489/Main.scala
index 2590040f2e..10a017df83 100644
--- a/sql/hive/src/test/resources/regression-test-SPARK-8489/Main.scala
+++ b/sql/hive/src/test/resources/regression-test-SPARK-8489/Main.scala
@@ -15,8 +15,8 @@
* limitations under the License.
*/
-import org.apache.spark.{SparkConf, SparkContext}
-import org.apache.spark.sql.hive.HiveContext
+import org.apache.spark.SparkContext
+import org.apache.spark.sql.SparkSession
/**
* Entry point in test application for SPARK-8489.
@@ -28,15 +28,16 @@ import org.apache.spark.sql.hive.HiveContext
*
* This is used in org.apache.spark.sql.hive.HiveSparkSubmitSuite.
*/
+// TODO: actually rebuild this jar with the new changes.
object Main {
def main(args: Array[String]) {
// scalastyle:off println
println("Running regression test for SPARK-8489.")
val sc = new SparkContext("local", "testing")
- val hc = new HiveContext(sc)
+ val sparkSession = SparkSession.withHiveSupport(sc)
// This line should not throw scala.reflect.internal.MissingRequirementError.
// See SPARK-8470 for more detail.
- val df = hc.createDataFrame(Seq(MyCoolClass("1", "2", "3")))
+ val df = sparkSession.createDataFrame(Seq(MyCoolClass("1", "2", "3")))
df.collect()
println("Regression test for SPARK-8489 success!")
// scalastyle:on println