You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Rakesh Radhakrishnan (Jira)" <ji...@apache.org> on 2021/11/04 05:21:00 UTC

[jira] [Updated] (HDDS-5929) Make FSO and OBS bucket layouts independent of normalization config flag

     [ https://issues.apache.org/jira/browse/HDDS-5929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rakesh Radhakrishnan updated HDDS-5929:
---------------------------------------
    Description: 
Presently FILE_SYSTEM_OPTIMIZED("FSO") and OBJECT_STORE("OBS") implementation depends on {{"ozone.om.enable.filesystem.paths"}} flag. This flag should be enabled explicitly for the FSO logic and disabled explicitly for the OBS logic. This task is to remove the dependency with the normalization config flag for the FSO and OBS bucket layouts. 

*case-1)* {{FSO bucket layout}} should normalize the given key path irrespective of the above flag value.

*case-2)* {{OBS bucket layout}} shouldn't normalize the given key path irrespective of the above flag value.

*case-3)* {{LEGACY bucket layout}} should read the configuration flag and perform normalize the given key path based on the above config flag.

 

+*Hint*+
{code:java}
 // normalize key if required.
 String keyName;

 if (getBucketLayout() == BucketLayout.OBJECT_STORE) {
      keyName = keyArgs.getKeyName(); // pure object store semantics.
 } else if (getBucketLayout() == BucketLayout.FILE_SYSTEM_OPTIMIZED) {
      keyName = validateAndNormalizeKey(true, keyArgs.getKeyName()); // pure FS semantics.
 } else {
      // legacy bucket, normalize key based on "ozone.om.enable.filesystem.paths" flag value.
      keyName = validateAndNormalizeKey(
      ozoneManager.getEnableFileSystemPaths(), keyArgs.getKeyName());
 }
 {code}
 

  was:
Presently FILE_SYSTEM_OPTIMIZED("FSO") and OBJECT_STORE("OBS") implementation depends on {{"ozone.om.enable.filesystem.paths"}} flag. This flag should be enabled explicitly for the FSO logic and disabled explicitly for the OBS logic. This task is to remove the dependency with the normalization config flag for the FSO and OBS bucket layouts. 

*case-1)* {{FSO bucket layout}} should normalize the given key path irrespective of the above flag value.

*case-2)* {{OBS bucket layout}} shouldn't normalize the given key path irrespective of the above flag value.

*case-3)* {{LEGACY bucket layout}} should read the configuration flag and perform normalize the given key path based on the above config flag.

+*Hint*+
// Set modification time and normalize key if required.
String keyName;
if (getBucketLayout() == BucketLayout.OBJECT_STORE) \{
  keyName = keyArgs.getKeyName(); // pure object store semantics.
} else if (getBucketLayout() == BucketLayout.FILE_SYSTEM_OPTIMIZED) \{
  keyName = validateAndNormalizeKey(true, keyArgs.getKeyName()); // pure FS semantics.
} else \{
  keyName = validateAndNormalizeKey(
      ozoneManager.getEnableFileSystemPaths(), keyArgs.getKeyName());
}
 

 


> Make FSO and OBS bucket layouts independent of normalization config flag
> ------------------------------------------------------------------------
>
>                 Key: HDDS-5929
>                 URL: https://issues.apache.org/jira/browse/HDDS-5929
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: OM
>            Reporter: Rakesh Radhakrishnan
>            Assignee: Aryan Gupta
>            Priority: Major
>
> Presently FILE_SYSTEM_OPTIMIZED("FSO") and OBJECT_STORE("OBS") implementation depends on {{"ozone.om.enable.filesystem.paths"}} flag. This flag should be enabled explicitly for the FSO logic and disabled explicitly for the OBS logic. This task is to remove the dependency with the normalization config flag for the FSO and OBS bucket layouts. 
> *case-1)* {{FSO bucket layout}} should normalize the given key path irrespective of the above flag value.
> *case-2)* {{OBS bucket layout}} shouldn't normalize the given key path irrespective of the above flag value.
> *case-3)* {{LEGACY bucket layout}} should read the configuration flag and perform normalize the given key path based on the above config flag.
>  
> +*Hint*+
> {code:java}
>  // normalize key if required.
>  String keyName;
>  if (getBucketLayout() == BucketLayout.OBJECT_STORE) {
>       keyName = keyArgs.getKeyName(); // pure object store semantics.
>  } else if (getBucketLayout() == BucketLayout.FILE_SYSTEM_OPTIMIZED) {
>       keyName = validateAndNormalizeKey(true, keyArgs.getKeyName()); // pure FS semantics.
>  } else {
>       // legacy bucket, normalize key based on "ozone.om.enable.filesystem.paths" flag value.
>       keyName = validateAndNormalizeKey(
>       ozoneManager.getEnableFileSystemPaths(), keyArgs.getKeyName());
>  }
>  {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org