This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 55bd1f14b89 HDDS-13851. Remove extra OzoneConfiguration#of from
OzoneFileSystem#initialize (#9231)
55bd1f14b89 is described below
commit 55bd1f14b89ee0af69af8558f4249199fd0f940f
Author: Ivan Andika <[email protected]>
AuthorDate: Mon Nov 3 15:43:30 2025 +0800
HDDS-13851. Remove extra OzoneConfiguration#of from
OzoneFileSystem#initialize (#9231)
---
.../org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java | 14 +++++++-------
.../apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java | 14 +++++++-------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git
a/hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java
b/hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java
index 67a252e6956..53c87cfe611 100644
---
a/hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java
+++
b/hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java
@@ -139,13 +139,6 @@ public void initialize(URI name, Configuration conf)
throws IOException {
listingPageSize = OzoneClientUtils.limitValue(listingPageSize,
OZONE_FS_LISTING_PAGE_SIZE,
OZONE_FS_MAX_LISTING_PAGE_SIZE);
- isRatisStreamingEnabled = conf.getBoolean(
- OzoneConfigKeys.OZONE_FS_DATASTREAM_ENABLED,
- OzoneConfigKeys.OZONE_FS_DATASTREAM_ENABLED_DEFAULT);
- streamingAutoThreshold = (int) OzoneConfiguration.of(conf).getStorageSize(
- OzoneConfigKeys.OZONE_FS_DATASTREAM_AUTO_THRESHOLD,
- OzoneConfigKeys.OZONE_FS_DATASTREAM_AUTO_THRESHOLD_DEFAULT,
- StorageUnit.BYTES);
setConf(conf);
Preconditions.checkNotNull(name.getScheme(),
"No scheme provided in %s", name);
@@ -193,6 +186,13 @@ public void initialize(URI name, Configuration conf)
throws IOException {
LOG.trace("Ozone URI for ozfs initialization is {}", uri);
ConfigurationSource source = getConfSource();
+ isRatisStreamingEnabled = source.getBoolean(
+ OzoneConfigKeys.OZONE_FS_DATASTREAM_ENABLED,
+ OzoneConfigKeys.OZONE_FS_DATASTREAM_ENABLED_DEFAULT);
+ streamingAutoThreshold = (int) source.getStorageSize(
+ OzoneConfigKeys.OZONE_FS_DATASTREAM_AUTO_THRESHOLD,
+ OzoneConfigKeys.OZONE_FS_DATASTREAM_AUTO_THRESHOLD_DEFAULT,
+ StorageUnit.BYTES);
this.hsyncEnabled = OzoneFSUtils.canEnableHsync(source, true);
LOG.debug("hsyncEnabled = {}", hsyncEnabled);
this.adapter =
diff --git
a/hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java
b/hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java
index ca717f7a876..04d2af5868a 100644
---
a/hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java
+++
b/hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java
@@ -145,13 +145,6 @@ public void initialize(URI name, Configuration conf)
throws IOException {
listingPageSize = OzoneClientUtils.limitValue(listingPageSize,
OZONE_FS_LISTING_PAGE_SIZE,
OZONE_FS_MAX_LISTING_PAGE_SIZE);
- isRatisStreamingEnabled = conf.getBoolean(
- OzoneConfigKeys.OZONE_FS_DATASTREAM_ENABLED,
- OzoneConfigKeys.OZONE_FS_DATASTREAM_ENABLED_DEFAULT);
- streamingAutoThreshold = (int) OzoneConfiguration.of(conf).getStorageSize(
- OzoneConfigKeys.OZONE_FS_DATASTREAM_AUTO_THRESHOLD,
- OzoneConfigKeys.OZONE_FS_DATASTREAM_AUTO_THRESHOLD_DEFAULT,
- StorageUnit.BYTES);
setConf(conf);
Preconditions.checkNotNull(name.getScheme(),
"No scheme provided in %s", name);
@@ -207,6 +200,13 @@ public void initialize(URI name, Configuration conf)
throws IOException {
throw new IOException(msg, ue);
}
ozoneConfiguration = OzoneConfiguration.of(getConfSource());
+ isRatisStreamingEnabled = ozoneConfiguration.getBoolean(
+ OzoneConfigKeys.OZONE_FS_DATASTREAM_ENABLED,
+ OzoneConfigKeys.OZONE_FS_DATASTREAM_ENABLED_DEFAULT);
+ streamingAutoThreshold = (int) ozoneConfiguration.getStorageSize(
+ OzoneConfigKeys.OZONE_FS_DATASTREAM_AUTO_THRESHOLD,
+ OzoneConfigKeys.OZONE_FS_DATASTREAM_AUTO_THRESHOLD_DEFAULT,
+ StorageUnit.BYTES);
}
protected OzoneClientAdapter createAdapter(ConfigurationSource conf,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]