You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2014/08/13 21:21:05 UTC

[2/3] git commit: Fix problems with missing files/dependencies with cdh-4 distribution.

Fix problems with missing files/dependencies with cdh-4 distribution.


Project: http://git-wip-us.apache.org/repos/asf/incubator-flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-flink/commit/e45534cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/e45534cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/e45534cf

Branch: refs/heads/master
Commit: e45534cf2275f6918294c81de5377146c243904c
Parents: e905c34
Author: Stephan Ewen <se...@apache.org>
Authored: Wed Aug 13 20:08:04 2014 +0200
Committer: Stephan Ewen <se...@apache.org>
Committed: Wed Aug 13 21:19:56 2014 +0200

----------------------------------------------------------------------
 flink-runtime/pom.xml                              |  7 +++++++
 .../flink/runtime/util/EnvironmentInformation.java | 17 ++++++++++++-----
 2 files changed, 19 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/e45534cf/flink-runtime/pom.xml
----------------------------------------------------------------------
diff --git a/flink-runtime/pom.xml b/flink-runtime/pom.xml
index 7b22708..c67162f 100644
--- a/flink-runtime/pom.xml
+++ b/flink-runtime/pom.xml
@@ -77,6 +77,12 @@ under the License.
 			<artifactId>netty-all</artifactId>
 			<version>4.0.21.Final</version>
 		</dependency>
+		
+		<dependency>
+			<groupId>org.codehaus.jettison</groupId>
+			<artifactId>jettison</artifactId>
+			<version>1.1</version>
+		</dependency>
 
 		<dependency>
 			<groupId>org.apache.flink</groupId>
@@ -84,6 +90,7 @@ under the License.
 			<version>${project.version}</version>
 			<scope>test</scope>
 		</dependency>
+		
 	</dependencies>
 
 	<build>

http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/e45534cf/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java b/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
index 54a88e2..d6d32f2 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
@@ -85,14 +85,21 @@ public class EnvironmentInformation {
 	public static String getUserRunning() {
 		try {
 			return UserGroupInformation.getCurrentUser().getShortUserName();
-		} catch (Throwable t) {
+		}
+		catch (Throwable t) {
+			if (LOG.isDebugEnabled() && !(t instanceof ClassNotFoundException)) {
+				LOG.debug("Cannot determine user/group information using Hadoop utils.", t);
+			}
+		}
+		
+		String user = System.getProperty("user.name");
+		if (user == null) {
+			user = UNKNOWN;
 			if (LOG.isDebugEnabled()) {
-				LOG.debug("Cannot determine user/group information for the current user.", t);
-			} else {
-				LOG.info("Cannot determine user/group information for the current user.");
+				LOG.debug("Cannot determine user/group information for the current user.");
 			}
-			return UNKNOWN;
 		}
+		return user;
 	}
 
 	public static long getMaxJvmMemory() {