flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [3/5] git commit: Fix problems with missing files/dependencies with cdh-4 distribution.
Date Wed, 13 Aug 2014 19:27:00 GMT
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/bbb5d0bf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/bbb5d0bf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/bbb5d0bf

Branch: refs/heads/release-0.6-rc5
Commit: bbb5d0bf46703030b6763b090b3fe382193e6805
Parents: 6164133
Author: Stephan Ewen <sewen@apache.org>
Authored: Wed Aug 13 20:08:04 2014 +0200
Committer: Stephan Ewen <sewen@apache.org>
Committed: Wed Aug 13 21:25:00 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/bbb5d0bf/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/bbb5d0bf/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() {


Mime
View raw message