Skip to content

Commit 553cd3a

Browse files
Adding indirect write GCS cleanup logs (#1335)
1 parent 1f8ec6d commit 553cd3a

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Release Notes
22

33
## Next
4+
* PR #1335: Adding indirect write GCS cleanup logs
45

56
## 0.41.1 - 2024-12-20
67
* Issue #1290: Stopped using metadata for optimized count path

spark-bigquery-connector-common/src/main/java/com/google/cloud/spark/bigquery/write/BigQueryWriteHelper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ static Field updatedField(Field field, StructField sparkSchemaField) {
256256

257257
void cleanTemporaryGcsPathIfNeeded() {
258258
// TODO(davidrab): add flag to disable the deletion?
259+
logger.info("Cleaning temporary GCS path");
259260
createTemporaryPathDeleter.ifPresent(IntermediateDataCleaner::deletePath);
260261
}
261262

spark-bigquery-connector-common/src/main/java/com/google/cloud/spark/bigquery/write/IntermediateDataCleaner.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ public void run() {
4545

4646
public void deletePath() {
4747
try {
48+
logger.info("Deleting path " + path + " if it exists");
4849
FileSystem fs = path.getFileSystem(conf);
4950
if (pathExists(fs, path)) {
5051
fs.delete(path, true);
5152
}
53+
logger.info("Path " + path + " no longer exists)");
5254
} catch (Exception e) {
5355
logger.error("Failed to delete path " + path, e);
5456
}

0 commit comments

Comments
 (0)