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 2020/09/23 22:07:20 UTC

[GitHub] [hadoop-ozone] amaliujia opened a new pull request #1444: HDDS-4242. Copy PrefixInfo proto to new project hadoop-ozone/interface-storage

amaliujia opened a new pull request #1444:
URL: https://github.com/apache/hadoop-ozone/pull/1444


   ## What changes were proposed in this pull request?
   
   As a following effort, try to move  `PrefixInfo` and other necessary classes to `interface-stroage`
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-4242
   
   ## How was this patch tested?
   
   Unit Test
   


----------------------------------------------------------------
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] amaliujia commented on pull request #1444: HDDS-4242. Copy PrefixInfo proto to new project hadoop-ozone/interface-storage

Posted by GitBox <gi...@apache.org>.
amaliujia commented on pull request #1444:
URL: https://github.com/apache/hadoop-ozone/pull/1444#issuecomment-702992752


   @elek  friendly ping~ WDYT on the idea in my previous reply?


----------------------------------------------------------------
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] amaliujia commented on pull request #1444: HDDS-4242. Copy PrefixInfo proto to new project hadoop-ozone/interface-storage

Posted by GitBox <gi...@apache.org>.
amaliujia commented on pull request #1444:
URL: https://github.com/apache/hadoop-ozone/pull/1444#issuecomment-697997438


   R @elek 


----------------------------------------------------------------
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] elek commented on pull request #1444: HDDS-4242. Copy PrefixInfo proto to new project hadoop-ozone/interface-storage

Posted by GitBox <gi...@apache.org>.
elek commented on pull request #1444:
URL: https://github.com/apache/hadoop-ozone/pull/1444#issuecomment-703580641


   Sorry, I  was busy at apachecon last week. Sure, fine to do it later. it's just an opinion and fine to follow it in next PRs.
   
   Let me merge it now. 


----------------------------------------------------------------
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] amaliujia commented on a change in pull request #1444: HDDS-4242. Copy PrefixInfo proto to new project hadoop-ozone/interface-storage

Posted by GitBox <gi...@apache.org>.
amaliujia commented on a change in pull request #1444:
URL: https://github.com/apache/hadoop-ozone/pull/1444#discussion_r493976795



##########
File path: hadoop-ozone/interface-storage/src/main/java/org/apache/hadoop/ozone/om/helpers/OzoneAclStorage.java
##########
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.ozone.om.helpers;
+
+import com.google.protobuf.ByteString;
+import java.util.BitSet;
+import org.apache.hadoop.ozone.OzoneAcl;
+import org.apache.hadoop.ozone.OzoneAcl.AclScope;
+import org.apache.hadoop.ozone.security.acl.IAccessAuthorizer.ACLIdentityType;
+import org.apache.hadoop.ozone.storage.proto.OzoneManagerStorageProtos.OzoneAclInfo;
+import org.apache.hadoop.ozone.storage.proto.OzoneManagerStorageProtos.OzoneAclInfo.OzoneAclScope;
+import org.apache.hadoop.ozone.storage.proto.OzoneManagerStorageProtos.OzoneAclInfo.OzoneAclType;
+
+/**
+ * OzoneAclStorage classes define bucket ACLs used in OZONE.
+ * This class is used by storage proto only.
+ *
+ * ACLs in Ozone follow this pattern.
+ * <ul>
+ * <li>user:name:rw
+ * <li>group:name:rw
+ * <li>world::rw
+ * </ul>
+ */
+final class OzoneAclStorage {

Review comment:
       Have to duplicate this class because the original one was used by different places. That's why I make this class `package-private` to make it only useable by codec classes.




----------------------------------------------------------------
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] amaliujia commented on pull request #1444: HDDS-4242. Copy PrefixInfo proto to new project hadoop-ozone/interface-storage

Posted by GitBox <gi...@apache.org>.
amaliujia commented on pull request #1444:
URL: https://github.com/apache/hadoop-ozone/pull/1444#issuecomment-700874303


   @elek your suggestion make senses as the new util classes are dedicated to be used by `interface-storage`. If it is even dedicated to be used by a `codec` class, it can be moved into the `codec` class.
   
   How about let me try to remove util classes in the next PR? 
   
   This PR is to have a working migration for single proto migration to build consensus around naming convention, how to deal with helpers/util classes. As this PR looks good overall, I will move ~3 proto in each future PR to accelerate migrate process while keep each PR be easier to maintain. 
   
   I can address the util class comment in the next PR with more data points there (e.g. 3 more proto migration)


----------------------------------------------------------------
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] amaliujia edited a comment on pull request #1444: HDDS-4242. Copy PrefixInfo proto to new project hadoop-ozone/interface-storage

Posted by GitBox <gi...@apache.org>.
amaliujia edited a comment on pull request #1444:
URL: https://github.com/apache/hadoop-ozone/pull/1444#issuecomment-697997438


   R @elek 
   
   Only migrating `PrefixInfo` because I want to see whether my current approach makes sense (e.g. move some classes to `interface-storage` meanwhile need to copy some classes).
   


----------------------------------------------------------------
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] amaliujia edited a comment on pull request #1444: HDDS-4242. Copy PrefixInfo proto to new project hadoop-ozone/interface-storage

Posted by GitBox <gi...@apache.org>.
amaliujia edited a comment on pull request #1444:
URL: https://github.com/apache/hadoop-ozone/pull/1444#issuecomment-700874303


   @elek your suggestion make senses as the new util classes are dedicated to be used by `interface-storage`. If it is even dedicated to be used by a `codec` class, it can be moved into the `codec` class.
   
   How about let me try to remove util classes in the next PR? 
   
   This PR is to have a working migration for single proto migration to build consensus around naming convention, how to deal with helpers/util classes. As this PR looks good overall, I will move ~3 proto in each future PR to accelerate migrate process while keep each PR be easier to review. 
   
   I can address the util class comment in the next PR with more data points there (e.g. 3 more proto migration)


----------------------------------------------------------------
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] elek merged pull request #1444: HDDS-4242. Copy PrefixInfo proto to new project hadoop-ozone/interface-storage

Posted by GitBox <gi...@apache.org>.
elek merged pull request #1444:
URL: https://github.com/apache/hadoop-ozone/pull/1444


   


----------------------------------------------------------------
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org