Skip to content

Commit 15b9b88

Browse files
committed
Patch to add logging of version back in
1 parent 2ecf673 commit 15b9b88

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,11 @@
144144
by default describe will run "just like git-describe on the command line", even though it's a JGit reimplementation.
145145
-->
146146
<gitDescribe>
147-
147+
<!-- This will show the available tags-->
148+
<tags>true</tags>
149+
148150
<!-- don't generate the describe property -->
149151
<skip>false</skip>
150-
151152
<!--
152153
if no tag was found "near" this commit, just print the commit's id instead,
153154
helpful when you always expect this field to be not-empty

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ public void initialize(URI name,Configuration conf) throws IOException{
6262

6363
public GlusterFileSystem(){
6464
this(new GlusterVolume());
65+
Version v=new Version();
6566
log.info("Initializing GlusterFS, CRC disabled.");
67+
log.info("GIT INFO="+v);
68+
log.info("GIT_TAG="+v.getTag());
6669
}
6770

6871
public GlusterFileSystem(FileSystem rawLocalFileSystem){

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public class GlusterFileSystemCRC extends LocalFileSystem{
4343

4444
public GlusterFileSystemCRC(){
4545
super(new GlusterVolume());
46+
Version v = new Version();
47+
log.info("GIT INFO="+v);
48+
log.info("GIT_TAG="+v.getTag());
4649
}
4750

4851
public void setConf(Configuration conf){

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ public Version() {
1717
lg.error("Couldn't find git properties for version info " + t.getMessage());
1818
}
1919
}
20+
public String getTag(){
21+
return this.getProperty("git.commit.id.describe").split("-")[0];
22+
}
2023
}

0 commit comments

Comments
 (0)