spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Owen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-21105) Useless empty files in hive table
Date Thu, 15 Jun 2017 08:48:00 GMT

     [ 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


Mime
View raw message