You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by rm...@apache.org on 2014/06/24 11:08:11 UTC
git commit: Show version information including commit date in TaskMgr
log
Repository: incubator-flink
Updated Branches:
refs/heads/master 9ff440fcb -> 7d0e89d2b
Show version information including commit date in TaskMgr log
Project: http://git-wip-us.apache.org/repos/asf/incubator-flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-flink/commit/7d0e89d2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/7d0e89d2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/7d0e89d2
Branch: refs/heads/master
Commit: 7d0e89d2b0f8894ef5356346f7dd78c0a0361054
Parents: 9ff440f
Author: Robert Metzger <rm...@apache.org>
Authored: Tue Jun 24 11:01:06 2014 +0200
Committer: Robert Metzger <rm...@apache.org>
Committed: Tue Jun 24 11:01:06 2014 +0200
----------------------------------------------------------------------
.../nephele/jobmanager/JobManager.java | 7 ++++++-
.../nephele/jobmanager/JobManagerUtils.java | 14 ++++++++++++--
.../jobmanager/web/JobmanagerInfoServlet.java | 2 +-
.../nephele/taskmanager/TaskManager.java | 9 ++++++++-
tools/merge_pull_request.sh.template | 17 +++++++++++++++++
5 files changed, 44 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/7d0e89d2/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java
----------------------------------------------------------------------
diff --git a/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java b/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java
index 40e2a0b..6401407 100644
--- a/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java
+++ b/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManager.java
@@ -79,6 +79,7 @@ import eu.stratosphere.nephele.ipc.Server;
import eu.stratosphere.nephele.jobgraph.AbstractJobVertex;
import eu.stratosphere.nephele.jobgraph.JobGraph;
import eu.stratosphere.nephele.jobgraph.JobID;
+import eu.stratosphere.nephele.jobmanager.JobManagerUtils.RevisionInformation;
import eu.stratosphere.nephele.jobmanager.accumulators.AccumulatorManager;
import eu.stratosphere.nephele.jobmanager.archive.ArchiveListener;
import eu.stratosphere.nephele.jobmanager.archive.MemoryArchivist;
@@ -291,7 +292,11 @@ public class JobManager implements DeploymentManager, ExtendedManagementProtocol
* Log Stratosphere version information.
*/
private static void logVersionInformation() {
- LOG.info("Starting Stratosphere JobManager (Version: " + JobManagerUtils.getVersion() + ", Rev:" + JobManagerUtils.getRevision() + ")");
+ RevisionInformation rev = JobManagerUtils.getRevisionInformation();
+ LOG.info("Starting Stratosphere JobManager "
+ + "(Version: " + JobManagerUtils.getVersion() + ", "
+ + "Rev:" + rev.commitId + ", "
+ + "Date:" + rev.commitDate + ")");
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/7d0e89d2/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManagerUtils.java
----------------------------------------------------------------------
diff --git a/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManagerUtils.java b/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManagerUtils.java
index 45506aa..f2e1d33 100644
--- a/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManagerUtils.java
+++ b/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/JobManagerUtils.java
@@ -182,18 +182,28 @@ public class JobManagerUtils {
* Returns the revision of Stratosphere as String.
* @return String
*/
- public static String getRevision() {
+ public static RevisionInformation getRevisionInformation() {
+ RevisionInformation info = new RevisionInformation();
String revision = "<unknown>";
+ String commitDate = "<unknown>";
try {
Properties properties = new Properties();
InputStream propFile = JobManagerUtils.class.getClassLoader().getResourceAsStream(".version.properties");
if (propFile != null) {
properties.load(propFile);
revision = properties.getProperty("git.commit.id.abbrev");
+ commitDate = properties.getProperty("git.commit.time");
}
} catch (IOException e) {
LOG.info("Cannot determine code revision. Unable ro read version property file.");
}
- return revision;
+ info.commitId = revision;
+ info.commitDate = commitDate;
+ return info;
+ }
+
+ public static class RevisionInformation {
+ public String commitId;
+ public String commitDate;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/7d0e89d2/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/web/JobmanagerInfoServlet.java
----------------------------------------------------------------------
diff --git a/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/web/JobmanagerInfoServlet.java b/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/web/JobmanagerInfoServlet.java
index bb35100..8ffbd57 100644
--- a/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/web/JobmanagerInfoServlet.java
+++ b/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/web/JobmanagerInfoServlet.java
@@ -517,7 +517,7 @@ public class JobmanagerInfoServlet extends HttpServlet {
private void writeJsonForVersion(PrintWriter wrt) {
wrt.write("{");
wrt.write("\"version\": \"" + JobManagerUtils.getVersion() + "\",");
- wrt.write("\"revision\": \"" + JobManagerUtils.getRevision() + "\"");
+ wrt.write("\"revision\": \"" + JobManagerUtils.getRevisionInformation().commitId + "\"");
wrt.write("}");
}
}
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/7d0e89d2/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java
----------------------------------------------------------------------
diff --git a/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java b/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java
index 3225ab7..9b623bd 100644
--- a/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java
+++ b/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/taskmanager/TaskManager.java
@@ -80,6 +80,8 @@ import eu.stratosphere.nephele.instance.InstanceConnectionInfo;
import eu.stratosphere.nephele.ipc.RPC;
import eu.stratosphere.nephele.ipc.Server;
import eu.stratosphere.nephele.jobgraph.JobID;
+import eu.stratosphere.nephele.jobmanager.JobManagerUtils;
+import eu.stratosphere.nephele.jobmanager.JobManagerUtils.RevisionInformation;
import eu.stratosphere.nephele.net.NetUtils;
import eu.stratosphere.nephele.profiling.ProfilingUtils;
import eu.stratosphere.nephele.profiling.TaskManagerProfiler;
@@ -172,13 +174,18 @@ public class TaskManager implements TaskOperationProtocol {
throw new NullPointerException("Execution mode must not be null.");
}
+ RevisionInformation rev = JobManagerUtils.getRevisionInformation();
+ LOG.info("Starting Stratosphere TaskManager "
+ + "(Version: " + JobManagerUtils.getVersion() + ", "
+ + "Rev:" + rev.commitId + ", "
+ + "Date:" + rev.commitDate + ")");
+
try {
LOG.info("TaskManager started as user " + UserGroupInformation.getCurrentUser().getShortUserName());
} catch (Throwable t) {
LOG.error("Cannot determine user group information.", t);
}
- LOG.info("User system property: " + System.getProperty("user.name"));
LOG.info("Execution mode: " + executionMode);
// IMPORTANT! At this point, the GlobalConfiguration must have been read!
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/7d0e89d2/tools/merge_pull_request.sh.template
----------------------------------------------------------------------
diff --git a/tools/merge_pull_request.sh.template b/tools/merge_pull_request.sh.template
index d506d9d..0333fec 100755
--- a/tools/merge_pull_request.sh.template
+++ b/tools/merge_pull_request.sh.template
@@ -1,5 +1,22 @@
#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
# the directory where you have your flink code
export FLINK_HOME="/home/robert/projects/flink/incubator-flink"
# Remote name which points to the Gihub site