Github user xubo245 commented on a diff in the pull request: https://github.com/apache/carbondata/pull/3054#discussion_r246280098 --- Diff: examples/spark2/src/main/scala/org/apache/carbondata/examples/AlluxioExample.scala --- @@ -28,46 +33,86 @@ import org.apache.carbondata.examples.util.ExampleUtils /** * configure alluxio: * 1.start alluxio - * 2.upload the jar :"/alluxio_path/core/client/target/ - * alluxio-core-client-YOUR-VERSION-jar-with-dependencies.jar" - * 3.Get more detail at:http://www.alluxio.org/docs/master/en/Running-Spark-on-Alluxio.html + * 2.Get more detail at: https://www.alluxio.org/docs/1.8/en/compute/Spark.html */ - object AlluxioExample { - def main(args: Array[String]) { - val spark = ExampleUtils.createCarbonSession("AlluxioExample") - exampleBody(spark) - spark.close() + def main (args: Array[String]) { + val carbon = ExampleUtils.createCarbonSession("AlluxioExample", + storePath = "alluxio://localhost:19998/carbondata") + exampleBody(carbon) + carbon.close() } - def exampleBody(spark : SparkSession): Unit = { + def exampleBody (spark: SparkSession): Unit = { + val rootPath = new File(this.getClass.getResource("/").getPath + + "../../../..").getCanonicalPath spark.sparkContext.hadoopConfiguration.set("fs.alluxio.impl", "alluxio.hadoop.FileSystem") --- End diff -- now Spark-shell and spark-submit is ok, but CarbonThriftServer and beeline still have some problem.
---