You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2017/06/15 08:48:00 UTC
[jira] [Updated] (SPARK-21105) Useless empty files in hive table
[ https://issues.apache.org/jira/browse/SPARK-21105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen updated SPARK-21105:
------------------------------
Priority: Minor (was: Major)
I'm not sure, but isn't that required? Not sure you can not output those files
> Useless empty files in hive table
> ---------------------------------
>
> Key: SPARK-21105
> URL: https://issues.apache.org/jira/browse/SPARK-21105
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 2.0.1
> Reporter: pin_zhang
> Priority: Minor
>
> case class Base(v: Option[Double])
> object EmptyFiles {
>
> def main(args: Array[String]): Unit = {
> val conf = new SparkConf().setAppName("scala").setMaster("local[12]")
> val ctx = new SparkContext(conf)
> val spark = SparkSession.builder().enableHiveSupport().config(conf).getOrCreate()
> val seq = Seq(Base(Some(1D)), Base(Some(1D)));
> val rdd = ctx.makeRDD[Base](seq)
> import spark.implicits._
> rdd.toDS().write.format("json").mode(SaveMode.Append).saveAsTable("EmptyFiles")
> }
> }
> // DataSet create many useless empty files for empty partition
> // if insert small RDD into the table many times, which result in too many empty files, which slow down the query.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org