Skip to content

Commit 33cb870

Browse files
author
Shubhendu Tripathi
committed
Corrected log message for invalid volume names
The old error message was confusing so corrected the same to clearly mention if the volume name is not valid. This could happen in two ways - 1. If the value for fs.glusterfs.volumes contains some invalid volume names (e.g. some random string which is not a valid volume name) and so there would be no entry available in the form of the property fs.glusterfs.volume.fuse.<Volume Name> 2. If the value for fs.glusterfs.volumes contains valid strings which are valid volume names but corresponding entry is not available in the form of the property fs.glusterfs.volume.fuse.<Volume Name> Signed-off-by: Shubhendu Tripathi <[email protected]> Bug-URL: https://bugzilla.redhat.com/show_bug.cgi?id=1101937
1 parent e4c0da7 commit 33cb870

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ public void setConf(Configuration conf){
113113
String vol = conf.get("fs.glusterfs.volume.fuse." + v[i] , null);
114114

115115
if(vol==null){
116-
log.error("Could not find property: fs.glusterfs.fuse." + v[i]);
117-
throw new RuntimeException("Could not find mount point for volume: "+ v[i]);
116+
log.error("Invalid volume name: " + v[i]
117+
+ ", No such property: fs.glusterfs.fuse." + v[i]);
118+
throw new RuntimeException("Invalid volume name: " + v[i]
119+
+ ", No mount point available for the volume.");
118120
}
119121
volumes.put(v[i],vol);
120122
log.info("Gluster volume: " + v[i] + " at : " + volumes.get(v[i]));

0 commit comments

Comments
 (0)