Uh oh!
There was an error while loading. Please reload this page.
[SPARK-28784][SS] Use CheckpointFileManager in StreamExecution/StreamingQueryManager for checkpoint dirs - #25514
[SPARK-28784][SS] Use CheckpointFileManager in StreamExecution/StreamingQueryManager for checkpoint dirs#25514shrutig wants to merge 4 commits into
Conversation
shrutig
commented
Aug 20, 2019
@tdas Could you please take a look at this PR ? |
SparkQA
commented
Aug 20, 2019
Test build #109428 has finished for PR 25514 at commit
|
dongjoon-hyun
commented
Aug 21, 2019
Thank you for your first contribution, @shrutig . |
dongjoon-hyun
commented
Aug 21, 2019
Retest this please. |
shrutig
commented
Aug 21, 2019
Updated DataStreamReaderWriterSuite tests which were relying on resolvedCheckpointRoot variable in StreamExecution to use the checkpointFileManager method. |
SparkQA
commented
Aug 21, 2019
Test build #109519 has finished for PR 25514 at commit
|
SparkQA
commented
Aug 22, 2019
Test build #109528 has finished for PR 25514 at commit
|
IMO, it's not worth to switch to CheckpointFileManager considering we just found some issues in FileContext's checksum. See https://issues.apache.org/jira/browse/SPARK-28025. I'm inclined to use mature FileSystem APIs for now. |
… tests to reflect changes make for CheckpointFileManager usages
shrutig
commented
Aug 26, 2019
@dongjoon-hyun I was able to replicate the failing test in my local and I have submitted my changes to test files to fix that. |
shrutig
commented
Aug 27, 2019
@zsxwing CheckpointFileManager is already being used to handle checkpoint files in multiple places, such as HDFSMetadataLog, HDFSBackedStateStoreProvider and others as part of PR #21048 . As far as the issue in https://issues.apache.org/jira/browse/SPARK-28025 is concerned, in my opinion that should not hinder this PR. That issue has been approved and merged as part of a PR - #25565 . Also, it was caused due to a bug in a specific implementation of CheckpointFileManager (FileContextBasedCheckpointFileManager). |
SparkQA
commented
Aug 27, 2019
Test build #109753 has finished for PR 25514 at commit
|
dongjoon-hyun
commented
Aug 30, 2019
Retest this please. |
dongjoon-hyun
commented
Aug 30, 2019
Hi, @zsxwing . |
zsxwing
commented
Aug 30, 2019
IMO, I don't feel comfortable to move to a known broken API when the existing codes work. |
dongjoon-hyun
commented
Aug 30, 2019
holdenk
commented
Aug 30, 2019
SparkQA
commented
Aug 30, 2019
Test build #109960 has finished for PR 25514 at commit
|
gaborgsomogyi
commented
Sep 2, 2019
The issue not yet fixed, it may happen in https://issues.apache.org/jira/browse/HADOOP-16255. |
shrutig
commented
Sep 5, 2019
I want to clear up some concerns which were mentioned here:
cc @tdas |
holdenk
commented
Sep 14, 2019
It also looks like the default implementation issue has been fixed in https://issues.apache.org/jira/browse/HADOOP-16255 Since the |
holdenk
commented
Sep 19, 2019
Jenkins ok to test. |
holdenk
commented
Sep 19, 2019
@dongjoon-hyun it looks like you aren't asking for any specific change anymore, is that correct? |
| .stripMargin) | ||
| } | ||
| } | ||
| val checkpointDir = checkpointPath.makeQualified(fs.getUri, fs.getWorkingDirectory) |
There was a problem hiding this comment.
makeQualified disappeared from here, right?
There was a problem hiding this comment.
I think so. We're using the checkpointFileManager for this behavior now in the PR so we are not directly making FS operations. Looking inside of the default FileSystem impl we don't explicitly translate this to a fully-qualified path, do you think that would be an issue?
There was a problem hiding this comment.
Since this ends-up in behavior change it may break existing queries. I think there must be a reason when we do such change.
| val df = inputData.toDS().map(_ + "foo").groupBy("value").agg(count("*")) | ||
| // Test StreamingQuery.display | ||
| val dir1 = Utils.createTempDir().getCanonicalFile | ||
| val q = df.writeStream.queryName("memory_explain").outputMode("complete").format("memory") |
There was a problem hiding this comment.
Why do we need this (and similar changes)? The original test is running fine with temp checkpoint.
SparkQA
commented
Sep 19, 2019
Test build #111021 has finished for PR 25514 at commit
|
| new Path(new Path(checkpointPath.toUri.toString).toUri.toString).toUri.toString | ||
| val legacyCheckpointDirExists = | ||
| try { | ||
| fs.exists(new Path(legacyCheckpointDir)) |
There was a problem hiding this comment.
Here would it make sense to keep the fs check as well since we want to catch the previously created check point directories and suggest folks migrate?
| .stripMargin) | ||
| } | ||
| } | ||
| val checkpointDir = checkpointPath.makeQualified(fs.getUri, fs.getWorkingDirectory) |
There was a problem hiding this comment.
I think so. We're using the checkpointFileManager for this behavior now in the PR so we are not directly making FS operations. Looking inside of the default FileSystem impl we don't explicitly translate this to a fully-qualified path, do you think that would be an issue?
dongjoon-hyun
commented
Dec 5, 2019
Retest this please. |
SparkQA
commented
Dec 5, 2019
Test build #114916 has finished for PR 25514 at commit
|
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
What changes were proposed in this pull request?
After
SPARK-23966 Refactoring all checkpoint file writing logic in a common CheckpointFileManager interface, the CheckpointFileManager interface was created to handle all structured streaming checkpointing operations and helps users to choose how they wish to write checkpointing files atomically.StreamExecution and StreamingQueryManager still uses some FileSystem operations without using the CheckpointFileManager.
For instance,
Instead, StreamExecution and StreamingQueryManager should use CheckpointFileManager for these operations.
Why are the changes needed?
This change will allow users to use CheckpointFileManager for structured streaming checkpointing files without need for a separate FileSystem implementation for the same.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Existing tests