Skip to content

Commit 3e3102d

Browse files
committed
quick.slave.io feature removal
1 parent b3e898c commit 3e3102d

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.");
@@ -144,8 +139,6 @@ public void initialize(URI uri,Configuration conf) throws IOException{
144139
throw new RuntimeException("Initialize: Failed to mount GlusterFS ");
145140
}
146141
}
147-
if((needQuickRead.length()!=0)&&(needQuickRead.equalsIgnoreCase("yes")||needQuickRead.equalsIgnoreCase("on")||needQuickRead.equals("1")))
148-
this.quickSlaveIO=true;
149142

150143
this.mounted=true;
151144
this.glusterFs=FileSystem.getLocal(conf);
@@ -451,8 +444,6 @@ public FSDataOutputStream create(Path path,FsPermission permission,boolean overw
451444
* open the file in read mode (internally the file descriptor is an instance
452445
* of InputStream class).
453446
*
454-
* if quick read mode is set then read the file by by-passing FUSE if we are
455-
* on same slave where the file exist
456447
*/
457448
public FSDataInputStream open(Path path) throws IOException{
458449
Path absolute=makeAbsolute(path);
@@ -463,9 +454,6 @@ public FSDataInputStream open(Path path) throws IOException{
463454
if(!f.exists())
464455
throw new IOException("File "+f.getPath()+" does not exist.");
465456

466-
if(quickSlaveIO)
467-
hnts=xattr.quickIOPossible(f.getPath(), 0, f.length());
468-
469457
glusterFileStream=new FSDataInputStream(new GlusterFUSEInputStream(f, hnts, hostname));
470458
return glusterFileStream;
471459
}

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)