Github user fidato13 commented on the issue:

    https://github.com/apache/spark/pull/15327
  
    Hi @srowen
    
    The Spark SQL property/algo that binaryFiles partition calculation is now 
implementing is the property "spark.files.openCostInBytes" (in 
org.apache.spark.sql.internal.SQLConf) utilized in 
org.apache.spark.sql.execution.FileSourceScanExec inside method 
createNonBucketedReadRDD .
    
    As the original issue states that sc.binaryFiles is always creating an RDD 
with number of partitions as 2 (irrespective of number and size of files say 
for 1000 files or for even GB's of file , It will only create two partitions 
only). 
    
    To resolve , Reynold suggested that we can probably implement somthing like 
Spark SQL does i.e. to consider the cost of opening a file(more description in 
the JIRA issue) so that it doesn't create large number of partitions for small 
files.
    
    Please let me know your suggestions on this, I have now verified that it's 
now creating an optimized number of partitions . Also, since both properties 
are used for their respective config's and for the SPARK CORE it's used just 
once for this issue , Can you please advise about if it would be okay to keep 
them or How would you like to proceed on this.
    
    Thanks



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to