Skip to content

Commit 5c5a6bb

Browse files
committed
init() now logs all git commit meta data using version class
1 parent 420a1a8 commit 5c5a6bb

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void initialize(URI uri,Configuration conf) throws IOException{
113113
if(this.mounted)
114114
return;
115115

116-
log.info("Initializing GlusterFS");
116+
log.info("Initializing GlusterFS " + new Version().toString().replace(",","\n"));
117117

118118
try{
119119
volName=conf.get("fs.glusterfs.volname", null);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package org.apache.hadoop.fs.glusterfs;
2+
3+
import java.io.IOException;
4+
import java.util.Properties;
5+
6+
import org.slf4j.Logger;
7+
import org.slf4j.LoggerFactory;
8+
9+
public class Version extends Properties{
10+
final static Logger lg = LoggerFactory.getLogger(Version.class);
11+
public Version() {
12+
super();
13+
try{
14+
load(this.getClass().getClassLoader().getResourceAsStream("git.properties"));
15+
}
16+
catch(Throwable t){
17+
lg.error("Couldn't find git properties for version info " + t.getMessage());
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)