You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/08/02 09:58:36 UTC
[GitHub] [spark] HyukjinKwon commented on a change in pull request #25134:
[SPARK-28366][CORE] Logging in driver when loading single large
unsplittable file
HyukjinKwon commented on a change in pull request #25134: [SPARK-28366][CORE] Logging in driver when loading single large unsplittable file
URL: https://github.com/apache/spark/pull/25134#discussion_r310065074
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileScan.scala
##########
@@ -21,29 +21,40 @@ import java.util.{Locale, OptionalLong}
import org.apache.commons.lang3.StringUtils
import org.apache.hadoop.fs.Path
+import org.apache.spark.internal.Logging
+import org.apache.spark.internal.config.IO_WARNING_LARGEFILETHRESHOLD
import org.apache.spark.sql.{AnalysisException, SparkSession}
-import org.apache.spark.sql.catalyst.expressions.AttributeReference
import org.apache.spark.sql.catalyst.expressions.codegen.GenerateUnsafeProjection
import org.apache.spark.sql.execution.PartitionedFileUtil
import org.apache.spark.sql.execution.datasources._
import org.apache.spark.sql.sources.Filter
import org.apache.spark.sql.sources.v2.reader._
import org.apache.spark.sql.types.StructType
-import org.apache.spark.sql.util.CaseInsensitiveStringMap
import org.apache.spark.util.Utils
abstract class FileScan(
sparkSession: SparkSession,
fileIndex: PartitioningAwareFileIndex,
readDataSchema: StructType,
- readPartitionSchema: StructType) extends Scan with Batch with SupportsReportStatistics {
+ readPartitionSchema: StructType)
+ extends Scan
+ with Batch with SupportsReportStatistics with Logging {
/**
* Returns whether a file with `path` could be split or not.
*/
def isSplitable(path: Path): Boolean = {
false
}
+ /**
+ * If a file with `path` is unsplittable, return the unsplittable reason,
+ * otherwise return `None`.
+ */
+ def getFileUnSplittableReason(path: Path): String = {
Review comment:
@cloud-fan, is it really worth to expose another API in Datasource V2?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org