Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/12435#discussion_r60162486
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSinkLog.scala
---
@@ -112,28 +118,13 @@ class FileStreamSinkLog(sqlContext: SQLContext, path:
String)
}
/**
- * Compacts all logs before `batchId` plus the provided `logs`, and
writes them into the
- * corresponding `batchId` file.
- */
- private def compact(batchId: Long, logs: Seq[FileLog]): Boolean = {
- val validBatches = getValidBatchesBeforeCompactionBatch(batchId,
compactLength)
- val allLogs = validBatches.flatMap(batchId => get(batchId)).flatten ++
logs
- if (super.add(batchId, compactLogs(allLogs))) {
- if (isDeletingExpiredLog) {
- deleteExpiredLog(batchId)
- }
- true
- } else {
- // Return false as there is another writer.
- false
- }
- }
-
- /**
- * Returns all file logs except the deleted files.
+ * Returns all files except the deleted ones.
*/
- def allLogs(): Array[FileLog] = {
+ def allFiles(): Array[SinkFileStatus] = {
--- End diff --
Can you make this allSinkFile() so that its not ambiguous with the log
files?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]