You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/01/25 16:58:02 UTC
[GitHub] [ozone] rakeshadr commented on a change in pull request #1841: HDDS-4486. Feature Config : Make proper enableFSPaths and OFS optimized flag combinations
rakeshadr commented on a change in pull request #1841:
URL: https://github.com/apache/ozone/pull/1841#discussion_r563881907
##########
File path: hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneClientAdapterImpl.java
##########
@@ -545,7 +545,17 @@ private FileStatusAdapter toFileStatusAdapter(OzoneFileStatus status,
}
@Override
- public String getBucketLayoutVersion() {
- return bucket.getMetadata().get(OMConfigKeys.OZONE_OM_LAYOUT_VERSION);
+ public boolean isFSOptimizedBucket() {
+ boolean layoutVersionEnabled =
+ StringUtils.equalsIgnoreCase(
Review comment:
Thanks a lot @mukul1987 for the review comments. I have updated this in my latest commit.
I'm planning one more follow-up jira task to modify config "`ozone.om.layout.version`" name to something more readable which reflects feature name correctly :-)
##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/utils/OzoneManagerRatisUtils.java
##########
@@ -140,41 +141,41 @@ public static OMClientRequest createClientRequest(OMRequest omRequest) {
case SetBucketProperty:
return new OMBucketSetPropertyRequest(omRequest);
case AllocateBlock:
- if (omLayoutVersionV1) {
+ if (isFsOptimizedEnabled()) {
return new OMAllocateBlockRequestV1(omRequest);
}
return new OMAllocateBlockRequest(omRequest);
case CreateKey:
- if (omLayoutVersionV1) {
+ if (isFsOptimizedEnabled()) {
return new OMKeyCreateRequestV1(omRequest);
}
return new OMKeyCreateRequest(omRequest);
case CommitKey:
- if (omLayoutVersionV1) {
+ if (isFsOptimizedEnabled()) {
return new OMKeyCommitRequestV1(omRequest);
}
return new OMKeyCommitRequest(omRequest);
case DeleteKey:
- if (omLayoutVersionV1) {
+ if (isFsOptimizedEnabled()) {
return new OMKeyDeleteRequestV1(omRequest);
}
return new OMKeyDeleteRequest(omRequest);
case DeleteKeys:
return new OMKeysDeleteRequest(omRequest);
case RenameKey:
- if (omLayoutVersionV1) {
+ if (isFsOptimizedEnabled()) {
return new OMKeyRenameRequestV1(omRequest);
}
return new OMKeyRenameRequest(omRequest);
case RenameKeys:
return new OMKeysRenameRequest(omRequest);
case CreateDirectory:
- if (omLayoutVersionV1) {
+ if (isFsOptimizedEnabled()) {
return new OMDirectoryCreateRequestV1(omRequest);
}
return new OMDirectoryCreateRequest(omRequest);
case CreateFile:
- if (omLayoutVersionV1) {
+ if (isFsOptimizedEnabled()) {
Review comment:
Done
##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -3680,14 +3682,18 @@ public boolean getEnableFileSystemPaths() {
OZONE_OM_ENABLE_FILESYSTEM_PATHS_DEFAULT);
}
- private void getOMLayoutVersion() {
+ public String getOMLayoutVersion() {
String version = configuration.getTrimmed(OZONE_OM_LAYOUT_VERSION,
OZONE_OM_LAYOUT_VERSION_DEFAULT);
- boolean omLayoutVersionV1 =
- StringUtils.equalsIgnoreCase(version, "V1");
- OzoneManagerRatisUtils.setOmLayoutVersionV1(omLayoutVersionV1);
+ boolean omLayoutVersionV1 = StringUtils.equalsIgnoreCase(version,
+ OZONE_OM_LAYOUT_VERSION_V1);
LOG.info("Configured {}={} and enabled:{} optimized OM FS operations",
OZONE_OM_LAYOUT_VERSION, version, omLayoutVersionV1);
+
+ boolean enabledFSO = omLayoutVersionV1 && getEnableFileSystemPaths();
Review comment:
Done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org