Commit a0faf88 Ryan Murray
committed
1 parent fe68e6c commit a0faf88 Copy full SHA for a0faf88
File tree 2 files changed +14
-1
lines changed
src/main/scala/org/apache/spark/sql/delta
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,8 @@ object Checkpoints extends DeltaLogging {
229
229
val checkpointSize = spark.sparkContext.longAccumulator(" checkpointSize" )
230
230
val numOfFiles = spark.sparkContext.longAccumulator(" numOfFiles" )
231
231
// Use the string in the closure as Path is not Serializable.
232
- val path = checkpointFileSingular(snapshot.path, snapshot.version).toString
232
+ val resolvedPath = deltaLog.store.resolveCheckpointPath(snapshot.path)
233
+ val path = checkpointFileSingular(resolvedPath, snapshot.version).toString
233
234
val base = snapshot.state
234
235
.repartition(1 )
235
236
.map { action =>
Original file line number Diff line number Diff line change @@ -83,6 +83,18 @@ trait LogStore {
83
83
throw new UnsupportedOperationException ()
84
84
}
85
85
86
+ /**
87
+ * Let LogStore decide where checkpoints should be stored.
88
+ *
89
+ * Typically the checkpoint storage path would be the same as for Delta storage.
90
+ * This woudl be inside the _delta_log directory. The LogStore impl may wish to control this path
91
+ * and should inform the Checkpoints methods accordingly. This is only required for checkpoints
92
+ * as they are the only metadata file not directly written by LogStore.
93
+ */
94
+ def resolveCheckpointPath (path : Path ): Path = {
95
+ path
96
+ }
97
+
86
98
/**
87
99
* Whether a partial write is visible when writing to `path`.
88
100
*
You can’t perform that action at this time.
0 commit comments