Skip to content

Disable file system caching when size is set to zero#16500

Closed
alexjo2144 wants to merge 1 commit intotrinodb:masterfrom
alexjo2144:hdfs/allow-disabling-caching
Closed

Disable file system caching when size is set to zero#16500
alexjo2144 wants to merge 1 commit intotrinodb:masterfrom
alexjo2144:hdfs/allow-disabling-caching

Conversation

@alexjo2144
Copy link
Copy Markdown
Member

Description

If the hive.fs.cache.max-size property is set to zero the first time a FileSystem is loaded an exception is thrown
"FileSystem max cache size has been reached"

Extracted from: #16455

I don't expect this to be useful for production but I found it useful for testing the fix in the PR above. The FileSystem cache prevented the tests from hitting the improperly configured FileSystem consistently.

Release notes

(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

@cla-bot cla-bot bot added the cla-signed label Mar 10, 2023
@alexjo2144 alexjo2144 requested review from ebyhr, findepi and phd3 March 10, 2023 17:15
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is new HdfsConfigurationProvider(new HdfsConfig()) no-op?
what does it do?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a no-op. I included it in the tests here to show that it is a no-op.

@github-actions github-actions bot added hive Hive connector tests:hive labels Mar 10, 2023
@alexjo2144 alexjo2144 force-pushed the hdfs/allow-disabling-caching branch from efe3d44 to 264ff2e Compare March 10, 2023 21:58
If the `hive.fs.cache.max-size` property is set to zero the first time a
FileSystem is loaded an exception is thrown
"FileSystem max cache size has been reached"
@alexjo2144 alexjo2144 force-pushed the hdfs/allow-disabling-caching branch from 264ff2e to 42ce3c8 Compare March 14, 2023 16:47
@alexjo2144
Copy link
Copy Markdown
Member Author

Addressed @ebyhr 's comments, thanks for the reviews

Copy link
Copy Markdown
Member

@electrum electrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the assumption that all file system interaction goes through our FileSystemCache interface. I'd have to carefully consider the implications of this. Certainly, it's not tested, nor is it something we would want an end user to set.

Since we don't need this for real usage, don't even need it for testing (given the direction of the Iceberg PR), and are looking to minimize the scope of Hadoop usage, let's not merge this.

@electrum
Copy link
Copy Markdown
Member

We could enforce @Min(1) on that config property.

@alexjo2144 alexjo2144 closed this Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed hive Hive connector

Development

Successfully merging this pull request may close these issues.

4 participants