New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-24626] [SQL] Improve location size calculation in Analyze Table command #21608
Closed
Closed
Changes from 5 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
7007901
Init changes
arajagopal17 82d5ef3
Removing logs.
arajagopal17 9f2fed0
testing new approach
arajagopal17 3358bbe
Refactoring.
arajagopal17 1e1db66
Using bulkListLeafFiles.
arajagopal17 00014c0
Iter changes
arajagopal17 429a793
working iteration
Achuth17 9d3054a
remove unnecessary filter.
Achuth17 9acab38
nit fixes
Achuth17 efa5fbd
nit fixes
Achuth17 f9b382d
nit fixes
Achuth17 06a275b
nit fix
Achuth17 49b878b
Rename and using case class.
Achuth17 c3421ed
Fixing incorrect table size issue.
Achuth17 9a306a5
making bulkListLeafFiles private[sql]
Achuth17 bd7a8fe
nit
Achuth17 deb29de
Moving pathfilter to anonymous class
Achuth17 98ee81b
Added a simple test to verify the accuracy of table size calculation
Achuth17 107f4c6
Fixing test to verify parallelism.
Achuth17 27b68d3
Using isDataPath for metadatafile filter.
Achuth17 5b46593
Merge branch 'master' into improveAnalyze
Achuth17 4c405c5
Moving isDataPath to DataSourceUtils.scala
Achuth17 da5eaba
Nit fixes.
Achuth17 99a4a0f
Fix test name.
Achuth17 e03e2ee
Gating changes behind a flag, Making changes to migration doc.
Achuth17 31afcfb
Merging master.
Achuth17 15ff68d
merge fixes.
Achuth17 7a2aff4
Setting feature enabled by default.
Achuth17 e727b69
Small doc fix.
Achuth17 ae64b9d
Doc changes and fixing flag name.
Achuth17 2e582f6
Addressing review comments.
Achuth17 1803f26
Merge branch 'master' into improveAnalyze
Achuth17 253af70
Fixing merge conflicts.
Achuth17 70eddc8
Revert PartitionAwareFileIndex changes and add a generic method to Da…
Achuth17 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,7 +162,7 @@ object InMemoryFileIndex extends Logging { | |
* | ||
* @return for each input path, the set of discovered files for the path | ||
*/ | ||
private def bulkListLeafFiles( | ||
def bulkListLeafFiles( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the unnecessary indent. Also, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
paths: Seq[Path], | ||
hadoopConf: Configuration, | ||
filter: PathFilter, | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests are passing but this line is incorrect.
@gatorsmile @maropu, PathFilter is not serializable, How do we pass PathFilter in a serializable manner? I checked the code and one other way is to use
FileInputFormat.getInputPathFilter
/FileInputFormat.setInputPathFilter
but I couldn't get it to work.Also, is it okay if we filter the
Seq[(Path, Seq[FileStatus])]
returned bybulkListLeafFiles
and removestagingDir
files?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above approach might not work too. In the earlier implementation there was a check from recursively listing files from certain directories (
stagingDir
) and having a pathFilter might not be the right approach.So I wanted to introduce a list of strings called
filterDir
as a new parameter tobulkListLeafFiles
which can be used to check if a particular directory can be recursed further. Let me know if this approach looks okay.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I have made the changes. Can you review this?
Also, the
bulkListLeafFiles
approach seems to improve the performance compared to my earlier implementation and I have updated the results.