lamber-ken commented on issue #1290: [HUDI-584] Relocate spark-avro dependency by maven-shade-plugin URL: https://github.com/apache/incubator-hudi/pull/1290#issuecomment-580144740 hi @bhasudha, you're welcome. This works well with ` spark-3.0-preview2 and scala 2.12`. ``` wget http://mirror.bit.edu.cn/apache/spark/spark-3.0.0-preview2/spark-3.0.0-preview2-bin-hadoop2.7.tgz dev/change-scala-version.sh 2.12 mvn clean package -DskipTests -DskipITs -Dcheckstyle.skip=true -Drat.skip=true export SPARK_HOME=/work/BigData/install/spark/spark-3.0.0-preview2-bin-hadoop2.7 ${SPARK_HOME}/bin/spark-shell \ --jars `ls packaging/hudi-spark-bundle/target/hudi-spark-bundle_*.*-*.*.*-SNAPSHOT.jar` \ --conf 'spark.serializer=org.apache.spark.serializer.KryoSerializer' val basePath = "file:///tmp/hudi_mor_table" var datas = List("""{ "name": "kenken", "ts": 1574297893836, "age": 12, "location": "latitude"}""") val df = spark.read.json(spark.sparkContext.parallelize(datas, 2)) df.write.format("org.apache.hudi"). option("hoodie.datasource.write.recordkey.field", "name"). option("hoodie.datasource.write.partitionpath.field", "location"). option("hoodie.datasource.write.precombine.field", "ts"). option("hoodie.table.name", "tableName"). mode("Overwrite"). save(basePath) spark.read.format("org.apache.hudi").load(basePath + "/*/").show() ``` Right, I think it needs an new jira as a subtask of HUDI-584.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
