Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 0 additions & 104 deletions src/main/java/org/apache/hadoop/fs/glusterfs/GlusterFSBrickClass.java

This file was deleted.

This file was deleted.

18 changes: 6 additions & 12 deletions src/main/java/org/apache/hadoop/fs/glusterfs/GlusterVolume.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URI;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.BlockLocation;
import org.apache.hadoop.fs.FileAlreadyExistsException;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileUtil;
import org.apache.hadoop.fs.Path;
Expand Down Expand Up @@ -111,9 +109,7 @@ public boolean sameVolume(Path p){
}

public void setConf(Configuration conf){
log.info("Initializing gluster volume..");
super.setConf(conf);

if(conf!=null){

try{
Expand All @@ -136,7 +132,7 @@ public void setConf(Configuration conf){
+ ", No mount point available for the volume.");
}
volumes.put(v[i],vol);
log.info("Gluster volume: " + v[i] + " at : " + volumes.get(v[i]));
log.info("Volume: " + v[i] + " at : " + volumes.get(v[i]));
}

String jtSysDir = conf.get("mapreduce.jobtracker.system.dir", null);
Expand All @@ -149,7 +145,6 @@ public void setConf(Configuration conf){
}

if(sameVolume(mapredSysDirectory) && !exists(mapredSysDirectory) ){
// mkdirs(mapredSysDirectory);
log.warn("mapred.system.dir/mapreduce.jobtracker.system.dir does not exist: " + mapredSysDirectory);
}
//Working directory setup
Expand All @@ -158,14 +153,13 @@ public void setConf(Configuration conf){
if(!sameVolume(workingDirectory)){
workingDirectory = new Path("/");
}else if( !exists(workingDirectory)){
// mkdirs(workingDirectory);
log.warn("working directory does not exist: " + workingDirectory);
}

setWorkingDirectory(workingDirectory);


log.info("Working directory is : "+ getWorkingDirectory());
log.info("Working directory: "+ getWorkingDirectory());

/**
* Write Buffering
Expand Down Expand Up @@ -198,11 +192,11 @@ public void setConf(Configuration conf){
*/

tsPrecisionChop=conf.getInt("fs.glusterfs.timestamp.trim", 0);
log.info("File timestamp lease significant digits removed : " + tsPrecisionChop) ;
if(tsPrecisionChop!=0) log.info("Timestamp digit precision : " + tsPrecisionChop) ;

}
catch (Exception e){
throw new RuntimeException(e);
throw new RuntimeException("Error Initializing gluster volume:" + e);
}
}
}
Expand Down Expand Up @@ -404,14 +398,14 @@ public BlockLocation[] getFileBlockLocations(FileStatus file,long start,long len
File f=pathToFile(file.getPath());
BlockLocation[] result = new GlusterFSXattr(f.getPath()).getPathInfo(start, len);
if(result==null){
log.info("GLUSTERFS: Problem getting host/block location for file "+f.getPath());
log.info("Problem getting host/block location for file "+f.getPath());
}

return result;
}

public String toString(){
return "Gluster volume: " + this.NAME;
return "Volume: " + this.NAME;
}

}