Skip to content

Commit 33b807f

Browse files
committed
remove unused helper functions
1 parent 5ca1ebd commit 33b807f

File tree

1 file changed

+2
-27
lines changed
  • hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers

1 file changed

+2
-27
lines changed

hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OzoneAclUtil.java

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
import java.util.ArrayList;
2929
import java.util.BitSet;
30-
import java.util.Collection;
3130
import java.util.List;
3231
import java.util.stream.Collectors;
3332

@@ -158,31 +157,6 @@ public static boolean checkIfAclBitIsSet(IAccessAuthorizer.ACLType acl,
158157
&& !bitset.get(NONE.ordinal()));
159158
}
160159

161-
/**
162-
* Helper function to find and return all DEFAULT acls in input list with
163-
* scope changed to ACCESS.
164-
* @param acls
165-
*
166-
* @return list of default Acls.
167-
* */
168-
public static Collection<OzoneAclInfo> getDefaultAclsProto(
169-
List<OzoneAcl> acls) {
170-
return acls.stream().filter(a -> a.getAclScope() == DEFAULT)
171-
.map(OzoneAcl::toProtobufWithAccessType).collect(Collectors.toList());
172-
}
173-
174-
/**
175-
* Helper function to find and return all DEFAULT acls in input list with
176-
* scope changed to ACCESS.
177-
* @param acls
178-
*
179-
* @return list of default Acls.
180-
* */
181-
public static List<OzoneAcl> getDefaultAcls(List<OzoneAcl> acls) {
182-
return acls.stream().filter(a -> a.getAclScope() == DEFAULT)
183-
.collect(Collectors.toList());
184-
}
185-
186160
/**
187161
* Helper function to inherit default ACL as access ACL for child object.
188162
* 1. deep copy of OzoneAcl to avoid unexpected parent default ACL change
@@ -232,8 +206,8 @@ public static List<OzoneAclInfo> toProtobuf(List<OzoneAcl> protoAcls) {
232206

233207
/**
234208
* Add an OzoneAcl to existing list of OzoneAcls.
235-
* @param acl
236209
* @param existingAcls
210+
* @param acl
237211
* @return true if current OzoneAcls are changed, false otherwise.
238212
*/
239213
public static boolean addAcl(List<OzoneAcl> existingAcls, OzoneAcl acl) {
@@ -261,6 +235,7 @@ public static boolean addAcl(List<OzoneAcl> existingAcls, OzoneAcl acl) {
261235

262236
/**
263237
* remove OzoneAcl from existing list of OzoneAcls.
238+
* @param existingAcls
264239
* @param acl
265240
* @return true if current OzoneAcls are changed, false otherwise.
266241
*/

0 commit comments

Comments
 (0)