nielsbasjes commented on a change in pull request #11592: 
[FLINK-16871][runtime] Make more build time information available at runtime
URL: https://github.com/apache/flink/pull/11592#discussion_r404762455
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
 ##########
 @@ -41,14 +49,77 @@
        public static final String UNKNOWN = "<unknown>";
 
        /**
-        * Returns the version of the code as String. If version == null, then 
the JobManager does not run from a
-        * Maven build. An example is a source code checkout, compile, and run 
from inside an IDE.
-        * 
-        * @return The version string.
+        * Returns the version of the code as String.
+        * @return The project version string.
         */
        public static String getVersion() {
-               String version = 
EnvironmentInformation.class.getPackage().getImplementationVersion();
-               return version != null ? version : UNKNOWN;
+               return PROJECT_VERSION;
+       }
+
+       /**
+        * Returns the version of the used Scala compiler as String.
+        * @return The scala version string.
+        */
+       public static String getScalaVersion() {
+               return SCALA_VERSION;
+       }
+
+       /**
+        * @return The Instant this version of the software was built.
+        */
+       public static Instant getBuildTime() {
+               return GIT_BUILD_TIME;
+       }
+
+       /**
+        * @return The Instant this version of the software was built as a 
String using the Europe/Berlin timezone.
+        */
+       public static String getBuildTimeString() {
+               return GIT_BUILD_TIME_STR;
+       }
+
+       /**
+        * @return The last known commit id of this version of the software.
+        */
+       public static String getGitCommitId() {
+               return GIT_COMMIT_ID;
+       }
+
+       /**
+        * @return The last known abbreviated commit id of this version of the 
software.
+        */
+       public static String getGitCommitIdAbbrev() {
+               return GIT_COMMIT_ID_ABBREV;
+       }
+
+       /**
+        * @return The Instant of the last commit of this code.
+        */
+       public static Instant getGitCommitTime() {
+               return GIT_COMMIT_TIME;
+       }
+
+       /**
+        * @return The Instant of the last commit of this code as a String 
using the Europe/Berlin timezone.
+        */
+       public static String getGitCommitTimeString() {
+               return GIT_COMMIT_TIME_STR;
+       }
+
+       /**
+        * @return Does this built have modifications that have not yet been 
committed.
+        */
+       public static boolean getGitDirty() {
+               return GIT_DIRTY;
 
 Review comment:
   I agree. Removing it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to