File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/main/java/org/apache/hadoop/fs/glusterfs Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ public class GlusterVolume extends RawLocalFileSystem{
48
48
*/
49
49
public static final int OVERRIDE_WRITE_BUFFER_SIZE = 1024 * 4 ;
50
50
public static final int OPTIMAL_WRITE_BUFFER_SIZE = 1024 * 128 ;
51
+ public static final int DEFAULT_BLOCK_SIZE = 64 * 1024 * 1024 ;
51
52
52
53
public static final URI NAME = URI .create ("glusterfs:///" );
53
54
@@ -107,6 +108,18 @@ public void setConf(Configuration conf){
107
108
conf .setInt ("io.file.buffer.size" , OPTIMAL_WRITE_BUFFER_SIZE );
108
109
}
109
110
log .info ("Write buffer size : " +conf .getInt ("io.file.buffer.size" ,-1 )) ;
111
+
112
+ /**
113
+ * Default block size
114
+ */
115
+
116
+ Long defaultBlockSize =conf .getLong ("fs.local.block.size" , -1 );
117
+
118
+ if (defaultBlockSize == -1 ) {
119
+ conf .setInt ("fs.local.block.size" , DEFAULT_BLOCK_SIZE );
120
+ }
121
+ log .info ("Default block size : " +conf .getInt ("fs.local.block.size" ,-1 )) ;
122
+
110
123
}
111
124
catch (Exception e ){
112
125
throw new RuntimeException (e );
You can’t perform that action at this time.
0 commit comments