11package tech .stackable .hadoop ;
22
3+ import org .apache .hadoop .fs .permission .FsAction ;
4+ import org .apache .hadoop .hdfs .server .namenode .INode ;
35import org .apache .hadoop .hdfs .server .namenode .INodeAttributeProvider ;
6+ import org .apache .hadoop .hdfs .server .namenode .INodeAttributes ;
7+ import org .apache .hadoop .ipc .CallerContext ;
48import org .apache .hadoop .security .UserGroupInformation ;
59
610public class OpaAllowQuery {
@@ -11,47 +15,47 @@ public OpaAllowQuery(OpaAllowQueryInput input) {
1115 }
1216
1317 /**
14- * Wrapper around {@link INodeAttributeProvider.AuthorizationContext}, which uses our custom wrapper around
15- * {@link UserGroupInformation}, {@link OpaQueryUgi}.
18+ * Wrapper around {@link INodeAttributeProvider.AuthorizationContext}, which uses our custom
19+ * wrapper around {@link UserGroupInformation}, {@link OpaQueryUgi}.
1620 */
1721 public static class OpaAllowQueryInput {
18- public java . lang . String fsOwner ;
19- public java . lang . String supergroup ;
22+ public String fsOwner ;
23+ public String supergroup ;
2024 // Wrapping this
2125 public OpaQueryUgi callerUgi ;
22- public org . apache . hadoop . hdfs . server . namenode . INodeAttributes [] inodeAttrs ;
23- public org . apache . hadoop . hdfs . server . namenode . INode [] inodes ;
26+ public INodeAttributes [] inodeAttrs ;
27+ public INode [] inodes ;
2428 public byte [][] pathByNameArr ;
2529 public int snapshotId ;
26- public java . lang . String path ;
30+ public String path ;
2731 public int ancestorIndex ;
2832 public boolean doCheckOwner ;
29- public org . apache . hadoop . fs . permission . FsAction ancestorAccess ;
30- public org . apache . hadoop . fs . permission . FsAction parentAccess ;
31- public org . apache . hadoop . fs . permission . FsAction access ;
32- public org . apache . hadoop . fs . permission . FsAction subAccess ;
33+ public FsAction ancestorAccess ;
34+ public FsAction parentAccess ;
35+ public FsAction access ;
36+ public FsAction subAccess ;
3337 public boolean ignoreEmptyDir ;
34- public java . lang . String operationName ;
35- public org . apache . hadoop . ipc . CallerContext callerContext ;
38+ public String operationName ;
39+ public CallerContext callerContext ;
3640
3741 public OpaAllowQueryInput (INodeAttributeProvider .AuthorizationContext context ) {
38- this . fsOwner = context .getFsOwner ();
39- this . supergroup = context .getSupergroup ();
40- this . callerUgi = new OpaQueryUgi (context .getCallerUgi ());
41- this . inodeAttrs = context .getInodeAttrs ();
42- this . inodes = context .getInodes ();
43- this . pathByNameArr = context .getPathByNameArr ();
44- this . snapshotId = context .getSnapshotId ();
45- this . path = context .getPath ();
46- this . ancestorIndex = context .getAncestorIndex ();
47- this . doCheckOwner = context .isDoCheckOwner ();
48- this . ancestorAccess = context .getAncestorAccess ();
49- this . parentAccess = context .getParentAccess ();
50- this . access = context .getAccess ();
51- this . subAccess = context .getSubAccess ();
52- this . ignoreEmptyDir = context .isIgnoreEmptyDir ();
53- this . operationName = context .getOperationName ();
54- this . callerContext = context .getCallerContext ();
42+ fsOwner = context .getFsOwner ();
43+ supergroup = context .getSupergroup ();
44+ callerUgi = new OpaQueryUgi (context .getCallerUgi ());
45+ inodeAttrs = context .getInodeAttrs ();
46+ inodes = context .getInodes ();
47+ pathByNameArr = context .getPathByNameArr ();
48+ snapshotId = context .getSnapshotId ();
49+ path = context .getPath ();
50+ ancestorIndex = context .getAncestorIndex ();
51+ doCheckOwner = context .isDoCheckOwner ();
52+ ancestorAccess = context .getAncestorAccess ();
53+ parentAccess = context .getParentAccess ();
54+ access = context .getAccess ();
55+ subAccess = context .getSubAccess ();
56+ ignoreEmptyDir = context .isIgnoreEmptyDir ();
57+ operationName = context .getOperationName ();
58+ callerContext = context .getCallerContext ();
5559 }
5660 }
5761}
0 commit comments