Skip to content

Commit 6d4b387

Browse files
committed
Merge pull request #30 from gluster/KEEPME_BZ_927415
quick.slave.io feature removal
2 parents 245b4f3 + 3e3102d commit 6d4b387

File tree

4 files changed

+1
-30
lines changed

4 files changed

+1
-30
lines changed

README

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,6 @@ CONFIGURATION
123123
To mount a volume the plugin needs to know the hostname or the IP of a GlusterFS server in the cluster.
124124
Mention it here.
125125

126-
name: quick.slave.io
127-
value: [On/Off], [Yes/No], [1/0]
128-
129-
NOTE: This option is not tested as of now.
130-
131-
This is a performance tunable option. Hadoop schedules jobs to hosts that contain the file data part. The job
132-
then does I/O on the file (via FUSE in case of GlusterFS). When this option is set, the plugin will try to
133-
do I/O directly from the backed filesystem (ext3, ext4 etc..) the file resides on. Hence read performance
134-
will improve and job would run faster.
135-
136-
137126
USAGE
138127
-----
139128

@@ -152,7 +141,7 @@ FOR HACKERS
152141

153142
org.apache.hadoop.fs.glusters/GlusterFSBrickClass.java
154143
org.apache.hadoop.fs.glusters/GlusterFSXattr.java <--- Fetch/Parse Extended Attributes of a file
155-
org.apache.hadoop.fs.glusters/GlusterFUSEInputStream.java <--- Input Stream (instantiated during open() calls; quick read from backed FS)
144+
org.apache.hadoop.fs.glusters/GlusterFUSEInputStream.java <--- Input Stream (instantiated during open() calls;
156145
org.apache.hadoop.fs.glusters/GlusterFSBrickRepl.java
157146
org.apache.hadoop.fs.glusters/GlusterFUSEOutputStream.java <--- Output Stream (instantiated during creat() calls)
158147
org.apache.hadoop.fs.glusters/GlusterFileSystem.java <--- Entry Point for the plugin (extends Hadoop FileSystem class)

conf/core-site.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030
<value>RHS-1</value>
3131
</property>
3232

33-
<property>
34-
<name>quick.slave.io</name>
35-
<value>Off</value>
36-
</property>
37-
3833
<property>
3934
<name>fs.glusterfs.write.buffer.size</name>
4035
<value>1024</value>

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ public class GlusterFileSystem extends FileSystem{
6868
private int writeBufferSize = 0;
6969

7070

71-
/* for quick IO */
72-
private boolean quickSlaveIO=false;
73-
7471
/* extended attribute class */
7572
private GlusterFSXattr xattr=null;
7673

@@ -110,7 +107,6 @@ public void initialize(URI uri,Configuration conf) throws IOException{
110107
boolean ret=false;
111108
String volName=null;
112109
String remoteGFSServer=null;
113-
String needQuickRead=null;
114110
boolean autoMount=true;
115111

116112

@@ -123,7 +119,6 @@ public void initialize(URI uri,Configuration conf) throws IOException{
123119
volName=conf.get("fs.glusterfs.volname", null);
124120
glusterMount=conf.get("fs.glusterfs.mount", null);
125121
remoteGFSServer=conf.get("fs.glusterfs.server", null);
126-
needQuickRead=conf.get("quick.slave.io", null);
127122
autoMount=conf.getBoolean("fs.glusterfs.automount", true);
128123
writeBufferSize = conf.getInt("fs.glusterfs.write.buffer.size", 0);
129124
LOG.info("Gluster Output Buffering size configured to " + writeBufferSize + " bytes.");
@@ -139,8 +134,6 @@ public void initialize(URI uri,Configuration conf) throws IOException{
139134
throw new RuntimeException("Initialize: Failed to mount GlusterFS ");
140135
}
141136
}
142-
if((needQuickRead.length()!=0)&&(needQuickRead.equalsIgnoreCase("yes")||needQuickRead.equalsIgnoreCase("on")||needQuickRead.equals("1")))
143-
this.quickSlaveIO=true;
144137

145138
this.mounted=true;
146139
this.glusterFs=FileSystem.getLocal(conf);
@@ -446,8 +439,6 @@ public FSDataOutputStream create(Path path,FsPermission permission,boolean overw
446439
* open the file in read mode (internally the file descriptor is an instance
447440
* of InputStream class).
448441
*
449-
* if quick read mode is set then read the file by by-passing FUSE if we are
450-
* on same slave where the file exist
451442
*/
452443
public FSDataInputStream open(Path path) throws IOException{
453444
Path absolute=makeAbsolute(path);
@@ -458,9 +449,6 @@ public FSDataInputStream open(Path path) throws IOException{
458449
if(!f.exists())
459450
throw new IOException("File "+f.getPath()+" does not exist.");
460451

461-
if(quickSlaveIO)
462-
hnts=xattr.quickIOPossible(f.getPath(), 0, f.length());
463-
464452
glusterFileStream=new FSDataInputStream(new GlusterFUSEInputStream(f, hnts, hostname));
465453
return glusterFileStream;
466454
}

src/test/java/org/gluster/test/TestGluster.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ public static void before() throws Exception{
130130
conf.set("fs.glusterfs.mount", mount.getAbsolutePath());
131131
conf.set("fs.glusterfs.server", glusterHost);
132132
conf.set("fs.default.name", "glusterfs://"+glusterHost+":9000");
133-
conf.set("quick.slave.io", "true");
134133
System.out.println("server "+conf.get("fs.glusterfs.server"));
135134
gfs.initialize(temp.toURI(), conf);
136135
}

0 commit comments

Comments
 (0)