Skip to content

Commit edc7fff

Browse files
committed
Merge pull request #73 from childsb/acl_cleanup
remove acl code not needed for 2.x
2 parents 7b04317 + a5cdb8a commit edc7fff

File tree

2 files changed

+4
-86
lines changed

2 files changed

+4
-86
lines changed

src/main/java/org/apache/hadoop/fs/glusterfs/AclPathFilter.java

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/main/java/org/apache/hadoop/fs/glusterfs/GlusterVolume.java

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ public class GlusterVolume extends RawLocalFileSystem{
5252
public static final URI NAME = URI.create("glusterfs:///");
5353

5454
protected String root=null;
55-
protected String superUser=null;
56-
protected AclPathFilter aclFilter = null;
55+
56+
5757

5858
protected static GlusterFSXattr attr = null;
5959

@@ -93,12 +93,7 @@ public void setConf(Configuration conf){
9393
if(!exists(mapredSysDirectory)){
9494
mkdirs(mapredSysDirectory);
9595
}
96-
//ACL setup
97-
aclFilter = new AclPathFilter(conf);
98-
superUser = conf.get("gluster.daemon.user", null);
99-
log.info("mapreduce/superuser daemon : " + superUser);
100-
101-
//Working directory setup
96+
//Working directory setup
10297
Path workingDirectory = getInitialWorkingDirectory();
10398
mkdirs(workingDirectory);
10499
setWorkingDirectory(workingDirectory);
@@ -228,36 +223,18 @@ public long getBlockSize(Path path) throws IOException{
228223

229224
return blkSz;
230225
}
231-
/*
232-
* ensures the 'super user' is given read/write access.
233-
* the ACL drops off after a chmod or chown.
234-
*/
235-
236-
private void updateAcl(Path p){
237-
if(superUser!=null && aclFilter.matches(p) ){
238-
File f = pathToFile(p);
239-
String path = f.getAbsolutePath();
240-
String command = "setfacl -m u:" + superUser + ":rwx " + path;
241-
try{
242-
Runtime.getRuntime().exec(command);
243-
}catch(IOException ex){
244-
throw new RuntimeException(ex);
245-
}
246-
}
247-
}
248226

249227
public void setOwner(Path p, String username, String groupname)
250228
throws IOException {
251229
super.setOwner(p,username,groupname);
252-
updateAcl(p);
253230

254231
}
255232

256233
public void setPermission(Path p, FsPermission permission)
257234
throws IOException {
258235
super.setPermission(p,permission);
259-
updateAcl(p);
260236
}
237+
261238
public BlockLocation[] getFileBlockLocations(FileStatus file,long start,long len) throws IOException{
262239
File f=pathToFile(file.getPath());
263240
BlockLocation[] result=null;

0 commit comments

Comments
 (0)