You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by ve...@apache.org on 2013/11/20 03:06:15 UTC

[1/2] git commit: FALCON-212 OozieClient does not propagate user in request to Oozie server. Contributed by Venkatesh Seetharam.

Updated Branches:
  refs/heads/branch-0.4 c2731dcfd -> 07e086a9a


FALCON-212 OozieClient does not propagate user in request to Oozie server. Contributed by Venkatesh Seetharam.


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

Branch: refs/heads/branch-0.4
Commit: a39995dfd41d2c3c13da604bfdc9817b58019f69
Parents: c2731dc
Author: Venkatesh Seetharam <ve...@apache.org>
Authored: Tue Nov 19 18:02:53 2013 -0800
Committer: Venkatesh Seetharam <ve...@apache.org>
Committed: Tue Nov 19 18:02:53 2013 -0800

----------------------------------------------------------------------
 CHANGES.txt                                            |  3 +++
 .../org/apache/oozie/client/CustomOozieClient.java     | 13 +++++++++++++
 .../java/org/apache/falcon/resource/TestContext.java   |  3 +++
 3 files changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/a39995df/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f6cf839..c6cb77a 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -187,6 +187,9 @@ Release Version: 0.4-incubating
     FALCON-203 Do not generate transitive closure for the dependency graph
     (Haohui Mai via Venkatesh Seetharam)
 
+    FALCON-212 OozieClient does not propagate user in request to
+    Oozie server (Venkatesh Seetharam)
+
 
 
 Release Version: 0.3-incubating

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/a39995df/oozie/src/main/java/org/apache/oozie/client/CustomOozieClient.java
----------------------------------------------------------------------
diff --git a/oozie/src/main/java/org/apache/oozie/client/CustomOozieClient.java b/oozie/src/main/java/org/apache/oozie/client/CustomOozieClient.java
index 2f430ba..c55221e 100644
--- a/oozie/src/main/java/org/apache/oozie/client/CustomOozieClient.java
+++ b/oozie/src/main/java/org/apache/oozie/client/CustomOozieClient.java
@@ -18,7 +18,9 @@
 
 package org.apache.oozie.client;
 
+import org.apache.falcon.security.CurrentUser;
 import org.apache.falcon.util.RuntimeProperties;
+import org.apache.log4j.Logger;
 import org.apache.oozie.client.rest.RestConstants;
 import org.json.simple.JSONObject;
 import org.json.simple.JSONValue;
@@ -37,6 +39,7 @@ import java.util.Properties;
  */
 public class CustomOozieClient extends OozieClient {
 
+    private static final Logger LOG = Logger.getLogger(CustomOozieClient.class);
     private static final Map<String, String> NONE = new HashMap<String, String>();
 
     public CustomOozieClient(String oozieUrl) {
@@ -53,6 +56,16 @@ public class CustomOozieClient extends OozieClient {
 
     @Override
     protected HttpURLConnection createConnection(URL url, String method) throws IOException, OozieClientException {
+        String strUrl = url.toString();
+        if (!strUrl.contains(OozieClient.USER_NAME)) { // decorate the url with the user in request
+            String paramSeparator = (strUrl.contains("?")) ? "&" : "?";
+            strUrl += paramSeparator + OozieClient.USER_NAME + "=" + CurrentUser.getUser();
+            url = new URL(strUrl);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Decorated url with user info: " + url);
+            }
+        }
+
         HttpURLConnection conn = super.createConnection(url, method);
 
         int connectTimeout = Integer.valueOf(RuntimeProperties.get().getProperty("oozie.connect.timeout", "1000"));

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/a39995df/webapp/src/test/java/org/apache/falcon/resource/TestContext.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/resource/TestContext.java b/webapp/src/test/java/org/apache/falcon/resource/TestContext.java
index f246948..d224f90 100644
--- a/webapp/src/test/java/org/apache/falcon/resource/TestContext.java
+++ b/webapp/src/test/java/org/apache/falcon/resource/TestContext.java
@@ -33,6 +33,7 @@ import org.apache.falcon.entity.v0.EntityType;
 import org.apache.falcon.entity.v0.SchemaHelper;
 import org.apache.falcon.entity.v0.cluster.Cluster;
 import org.apache.falcon.entity.v0.feed.Feed;
+import org.apache.falcon.security.CurrentUser;
 import org.apache.falcon.util.StartupProperties;
 import org.apache.falcon.workflow.engine.OozieClientFactory;
 import org.apache.hadoop.fs.FileSystem;
@@ -414,6 +415,8 @@ public class TestContext {
     }
 
     public static void prepare(String clusterTemplate) throws Exception {
+        // setup a logged in user
+        CurrentUser.authenticate(REMOTE_USER);
 
         Map<String, String> overlay = new HashMap<String, String>();
         overlay.put("cluster", RandomStringUtils.randomAlphabetic(5));


[2/2] git commit: FALCON-208 Improve the icons for instance lists Contributed by Haohui Mai

Posted by ve...@apache.org.
FALCON-208 Improve the icons for instance lists  Contributed by Haohui Mai


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

Branch: refs/heads/branch-0.4
Commit: 07e086a9a1d132b342b50e26f893d175edb0b917
Parents: a39995d
Author: Venkatesh Seetharam <ve...@apache.org>
Authored: Tue Nov 19 18:05:31 2013 -0800
Committer: Venkatesh Seetharam <ve...@apache.org>
Committed: Tue Nov 19 18:05:31 2013 -0800

----------------------------------------------------------------------
 CHANGES.txt                 |  2 ++
 html5-ui/css/falcon.css     | 15 +++++++++++++++
 html5-ui/js/falcon-index.js |  2 +-
 3 files changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/07e086a9/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c6cb77a..80e946b 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -190,6 +190,8 @@ Release Version: 0.4-incubating
     FALCON-212 OozieClient does not propagate user in request to
     Oozie server (Venkatesh Seetharam)
 
+    FALCON-208 Improve the icons for instance lists. (Haohui Mai)
+
 
 
 Release Version: 0.3-incubating

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/07e086a9/html5-ui/css/falcon.css
----------------------------------------------------------------------
diff --git a/html5-ui/css/falcon.css b/html5-ui/css/falcon.css
index f72b1ad..de98ae7 100644
--- a/html5-ui/css/falcon.css
+++ b/html5-ui/css/falcon.css
@@ -90,7 +90,22 @@
 }
 
 .instance-link-FAILED:before {
+  color: darkred;
+  content: "\e107";
+}
+
+.instance-link-SUSPENDED:before {
+  color: orangered;
+  content: "\e165";
+}
+
+.instance-link-KILLED:before {
   color: red;
+  content: "\e101";
+}
+
+.instance-link-ERROR:before {
+  color: darkred;
   content: "\e014";
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/07e086a9/html5-ui/js/falcon-index.js
----------------------------------------------------------------------
diff --git a/html5-ui/js/falcon-index.js b/html5-ui/js/falcon-index.js
index aa5e7a2..af5a396 100644
--- a/html5-ui/js/falcon-index.js
+++ b/html5-ui/js/falcon-index.js
@@ -82,7 +82,7 @@
    **/
   function refreshEntities(type) {
     falcon.getJson('api/entities/list/' + type + '?fields=status', function (data) {
-      if (data.entity == null)
+      if (data === null || data.entity == null)
         return;
 
       if (!($.isArray(data.entity)))