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 2014/10/16 23:40:37 UTC
[1/5] git commit: FALCON-482 Concurrent requests made using Proxy
Oozie client fail. Contributed by Sowmya Ramesh
Repository: incubator-falcon
Updated Branches:
refs/heads/master 688fc4557 -> 1caadaf20
FALCON-482 Concurrent requests made using Proxy Oozie client fail. Contributed by Sowmya Ramesh
Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/78e486c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/78e486c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/78e486c2
Branch: refs/heads/master
Commit: 78e486c263048dad66e7ef979b223614b0919e8e
Parents: 688fc45
Author: Venkatesh Seetharam <ve...@apache.org>
Authored: Thu Oct 16 13:41:11 2014 -0700
Committer: Venkatesh Seetharam <ve...@apache.org>
Committed: Thu Oct 16 13:41:11 2014 -0700
----------------------------------------------------------------------
CHANGES.txt | 3 +
.../apache/oozie/client/ProxyOozieClient.java | 122 +++++++++++++------
2 files changed, 87 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/78e486c2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e4354a7..8b4ab1e 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -117,6 +117,9 @@ Trunk (Unreleased)
OPTIMIZATIONS
BUG FIXES
+ FALCON-482 Concurrent requests made using Proxy Oozie client fail
+ (Sowmya Ramesh via Venkatesh Seetharam)
+
FALCON-764 Falcon retry of failed process/feed instances broken during restart
(Shaik Idris via Suhas Vasu)
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/78e486c2/oozie/src/main/java/org/apache/oozie/client/ProxyOozieClient.java
----------------------------------------------------------------------
diff --git a/oozie/src/main/java/org/apache/oozie/client/ProxyOozieClient.java b/oozie/src/main/java/org/apache/oozie/client/ProxyOozieClient.java
index c3ab765..a7c6960 100644
--- a/oozie/src/main/java/org/apache/oozie/client/ProxyOozieClient.java
+++ b/oozie/src/main/java/org/apache/oozie/client/ProxyOozieClient.java
@@ -22,9 +22,7 @@ import org.apache.commons.codec.CharEncoding;
import org.apache.falcon.security.CurrentUser;
import org.apache.falcon.security.SecurityUtil;
import org.apache.falcon.util.RuntimeProperties;
-import org.apache.hadoop.hdfs.web.KerberosUgiAuthenticator;
import org.apache.hadoop.security.UserGroupInformation;
-import org.apache.hadoop.security.authentication.client.Authenticator;
import org.apache.oozie.client.rest.RestConstants;
import org.json.simple.JSONObject;
import org.json.simple.JSONValue;
@@ -52,8 +50,6 @@ public class ProxyOozieClient extends AuthOozieClient {
private static final Logger LOG = LoggerFactory.getLogger(ProxyOozieClient.class);
private static final Map<String, String> NONE = new HashMap<String, String>();
- private final Authenticator authenticator = new KerberosUgiAuthenticator();
-
public ProxyOozieClient(String oozieUrl) {
super(oozieUrl, SecurityUtil.getAuthenticationType());
@@ -71,11 +67,6 @@ public class ProxyOozieClient extends AuthOozieClient {
}
@Override
- protected Authenticator getAuthenticator() throws OozieClientException {
- return authenticator;
- }
-
- @Override
protected HttpURLConnection createConnection(URL url, final String method)
throws IOException, OozieClientException {
@@ -153,8 +144,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getSystemMode();
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -167,8 +160,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.submit(conf);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -181,10 +176,11 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.dryrun(conf);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
-
}
@Override
@@ -197,8 +193,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return null;
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -211,8 +209,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.run(conf);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -226,8 +226,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return null;
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -241,8 +243,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return null;
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -256,8 +260,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return null;
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -271,8 +277,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return null;
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -286,8 +294,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return null;
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -300,8 +310,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getJobInfo(jobId);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -315,8 +327,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getJobInfo(jobId, start, len);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -330,8 +344,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getWorkflowActionInfo(actionId);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -344,8 +360,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getJobLog(jobId);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -361,8 +379,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return null;
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -375,8 +395,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getJobDefinition(jobId);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -389,8 +411,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getBundleJobInfo(jobId);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -403,8 +427,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getCoordJobInfo(jobId);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -419,8 +445,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getCoordJobInfo(jobId, filter, start, len);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -433,8 +461,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getCoordActionInfo(actionId);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -450,8 +480,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.reRunCoord(jobId, rerunType, scope, refresh, noCleanup);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -466,8 +498,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.reRunBundle(jobId, coordScope, dateScope, refresh, noCleanup);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -481,8 +515,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getJobsInfo(filter, start, len);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -495,8 +531,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getJobsInfo(filter);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -510,8 +548,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return null;
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -524,8 +564,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getJobId(externalId);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -539,8 +581,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getCoordJobsInfo(filter, start, len);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
@@ -553,8 +597,10 @@ public class ProxyOozieClient extends AuthOozieClient {
return ProxyOozieClient.super.getBundleJobsInfo(filter, start, len);
}
});
+ } catch (OozieClientException e) {
+ throw e;
} catch (Exception e) {
- throw new OozieClientException(OozieClientException.AUTHENTICATION, e);
+ throw new OozieClientException(e.toString(), e);
}
}
}
[3/5] git commit: FALCON-799 Falcon Dashboard unusable when server is
started with umask 077. Contributed by Balu Vellanki
Posted by ve...@apache.org.
FALCON-799 Falcon Dashboard unusable when server is started with umask 077. Contributed by Balu Vellanki
Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/957aab14
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/957aab14
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/957aab14
Branch: refs/heads/master
Commit: 957aab148951690da99e84a2204a7dfa0cbdb580
Parents: 04efd17
Author: Venkatesh Seetharam <ve...@apache.org>
Authored: Thu Oct 16 13:58:32 2014 -0700
Committer: Venkatesh Seetharam <ve...@apache.org>
Committed: Thu Oct 16 13:58:32 2014 -0700
----------------------------------------------------------------------
CHANGES.txt | 3 ++
docs/src/site/twiki/Security.twiki | 42 ++++++++++----------
html5-ui/entity.html | 6 +++
html5-ui/js/falcon.js | 17 ++++++--
.../security/FalconAuthenticationFilter.java | 2 +-
5 files changed, 43 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/957aab14/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e2c976b..222c351 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -117,6 +117,9 @@ Trunk (Unreleased)
OPTIMIZATIONS
BUG FIXES
+ FALCON-799 Falcon Dashboard unusable when server is started with umask 077
+ (Balu Vellanki via Venkatesh Seetharam)
+
FALCON-678 Falcon's default port has changed to 15443 (Balu Vellanki via
Venkatesh Seetharam)
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/957aab14/docs/src/site/twiki/Security.twiki
----------------------------------------------------------------------
diff --git a/docs/src/site/twiki/Security.twiki b/docs/src/site/twiki/Security.twiki
index 2e97c8b..4e33182 100644
--- a/docs/src/site/twiki/Security.twiki
+++ b/docs/src/site/twiki/Security.twiki
@@ -85,26 +85,25 @@ implementation that enforces the following authorization policy.
---++++ Entity and Instance Management Operations Policy
-* All Entity and Instance operations are authorized for users who created them, Owners and users
-with group memberships
-* Reference to entities with in a feed or process is allowed with out enforcing permissions
-Any Feed or Process can refer to a Cluster entity not owned by the Feed or Process owner
-Any Process can refer to a Feed entity not owned by the Process owner
+ * All Entity and Instance operations are authorized for users who created them, Owners and users with group memberships
+ * Reference to entities with in a feed or process is allowed with out enforcing permissions
+
+Any Feed or Process can refer to a Cluster entity not owned by the Feed or Process owner. Any Process can refer to a Feed entity not owned by the Process owner
The authorization is enforced in the following way:
-if admin resource,
- if authenticated user name matches the admin users configuration
- Else if groups of the authenticated user matches the admin groups configuration
- Else authorization exception is thrown
-Else if entities or instance resource
- if the authenticated user matches the owner in ACL for the entity
- Else if the groups of the authenticated user matches the group in ACL for the entity
- Else authorization exception is thrown
-Else if lineage resource
- All have read-only permissions, reason being folks should be able to examine the dependency
- and allow reuse
+ * if admin resource,
+ * If authenticated user name matches the admin users configuration
+ * Else if groups of the authenticated user matches the admin groups configuration
+ * Else authorization exception is thrown
+ * Else if entities or instance resource
+ * If the authenticated user matches the owner in ACL for the entity
+ * Else if the groups of the authenticated user matches the group in ACL for the entity
+ * Else authorization exception is thrown
+ * Else if lineage resource
+ * All have read-only permissions, reason being folks should be able to examine the dependency and allow reuse
+To authenticate user for REST api calls, user should append "user.name=<username>" to the query.
*operations on Entity Resource*
@@ -333,12 +332,11 @@ configured specifically in the file.
---+++ Falcon Dashboard
-The dashboard assumes an anonymous user in Pseudo/Simple method and hence anonymous users must be enabled for it to
-work.
-<verbatim>
-# Indicates if anonymous requests are allowed when using 'simple' authentication.
-*.falcon.http.authentication.simple.anonymous.allowed=true
-</verbatim>
+To initialize the current user for dashboard, user should append query param "user.name=<username>" to the REST api call.
+
+If dashboard user wishes to change the current user, they should do the following.
+ * delete the hadoop.auth cookie from browser cache.
+ * append query param "user.name=<new_user>" to the next REST API call.
In Kerberos method, the browser must support HTTP Kerberos SPNEGO.
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/957aab14/html5-ui/entity.html
----------------------------------------------------------------------
diff --git a/html5-ui/entity.html b/html5-ui/entity.html
index d4536fb..fc6f4b6 100644
--- a/html5-ui/entity.html
+++ b/html5-ui/entity.html
@@ -48,6 +48,12 @@
<h3 class="link-icons entity-title" id="entity-title"></h3>
<br />
<div id="entity-info-container">
+ <div id="alert-panel">
+ <div class="alert alert-danger">
+ <button type="button" class="close" onclick="$('#alert-panel').hide();">×</button>
+ <div class="alert-body" id="alert-panel-body"></div>
+ </div>
+ </div>
<div class="panel panel-default" id="panel-instance" style="display:none">
<div class="panel-heading">Instances</div>
<div class="panel-body"></div>
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/957aab14/html5-ui/js/falcon.js
----------------------------------------------------------------------
diff --git a/html5-ui/js/falcon.js b/html5-ui/js/falcon.js
index a14c962..0dba31a 100644
--- a/html5-ui/js/falcon.js
+++ b/html5-ui/js/falcon.js
@@ -17,8 +17,6 @@
(function(exports) {
"use strict";
- var USER_ID = 'falcon-dashboard';
-
function onError(msg) {
$('#alert-panel-body').html(msg);
$('#alert-panel').alert();
@@ -31,8 +29,19 @@
}
function add_user(url) {
- var paramSeparator = (url.indexOf('?') != -1) ? '&' : '?';
- return url + paramSeparator + 'user.name=' + USER_ID;
+ var paramSeparator = (url.indexOf('?') != -1) ? '&' : '?';
+ var user_id = getQuery_params()['user.name'];
+ return (user_id == undefined) ? url : (url + paramSeparator + 'user.name=' + user_id);
+ }
+
+ function getQuery_params() {
+ var query = location.search.substr(1);
+ var result = {};
+ query.split("&").forEach(function(part) {
+ var item = part.split("=");
+ result[item[0]] = decodeURIComponent(item[1]);
+ });
+ return result;
}
function getJson_impl(url, success) {
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/957aab14/prism/src/main/java/org/apache/falcon/security/FalconAuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/prism/src/main/java/org/apache/falcon/security/FalconAuthenticationFilter.java b/prism/src/main/java/org/apache/falcon/security/FalconAuthenticationFilter.java
index ae9e874..4edde75 100644
--- a/prism/src/main/java/org/apache/falcon/security/FalconAuthenticationFilter.java
+++ b/prism/src/main/java/org/apache/falcon/security/FalconAuthenticationFilter.java
@@ -171,7 +171,7 @@ public class FalconAuthenticationFilter
final String user = Servlets.getUserFromRequest(httpRequest);
if (StringUtils.isEmpty(user)) {
((HttpServletResponse) response).sendError(Response.Status.BAD_REQUEST.getStatusCode(),
- "User can't be empty");
+ "Param user.name can't be empty");
} else if (blackListedUsers.contains(user)) {
((HttpServletResponse) response).sendError(Response.Status.BAD_REQUEST.getStatusCode(),
"User can't be a superuser:" + BLACK_LISTED_USERS_KEY);
[5/5] git commit: FALCON-804 Remove Oozie 3.* patch files from
Falcon. Contributed by Peeyush Bishnoi
Posted by ve...@apache.org.
FALCON-804 Remove Oozie 3.* patch files from Falcon. Contributed by Peeyush Bishnoi
Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/1caadaf2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/1caadaf2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/1caadaf2
Branch: refs/heads/master
Commit: 1caadaf209f6207f7993c5e3e7866f12220caf33
Parents: c95b55b
Author: Venkatesh Seetharam <ve...@apache.org>
Authored: Thu Oct 16 14:40:24 2014 -0700
Committer: Venkatesh Seetharam <ve...@apache.org>
Committed: Thu Oct 16 14:40:24 2014 -0700
----------------------------------------------------------------------
CHANGES.txt | 3 +
build-tools/src/patches/OOZIE-1465-3.3.2.patch | 15 -
build-tools/src/patches/OOZIE-1465.patch | 15 -
.../src/patches/OOZIE-674-v6-3.2.0.patch | 370 --------------
build-tools/src/patches/OOZIE-674-v6.patch | 481 -------------------
build-tools/src/patches/OOZIE-882.patch | 28 --
6 files changed, 3 insertions(+), 909 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/1caadaf2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a393649..d53017f 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -117,6 +117,9 @@ Trunk (Unreleased)
OPTIMIZATIONS
BUG FIXES
+ FALCON-804 Remove Oozie 3.* patch files from Falcon (Peeyush Bishnoi via
+ Venkatesh Seetharam)
+
FALCON-803 Instances displayed on Dashboard entity page should be sorted
by startTime (Balu Vellanki via Venkatesh Seetharam)
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/1caadaf2/build-tools/src/patches/OOZIE-1465-3.3.2.patch
----------------------------------------------------------------------
diff --git a/build-tools/src/patches/OOZIE-1465-3.3.2.patch b/build-tools/src/patches/OOZIE-1465-3.3.2.patch
deleted file mode 100644
index 4890c7c..0000000
--- a/build-tools/src/patches/OOZIE-1465-3.3.2.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java
-===================================================================
---- core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java (revision 1506445)
-+++ core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java (working copy)
-@@ -40,8 +40,8 @@
-
- public class CoordELFunctions {
- final private static XLog LOG = XLog.getLog(CoordELFunctions.class);
-- final private static String DATASET = "oozie.coord.el.dataset.bean";
-- final private static String COORD_ACTION = "oozie.coord.el.app.bean";
-+ final public static String DATASET = "oozie.coord.el.dataset.bean";
-+ final public static String COORD_ACTION = "oozie.coord.el.app.bean";
- final public static String CONFIGURATION = "oozie.coord.el.conf";
- final public static String LATEST_EL_USE_CURRENT_TIME = "oozie.service.ELService.latest-el.use-current-time";
- // INSTANCE_SEPARATOR is used to separate multiple directories into one tag.
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/1caadaf2/build-tools/src/patches/OOZIE-1465.patch
----------------------------------------------------------------------
diff --git a/build-tools/src/patches/OOZIE-1465.patch b/build-tools/src/patches/OOZIE-1465.patch
deleted file mode 100644
index b203fac..0000000
--- a/build-tools/src/patches/OOZIE-1465.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java
-===================================================================
---- core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java (revision 1506445)
-+++ core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java (working copy)
-@@ -40,8 +40,8 @@
- */
-
- public class CoordELFunctions {
-- final private static String DATASET = "oozie.coord.el.dataset.bean";
-- final private static String COORD_ACTION = "oozie.coord.el.app.bean";
-+ final public static String DATASET = "oozie.coord.el.dataset.bean";
-+ final public static String COORD_ACTION = "oozie.coord.el.app.bean";
- final public static String CONFIGURATION = "oozie.coord.el.conf";
- final public static String LATEST_EL_USE_CURRENT_TIME = "oozie.service.ELService.latest-el.use-current-time";
- // INSTANCE_SEPARATOR is used to separate multiple directories into one tag.
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/1caadaf2/build-tools/src/patches/OOZIE-674-v6-3.2.0.patch
----------------------------------------------------------------------
diff --git a/build-tools/src/patches/OOZIE-674-v6-3.2.0.patch b/build-tools/src/patches/OOZIE-674-v6-3.2.0.patch
deleted file mode 100644
index c35437c..0000000
--- a/build-tools/src/patches/OOZIE-674-v6-3.2.0.patch
+++ /dev/null
@@ -1,370 +0,0 @@
-Index: core/src/test/java/org/apache/oozie/test/XTestCase.java
-===================================================================
---- core/src/test/java/org/apache/oozie/test/XTestCase.java (revision 1485571)
-+++ core/src/test/java/org/apache/oozie/test/XTestCase.java (working copy)
-@@ -75,7 +75,7 @@
- * From within testcases, system properties must be changed using the {@link #setSystemProperty} method.
- */
- public abstract class XTestCase extends TestCase {
-- private Map<String, String> sysProps;
-+ protected Map<String, String> sysProps;
- private String testCaseDir;
- private String testCaseConfDir;
- private String hadoopVersion;
-Index: core/src/test/java/org/apache/oozie/test/XDataTestCase.java
-===================================================================
---- core/src/test/java/org/apache/oozie/test/XDataTestCase.java (revision 1485571)
-+++ core/src/test/java/org/apache/oozie/test/XDataTestCase.java (working copy)
-@@ -121,6 +121,25 @@
- }
-
- /**
-+ * Inserts the passed coord job
-+ * @param coord job bean
-+ * @throws Exception
-+ */
-+ protected void addRecordToCoordJobTable(CoordinatorJobBean coordJob) throws Exception {
-+ try {
-+ JPAService jpaService = Services.get().get(JPAService.class);
-+ assertNotNull(jpaService);
-+ CoordJobInsertJPAExecutor coordInsertCmd = new CoordJobInsertJPAExecutor(coordJob);
-+ jpaService.execute(coordInsertCmd);
-+ }
-+ catch (JPAExecutorException je) {
-+ je.printStackTrace();
-+ fail("Unable to insert the test coord job record to table");
-+ throw je;
-+ }
-+ }
-+
-+ /**
- * Insert coord job for testing.
- *
- * @param status coord job status
-Index: core/src/test/java/org/apache/oozie/command/coord/CoordELExtensions.java
-===================================================================
---- core/src/test/java/org/apache/oozie/command/coord/CoordELExtensions.java (revision 0)
-+++ core/src/test/java/org/apache/oozie/command/coord/CoordELExtensions.java (revision 0)
-@@ -0,0 +1,77 @@
-+/**
-+ * 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.
-+ */
-+ package org.apache.oozie.command.coord;
-+
-+import java.util.Calendar;
-+
-+import org.apache.oozie.coord.CoordELFunctions;
-+import org.apache.oozie.util.ELEvaluator;
-+
-+public class CoordELExtensions {
-+ private static final String PREFIX = "coordext:";
-+
-+ public static String ph1_today_echo(int hr, int min) {
-+ ELEvaluator eval = ELEvaluator.getCurrent();
-+ eval.setVariable(".wrap", "true");
-+ return PREFIX + "today(" + hr + ", " + min + ")"; // Unresolved
-+ }
-+
-+ public static String ph2_today_inst(int hr, int min) throws Exception {
-+ Calendar nominalInstanceCal = CoordELFunctions.getEffectiveNominalTime();
-+ if (nominalInstanceCal == null) {
-+ return "";
-+ }
-+
-+ Calendar dsInstanceCal = Calendar.getInstance(CoordELFunctions.getDatasetTZ());
-+ dsInstanceCal.setTime(nominalInstanceCal.getTime());
-+ dsInstanceCal.set(Calendar.HOUR_OF_DAY, hr);
-+ dsInstanceCal.set(Calendar.MINUTE, min);
-+ dsInstanceCal.set(Calendar.SECOND, 0);
-+ dsInstanceCal.set(Calendar.MILLISECOND, 0);
-+
-+ int[] instCnt = new int[1];
-+ Calendar compInstCal = CoordELFunctions
-+ .getCurrentInstance(dsInstanceCal.getTime(), instCnt);
-+ if (compInstCal == null) {
-+ return "";
-+ }
-+ int dsInstanceCnt = instCnt[0];
-+
-+ compInstCal = CoordELFunctions.getCurrentInstance(nominalInstanceCal.getTime(), instCnt);
-+ if (compInstCal == null) {
-+ return "";
-+ }
-+ int nominalInstanceCnt = instCnt[0];
-+
-+ return "coord:current(" + (dsInstanceCnt - nominalInstanceCnt) + ")";
-+ }
-+
-+ public static String ph2_today(int hr, int min) throws Exception {
-+ String inst = ph2_today_inst(hr, min);
-+ return evaluateCurrent(inst);
-+ }
-+
-+ private static String evaluateCurrent(String curExpr) throws Exception {
-+ if (curExpr.equals("")) {
-+ return curExpr;
-+ }
-+
-+ int inst = CoordCommandUtils.parseOneArg(curExpr);
-+ return CoordELFunctions.ph2_coord_current(inst);
-+ }
-+}
-\ No newline at end of file
-Index: core/src/test/resources/oozie-site-coordel.xml
-===================================================================
---- core/src/test/resources/oozie-site-coordel.xml (revision 0)
-+++ core/src/test/resources/oozie-site-coordel.xml (revision 0)
-@@ -0,0 +1,65 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<!--
-+ 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.
-+-->
-+<configuration>
-+ <property>
-+ <name>oozie.service.ELService.ext.functions.coord-job-submit-instances
-+ </name>
-+ <value>
-+ coordext:today=org.apache.oozie.command.coord.CoordELExtensions#ph1_today_echo
-+ </value>
-+ <description>
-+ EL functions declarations, separated by commas,
-+ format is [PREFIX:]NAME=CLASS#METHOD.
-+ This property is a
-+ convenience property to add extensions to the built in
-+ executors without having to
-+ include all the built in ones.
-+ </description>
-+ </property>
-+ <property>
-+ <name>oozie.service.ELService.ext.functions.coord-action-create-inst
-+ </name>
-+ <value>
-+ coordext:today=org.apache.oozie.command.coord.CoordELExtensions#ph2_today_inst
-+ </value>
-+ <description>
-+ EL functions declarations, separated by commas,
-+ format is [PREFIX:]NAME=CLASS#METHOD.
-+ This property is a
-+ convenience property to add extensions to the built in
-+ executors without having to
-+ include all the built in ones.
-+ </description>
-+ </property>
-+ <property>
-+ <name>oozie.service.ELService.ext.functions.coord-action-create
-+ </name>
-+ <value>
-+ coordext:today=org.apache.oozie.command.coord.CoordELExtensions#ph2_today
-+ </value>
-+ <description>
-+ EL functions declarations, separated by commas,
-+ format is [PREFIX:]NAME=CLASS#METHOD.
-+ This property is a
-+ convenience property to add extensions to the built in
-+ executors without having to
-+ include all the built in ones.
-+ </description>
-+ </property>
-+</configuration>
-\ No newline at end of file
-Index: core/src/test/resources/coord-job-for-elext.xml
-===================================================================
---- core/src/test/resources/coord-job-for-elext.xml (revision 0)
-+++ core/src/test/resources/coord-job-for-elext.xml (revision 0)
-@@ -0,0 +1,63 @@
-+<!--
-+ 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.
-+-->
-+<coordinator-app xmlns='uri:oozie:coordinator:0.2' name='NAME'
-+ frequency="1" start='2009-02-01T01:00Z' end='2009-02-03T23:59Z'
-+ timezone='UTC' freq_timeunit='DAY' end_of_duration='NONE'>
-+ <controls>
-+ <timeout>10</timeout>
-+ <concurrency>2</concurrency>
-+ <execution>LIFO</execution>
-+ </controls>
-+ <input-events>
-+ <data-in name='A' dataset='a'>
-+ <dataset name='a' frequency='1' initial-instance='2009-02-01T00:00Z'
-+ timezone='UTC' freq_timeunit='HOUR' end_of_duration='NONE'>
-+ <uri-template>file://#testDir/${YEAR}/${MONTH}/${DAY}/${HOUR}
-+ </uri-template>
-+ </dataset>
-+ <start-instance>${coordext:today(-1,0)}</start-instance>
-+ <end-instance>${coordext:today(0,0)}</end-instance>
-+ </data-in>
-+ </input-events>
-+ <output-events>
-+ <data-out name='LOCAL_A' dataset='local_a'>
-+ <dataset name='local_a' frequency='1'
-+ initial-instance='2009-02-01T00:00Z' timezone='UTC'
-+ freq_timeunit='HOUR' end_of_duration='NONE'>
-+ <uri-template>file://#testDir/${YEAR}/${DAY}
-+ </uri-template>
-+ </dataset>
-+ <instance>${coordext:today(0,0)}</instance>
-+ </data-out>
-+ </output-events>
-+ <action>
-+ <workflow>
-+ <app-path>hdfs:///tmp/workflows/</app-path>
-+ <configuration>
-+ <property>
-+ <name>inputA</name>
-+ <value>${coord:dataIn('A')}</value>
-+ </property>
-+ <property>
-+ <name>inputB</name>
-+ <value>${coord:dataOut('LOCAL_A')}</value>
-+ </property>
-+ </configuration>
-+ </workflow>
-+ </action>
-+</coordinator-app>
-\ No newline at end of file
-Index: core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java
-===================================================================
---- core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java (revision 1485571)
-+++ core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java (working copy)
-@@ -63,28 +63,36 @@
- * <p/>
- *
- * @param function
-- * @param event
-- * @param appInst
-- * @param conf
- * @param restArg
- * @return int instanceNumber
- * @throws Exception
- */
-- public static int getInstanceNumber(String function, Element event, SyncCoordAction appInst, Configuration conf,
-- StringBuilder restArg) throws Exception {
-- ELEvaluator eval = CoordELEvaluator
-- .createInstancesELEvaluator("coord-action-create-inst", event, appInst, conf);
-- String newFunc = CoordELFunctions.evalAndWrap(eval, function);
-- int funcType = getFuncType(newFunc);
-+ public static int getInstanceNumber(String function, StringBuilder restArg) throws Exception {
-+ int funcType = getFuncType(function);
- if (funcType == CURRENT || funcType == LATEST) {
-- return parseOneArg(newFunc);
-+ return parseOneArg(function);
- }
- else {
-- return parseMoreArgs(newFunc, restArg);
-+ return parseMoreArgs(function, restArg);
- }
- }
-
-- private static int parseOneArg(String funcName) throws Exception {
-+ /**
-+ * Evaluates function for coord-action-create-inst tag
-+ * @param event
-+ * @param appInst
-+ * @param conf
-+ * @param function
-+ * @return evaluation result
-+ * @throws Exception
-+ */
-+ private static String evaluateInstanceFunction(Element event, SyncCoordAction appInst, Configuration conf,
-+ String function) throws Exception {
-+ ELEvaluator eval = CoordELEvaluator.createInstancesELEvaluator("coord-action-create-inst", event, appInst, conf);
-+ return CoordELFunctions.evalAndWrap(eval, function);
-+ }
-+
-+ public static int parseOneArg(String funcName) throws Exception {
- int firstPos = funcName.indexOf("(");
- int lastPos = funcName.lastIndexOf(")");
- if (firstPos >= 0 && lastPos > firstPos) {
-@@ -166,15 +174,15 @@
- Element eStartInst = event.getChild("start-instance", event.getNamespace());
- Element eEndInst = event.getChild("end-instance", event.getNamespace());
- if (eStartInst != null && eEndInst != null) {
-- String strStart = eStartInst.getTextTrim();
-- String strEnd = eEndInst.getTextTrim();
-+ String strStart = evaluateInstanceFunction(event, appInst, conf, eStartInst.getTextTrim());
-+ String strEnd = evaluateInstanceFunction(event, appInst, conf, eEndInst.getTextTrim());
- checkIfBothSameType(strStart, strEnd);
- StringBuilder restArg = new StringBuilder(); // To store rest
- // arguments for
- // future
- // function
-- int startIndex = getInstanceNumber(strStart, event, appInst, conf, restArg);
-+ int startIndex = getInstanceNumber(strStart, restArg);
- restArg.delete(0, restArg.length());
-- int endIndex = getInstanceNumber(strEnd, event, appInst, conf, restArg);
-+ int endIndex = getInstanceNumber(strEnd, restArg);
- if (startIndex > endIndex) {
- throw new CommandException(ErrorCode.E1010,
-Index: core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java
-===================================================================
---- core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java (revision 1485571)
-+++ core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java (working copy)
-@@ -952,7 +952,7 @@
- * @return current instance i.e. current(0) returns null if effectiveTime is earlier than Initial Instance time of
- * the dataset.
- */
-- private static Calendar getCurrentInstance(Date effectiveTime, int instanceCount[]) {
-+ public static Calendar getCurrentInstance(Date effectiveTime, int instanceCount[]) {
- Date datasetInitialInstance = getInitialInstance();
- TimeUnit dsTimeUnit = getDSTimeUnit();
- TimeZone dsTZ = getDatasetTZ();
-@@ -1294,7 +1294,7 @@
- return current;
- }
-
-- private static Calendar getEffectiveNominalTime() {
-+ public static Calendar getEffectiveNominalTime() {
- Date datasetInitialInstance = getInitialInstance();
- TimeZone dsTZ = getDatasetTZ();
- // Convert Date to Calendar for corresponding TZ
-@@ -1356,7 +1356,7 @@
- /**
- * @return dataset TimeZone
- */
-- private static TimeZone getDatasetTZ() {
-+ public static TimeZone getDatasetTZ() {
- ELEvaluator eval = ELEvaluator.getCurrent();
- return getDatasetTZ(eval);
- }
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/1caadaf2/build-tools/src/patches/OOZIE-674-v6.patch
----------------------------------------------------------------------
diff --git a/build-tools/src/patches/OOZIE-674-v6.patch b/build-tools/src/patches/OOZIE-674-v6.patch
deleted file mode 100644
index 8f2aa81..0000000
--- a/build-tools/src/patches/OOZIE-674-v6.patch
+++ /dev/null
@@ -1,481 +0,0 @@
-Index: core/src/test/java/org/apache/oozie/test/XTestCase.java
-===================================================================
---- core/src/test/java/org/apache/oozie/test/XTestCase.java (revision 1485571)
-+++ core/src/test/java/org/apache/oozie/test/XTestCase.java (working copy)
-@@ -92,13 +92,13 @@
- * From within testcases, system properties must be changed using the {@link #setSystemProperty} method.
- */
- public abstract class XTestCase extends TestCase {
-- private Map<String, String> sysProps;
-+ protected Map<String, String> sysProps;
- private String testCaseDir;
- private String testCaseConfDir;
- private String hadoopVersion;
- protected XLog log = new XLog(LogFactory.getLog(getClass()));
-
-- private static File OOZIE_SRC_DIR = null;
-+ protected static File OOZIE_SRC_DIR = null;
- private static final String OOZIE_TEST_PROPERTIES = "oozie.test.properties";
-
- public static float WAITFOR_RATIO = Float.parseFloat(System.getProperty("oozie.test.waitfor.ratio", "1"));
-Index: core/src/test/java/org/apache/oozie/test/XDataTestCase.java
-===================================================================
---- core/src/test/java/org/apache/oozie/test/XDataTestCase.java (revision 1485571)
-+++ core/src/test/java/org/apache/oozie/test/XDataTestCase.java (working copy)
-@@ -121,6 +121,25 @@
- }
-
- /**
-+ * Inserts the passed coord job
-+ * @param coord job bean
-+ * @throws Exception
-+ */
-+ protected void addRecordToCoordJobTable(CoordinatorJobBean coordJob) throws Exception {
-+ try {
-+ JPAService jpaService = Services.get().get(JPAService.class);
-+ assertNotNull(jpaService);
-+ CoordJobInsertJPAExecutor coordInsertCmd = new CoordJobInsertJPAExecutor(coordJob);
-+ jpaService.execute(coordInsertCmd);
-+ }
-+ catch (JPAExecutorException je) {
-+ je.printStackTrace();
-+ fail("Unable to insert the test coord job record to table");
-+ throw je;
-+ }
-+ }
-+
-+ /**
- * Insert coord job for testing.
- *
- * @param status coord job status
-Index: core/src/test/java/org/apache/oozie/command/coord/CoordELExtensions.java
-===================================================================
---- core/src/test/java/org/apache/oozie/command/coord/CoordELExtensions.java (revision 0)
-+++ core/src/test/java/org/apache/oozie/command/coord/CoordELExtensions.java (revision 0)
-@@ -0,0 +1,77 @@
-+/**
-+ * 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.
-+ */
-+ package org.apache.oozie.command.coord;
-+
-+import java.util.Calendar;
-+
-+import org.apache.oozie.coord.CoordELFunctions;
-+import org.apache.oozie.util.ELEvaluator;
-+
-+public class CoordELExtensions {
-+ private static final String PREFIX = "coordext:";
-+
-+ public static String ph1_today_echo(int hr, int min) {
-+ ELEvaluator eval = ELEvaluator.getCurrent();
-+ eval.setVariable(".wrap", "true");
-+ return PREFIX + "today(" + hr + ", " + min + ")"; // Unresolved
-+ }
-+
-+ public static String ph2_today_inst(int hr, int min) throws Exception {
-+ Calendar nominalInstanceCal = CoordELFunctions.getEffectiveNominalTime();
-+ if (nominalInstanceCal == null) {
-+ return "";
-+ }
-+
-+ Calendar dsInstanceCal = Calendar.getInstance(CoordELFunctions.getDatasetTZ());
-+ dsInstanceCal.setTime(nominalInstanceCal.getTime());
-+ dsInstanceCal.set(Calendar.HOUR_OF_DAY, hr);
-+ dsInstanceCal.set(Calendar.MINUTE, min);
-+ dsInstanceCal.set(Calendar.SECOND, 0);
-+ dsInstanceCal.set(Calendar.MILLISECOND, 0);
-+
-+ int[] instCnt = new int[1];
-+ Calendar compInstCal = CoordELFunctions
-+ .getCurrentInstance(dsInstanceCal.getTime(), instCnt);
-+ if (compInstCal == null) {
-+ return "";
-+ }
-+ int dsInstanceCnt = instCnt[0];
-+
-+ compInstCal = CoordELFunctions.getCurrentInstance(nominalInstanceCal.getTime(), instCnt);
-+ if (compInstCal == null) {
-+ return "";
-+ }
-+ int nominalInstanceCnt = instCnt[0];
-+
-+ return "coord:current(" + (dsInstanceCnt - nominalInstanceCnt) + ")";
-+ }
-+
-+ public static String ph2_today(int hr, int min) throws Exception {
-+ String inst = ph2_today_inst(hr, min);
-+ return evaluateCurrent(inst);
-+ }
-+
-+ private static String evaluateCurrent(String curExpr) throws Exception {
-+ if (curExpr.equals("")) {
-+ return curExpr;
-+ }
-+
-+ int inst = CoordCommandUtils.parseOneArg(curExpr);
-+ return CoordELFunctions.ph2_coord_current(inst);
-+ }
-+}
-\ No newline at end of file
-Index: core/src/test/java/org/apache/oozie/command/coord/TestCoordELExtensions.java
-===================================================================
---- core/src/test/java/org/apache/oozie/command/coord/TestCoordELExtensions.java (revision 0)
-+++ core/src/test/java/org/apache/oozie/command/coord/TestCoordELExtensions.java (revision 0)
-@@ -0,0 +1,82 @@
-+/**
-+ * 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.
-+ */
-+ package org.apache.oozie.command.coord;
-+
-+import java.io.File;
-+import java.util.Date;
-+import java.util.HashMap;
-+
-+import org.apache.oozie.CoordinatorActionBean;
-+import org.apache.oozie.CoordinatorJobBean;
-+import org.apache.oozie.client.CoordinatorJob;
-+import org.apache.oozie.service.Services;
-+import org.apache.oozie.store.CoordinatorStore;
-+import org.apache.oozie.store.StoreException;
-+import org.apache.oozie.test.XDataTestCase;
-+import org.apache.oozie.util.DateUtils;
-+
-+public class TestCoordELExtensions extends XDataTestCase {
-+ private Services services;
-+ private String[] excludedServices = { "org.apache.oozie.service.StatusTransitService",
-+ "org.apache.oozie.service.PauseTransitService",
-+ "org.apache.oozie.service.RecoveryService" };
-+
-+ @Override
-+ protected void setUp() throws Exception {
-+ sysProps = new HashMap<String, String>();
-+ setSystemProperty("oozie.test.config.file", new File(OOZIE_SRC_DIR,
-+ "core/src/test/resources/oozie-site-coordel.xml").getAbsolutePath());
-+ super.setUp();
-+ services = new Services();
-+ setClassesToBeExcluded(services.getConf(), excludedServices);
-+ services.init();
-+ cleanUpDBTables();
-+ }
-+
-+ @Override
-+ protected void tearDown() throws Exception {
-+ services.destroy();
-+ super.tearDown();
-+ }
-+
-+ public void testCoordELActionMater() throws Exception {
-+ Date startTime = DateUtils.parseDateUTC("2009-03-06T010:00Z");
-+ Date endTime = DateUtils.parseDateUTC("2009-03-07T12:00Z");
-+ CoordinatorJobBean job = createCoordJob("coord-job-for-elext.xml",
-+ CoordinatorJob.Status.PREMATER, startTime, endTime, false, false, 0);
-+ addRecordToCoordJobTable(job);
-+
-+ new CoordActionMaterializeCommand(job.getId(), startTime, endTime).call();
-+ checkCoordAction(job.getId() + "@1");
-+ }
-+
-+ protected CoordinatorActionBean checkCoordAction(String actionId) throws StoreException {
-+ CoordinatorStore store = new CoordinatorStore(false);
-+ try {
-+ CoordinatorActionBean action = store.getCoordinatorAction(actionId, false);
-+ assertEquals(
-+ "file://#testDir/2009/03/06/00/_SUCCESS#file://#testDir/2009/03/05/23/_SUCCESS",
-+ action.getMissingDependencies());
-+ return action;
-+ } catch (StoreException se) {
-+ se.printStackTrace();
-+ fail("Action ID " + actionId + " was not stored properly in db");
-+ }
-+ return null;
-+ }
-+}
-\ No newline at end of file
-Index: core/src/test/resources/oozie-site-coordel.xml
-===================================================================
---- core/src/test/resources/oozie-site-coordel.xml (revision 0)
-+++ core/src/test/resources/oozie-site-coordel.xml (revision 0)
-@@ -0,0 +1,65 @@
-+<?xml version="1.0" encoding="UTF-8"?>
-+<!--
-+ 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.
-+-->
-+<configuration>
-+ <property>
-+ <name>oozie.service.ELService.ext.functions.coord-job-submit-instances
-+ </name>
-+ <value>
-+ coordext:today=org.apache.oozie.command.coord.CoordELExtensions#ph1_today_echo
-+ </value>
-+ <description>
-+ EL functions declarations, separated by commas,
-+ format is [PREFIX:]NAME=CLASS#METHOD.
-+ This property is a
-+ convenience property to add extensions to the built in
-+ executors without having to
-+ include all the built in ones.
-+ </description>
-+ </property>
-+ <property>
-+ <name>oozie.service.ELService.ext.functions.coord-action-create-inst
-+ </name>
-+ <value>
-+ coordext:today=org.apache.oozie.command.coord.CoordELExtensions#ph2_today_inst
-+ </value>
-+ <description>
-+ EL functions declarations, separated by commas,
-+ format is [PREFIX:]NAME=CLASS#METHOD.
-+ This property is a
-+ convenience property to add extensions to the built in
-+ executors without having to
-+ include all the built in ones.
-+ </description>
-+ </property>
-+ <property>
-+ <name>oozie.service.ELService.ext.functions.coord-action-create
-+ </name>
-+ <value>
-+ coordext:today=org.apache.oozie.command.coord.CoordELExtensions#ph2_today
-+ </value>
-+ <description>
-+ EL functions declarations, separated by commas,
-+ format is [PREFIX:]NAME=CLASS#METHOD.
-+ This property is a
-+ convenience property to add extensions to the built in
-+ executors without having to
-+ include all the built in ones.
-+ </description>
-+ </property>
-+</configuration>
-\ No newline at end of file
-Index: core/src/test/resources/coord-job-for-elext.xml
-===================================================================
---- core/src/test/resources/coord-job-for-elext.xml (revision 0)
-+++ core/src/test/resources/coord-job-for-elext.xml (revision 0)
-@@ -0,0 +1,63 @@
-+<!--
-+ 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.
-+-->
-+<coordinator-app xmlns='uri:oozie:coordinator:0.2' name='NAME'
-+ frequency="1" start='2009-02-01T01:00Z' end='2009-02-03T23:59Z'
-+ timezone='UTC' freq_timeunit='DAY' end_of_duration='NONE'>
-+ <controls>
-+ <timeout>10</timeout>
-+ <concurrency>2</concurrency>
-+ <execution>LIFO</execution>
-+ </controls>
-+ <input-events>
-+ <data-in name='A' dataset='a'>
-+ <dataset name='a' frequency='1' initial-instance='2009-02-01T00:00Z'
-+ timezone='UTC' freq_timeunit='HOUR' end_of_duration='NONE'>
-+ <uri-template>file://#testDir/${YEAR}/${MONTH}/${DAY}/${HOUR}
-+ </uri-template>
-+ </dataset>
-+ <start-instance>${coordext:today(-1,0)}</start-instance>
-+ <end-instance>${coordext:today(0,0)}</end-instance>
-+ </data-in>
-+ </input-events>
-+ <output-events>
-+ <data-out name='LOCAL_A' dataset='local_a'>
-+ <dataset name='local_a' frequency='1'
-+ initial-instance='2009-02-01T00:00Z' timezone='UTC'
-+ freq_timeunit='HOUR' end_of_duration='NONE'>
-+ <uri-template>file://#testDir/${YEAR}/${DAY}
-+ </uri-template>
-+ </dataset>
-+ <instance>${coordext:today(0,0)}</instance>
-+ </data-out>
-+ </output-events>
-+ <action>
-+ <workflow>
-+ <app-path>hdfs:///tmp/workflows/</app-path>
-+ <configuration>
-+ <property>
-+ <name>inputA</name>
-+ <value>${coord:dataIn('A')}</value>
-+ </property>
-+ <property>
-+ <name>inputB</name>
-+ <value>${coord:dataOut('LOCAL_A')}</value>
-+ </property>
-+ </configuration>
-+ </workflow>
-+ </action>
-+</coordinator-app>
-\ No newline at end of file
-Index: core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java
-===================================================================
---- core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java (revision 1485571)
-+++ core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java (working copy)
-@@ -63,28 +63,36 @@
- * <p/>
- *
- * @param function
-- * @param event
-- * @param appInst
-- * @param conf
- * @param restArg
- * @return int instanceNumber
- * @throws Exception
- */
-- public static int getInstanceNumber(String function, Element event, SyncCoordAction appInst, Configuration conf,
-- StringBuilder restArg) throws Exception {
-- ELEvaluator eval = CoordELEvaluator
-- .createInstancesELEvaluator("coord-action-create-inst", event, appInst, conf);
-- String newFunc = CoordELFunctions.evalAndWrap(eval, function);
-- int funcType = getFuncType(newFunc);
-+ public static int getInstanceNumber(String function, StringBuilder restArg) throws Exception {
-+ int funcType = getFuncType(function);
- if (funcType == CURRENT || funcType == LATEST) {
-- return parseOneArg(newFunc);
-+ return parseOneArg(function);
- }
- else {
-- return parseMoreArgs(newFunc, restArg);
-+ return parseMoreArgs(function, restArg);
- }
- }
-
-- private static int parseOneArg(String funcName) throws Exception {
-+ /**
-+ * Evaluates function for coord-action-create-inst tag
-+ * @param event
-+ * @param appInst
-+ * @param conf
-+ * @param function
-+ * @return evaluation result
-+ * @throws Exception
-+ */
-+ private static String evaluateInstanceFunction(Element event, SyncCoordAction appInst, Configuration conf,
-+ String function) throws Exception {
-+ ELEvaluator eval = CoordELEvaluator.createInstancesELEvaluator("coord-action-create-inst", event, appInst, conf);
-+ return CoordELFunctions.evalAndWrap(eval, function);
-+ }
-+
-+ public static int parseOneArg(String funcName) throws Exception {
- int firstPos = funcName.indexOf("(");
- int lastPos = funcName.lastIndexOf(")");
- if (firstPos >= 0 && lastPos > firstPos) {
-@@ -181,17 +189,17 @@
- Element eStartInst = event.getChild("start-instance", event.getNamespace());
- Element eEndInst = event.getChild("end-instance", event.getNamespace());
- if (eStartInst != null && eEndInst != null) {
-- String strStart = eStartInst.getTextTrim();
-- String strEnd = eEndInst.getTextTrim();
-+ String strStart = evaluateInstanceFunction(event, appInst, conf, eStartInst.getTextTrim());
-+ String strEnd = evaluateInstanceFunction(event, appInst, conf, eEndInst.getTextTrim());
- checkIfBothSameType(strStart, strEnd);
- StringBuilder restArg = new StringBuilder(); // To store rest
- // arguments for
- // future
- // function
-- int startIndex = getInstanceNumber(strStart, event, appInst, conf, restArg);
-+ int startIndex = getInstanceNumber(strStart, restArg);
- String startRestArg = restArg.toString();
- restArg.delete(0, restArg.length());
-- int endIndex = getInstanceNumber(strEnd, event, appInst, conf, restArg);
-+ int endIndex = getInstanceNumber(strEnd, restArg);
- String endRestArg = restArg.toString();
- int funcType = getFuncType(strStart);
- if (funcType == OFFSET) {
-Index: core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java
-===================================================================
---- core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java (revision 1485571)
-+++ core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java (working copy)
-@@ -1250,7 +1250,7 @@
- * @return current instance i.e. current(0) returns null if effectiveTime is earlier than Initial Instance time of
- * the dataset.
- */
-- private static Calendar getCurrentInstance(Date effectiveTime, int instanceCount[]) {
-+ public static Calendar getCurrentInstance(Date effectiveTime, int instanceCount[]) {
- ELEvaluator eval = ELEvaluator.getCurrent();
- return getCurrentInstance(effectiveTime, instanceCount, eval);
- }
-@@ -1294,7 +1294,7 @@
- return current;
- }
-
-- private static Calendar getEffectiveNominalTime() {
-+ public static Calendar getEffectiveNominalTime() {
- Date datasetInitialInstance = getInitialInstance();
- TimeZone dsTZ = getDatasetTZ();
- // Convert Date to Calendar for corresponding TZ
-@@ -1356,7 +1356,7 @@
- /**
- * @return dataset TimeZone
- */
-- private static TimeZone getDatasetTZ() {
-+ public static TimeZone getDatasetTZ() {
- ELEvaluator eval = ELEvaluator.getCurrent();
- return getDatasetTZ(eval);
- }
-Index: bin/test-patch-05-patch-raw-analysis
-===================================================================
---- bin/test-patch-05-patch-raw-analysis (revision 1485571)
-+++ bin/test-patch-05-patch-raw-analysis (working copy)
-@@ -30,7 +30,8 @@
- }
- ###############################################################################
- printUsage() {
-- echo "Usage: $0 --taskname | (--op=pre|post|report --tempdir=<TEMP DIR> --reportdir=<REPORT DIR> --summaryfile=<SUMMARY FILE>)"
-+ echo "Usage: $0 --taskname | (--op=pre|post|report --tempdir=<TEMP DIR> --reportdir=<REPORT DIR> --summaryfile=<SUMMARY FILE> "
-+ echo "--patchfile=<PATCH FILE>)"
- echo
- }
- ###############################################################################
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/1caadaf2/build-tools/src/patches/OOZIE-882.patch
----------------------------------------------------------------------
diff --git a/build-tools/src/patches/OOZIE-882.patch b/build-tools/src/patches/OOZIE-882.patch
deleted file mode 100644
index edcbf1d..0000000
--- a/build-tools/src/patches/OOZIE-882.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Index: core/src/test/java/org/apache/oozie/coord/TestCoordELEvaluator.java
-===================================================================
---- core/src/test/java/org/apache/oozie/coord/TestCoordELEvaluator.java (revision 1352500)
-+++ core/src/test/java/org/apache/oozie/coord/TestCoordELEvaluator.java (working copy)
-@@ -123,7 +123,8 @@
- }
-
- public void testCreateDataEvaluator() throws Exception {
-- String jobXml = "<coordinator-app name=\"mycoordinator-app\" start=\"2009-02-01T01:00GMT\" end=\"2009-02-03T23:59GMT\" frequency=\"720\"";
-+ String jobXml = "<coordinator-app name=\"mycoordinator-app\" start=\"2009-02-01T01:00GMT\" end=\"2009-02-03T23:59GMT\" timezone=\"UTC\"";
-+ jobXml += " frequency=\"720\" freq_timeunit=\"MINUTE\"";
- jobXml += " action-nominal-time='2009-09-01T00:00Z' action-actual-time='2010-10-01T00:00Z'>";
- jobXml += "<input-events><data-in name=\"A\" dataset=\"a\"><uris>file:///tmp/coord/US/2009/1/30|file:///tmp/coord/US/2009/1/31</uris>";
- jobXml += "<dataset name=\"a\" frequency=\"1440\" initial-instance=\"2009-01-01T00:00Z\">";
-Index: core/src/main/java/org/apache/oozie/coord/CoordELEvaluator.java
-===================================================================
---- core/src/main/java/org/apache/oozie/coord/CoordELEvaluator.java (revision 1352500)
-+++ core/src/main/java/org/apache/oozie/coord/CoordELEvaluator.java (working copy)
-@@ -143,6 +143,9 @@
- String strNominalTime = eJob.getAttributeValue("action-nominal-time");
- if (strNominalTime != null) {
- appInst.setNominalTime(DateUtils.parseDateUTC(strNominalTime));
-+ appInst.setTimeZone(DateUtils.getTimeZone(eJob.getAttributeValue("timezone")));
-+ appInst.setFrequency(Integer.parseInt(eJob.getAttributeValue("frequency")));
-+ appInst.setTimeUnit(TimeUnit.valueOf(eJob.getAttributeValue("freq_timeunit")));
- appInst.setActionId(actionId);
- appInst.setName(eJob.getAttributeValue("name"));
- }
[2/5] git commit: FALCON-678 Falcon's default port has changed to
15443. Contributed by Balu Vellanki
Posted by ve...@apache.org.
FALCON-678 Falcon's default port has changed to 15443. Contributed by Balu Vellanki
Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/04efd178
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/04efd178
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/04efd178
Branch: refs/heads/master
Commit: 04efd178111f3e4caa73d754542341c56ca6c2f9
Parents: 78e486c
Author: Venkatesh Seetharam <ve...@apache.org>
Authored: Thu Oct 16 13:54:46 2014 -0700
Committer: Venkatesh Seetharam <ve...@apache.org>
Committed: Thu Oct 16 13:54:46 2014 -0700
----------------------------------------------------------------------
CHANGES.txt | 3 ++
docs/src/site/twiki/InstallationSteps.twiki | 8 ++--
prism/src/main/java/org/apache/falcon/Main.java | 41 +++++++++++++++-----
3 files changed, 39 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/04efd178/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 8b4ab1e..e2c976b 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -117,6 +117,9 @@ Trunk (Unreleased)
OPTIMIZATIONS
BUG FIXES
+ FALCON-678 Falcon's default port has changed to 15443 (Balu Vellanki via
+ Venkatesh Seetharam)
+
FALCON-482 Concurrent requests made using Proxy Oozie client fail
(Sowmya Ramesh via Venkatesh Seetharam)
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/04efd178/docs/src/site/twiki/InstallationSteps.twiki
----------------------------------------------------------------------
diff --git a/docs/src/site/twiki/InstallationSteps.twiki b/docs/src/site/twiki/InstallationSteps.twiki
index 0e3bfcf..9cddcbb 100644
--- a/docs/src/site/twiki/InstallationSteps.twiki
+++ b/docs/src/site/twiki/InstallationSteps.twiki
@@ -176,9 +176,11 @@ export FALCON_SERVER_OPTS="-Djava.awt.headless=true -Djava.security.krb5.realm=
bin/falcon-start [-port <port>]
</verbatim>
-By default,
-* falcon server starts at port 15443 (https) by default . To change the port, use -port option
- * falcon.enableTLS can be set to true or false explicitly to enable SSL, if not port that end with 443 will automatically put falcon on https://
+By default,
+* If falcon.enableTLS is set to true explicitly or not set at all, falcon starts at port 15443 on https:// by default.
+* If falcon.enableTLS is set to false explicitly, falcon starts at port 15000 on http://.
+* To change the port, use -port option.
+ * If falcon.enableTLS is not set explicitly, port that ends with 443 will automatically put falcon on https://. Any other port will put falcon on http://.
* falcon server starts embedded active mq. To control this behaviour, set the following system properties using -D option in environment variable FALCON_OPTS:
* falcon.embeddedmq=<true/false> - Should server start embedded active mq, default true
* falcon.embeddedmq.port=<port> - Port for embedded active mq, default 61616
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/04efd178/prism/src/main/java/org/apache/falcon/Main.java
----------------------------------------------------------------------
diff --git a/prism/src/main/java/org/apache/falcon/Main.java b/prism/src/main/java/org/apache/falcon/Main.java
index 28a3c06..de9f657 100644
--- a/prism/src/main/java/org/apache/falcon/Main.java
+++ b/prism/src/main/java/org/apache/falcon/Main.java
@@ -24,6 +24,7 @@ import org.apache.commons.cli.GnuParser;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
+import org.apache.commons.lang.StringUtils;
import org.apache.falcon.util.BuildProperties;
import org.apache.falcon.util.EmbeddedServer;
import org.slf4j.Logger;
@@ -63,16 +64,45 @@ public final class Main {
CommandLine cmd = parseArgs(args);
String projectVersion = BuildProperties.get().getProperty("project.version");
String appPath = "webapp/target/falcon-webapp-" + projectVersion;
- int appPort = 15443;
if (cmd.hasOption(APP_PATH)) {
appPath = cmd.getOptionValue(APP_PATH);
}
+ final String enableTLSFlag = StartupProperties.get().getProperty("falcon.enableTLS");
+ final int appPort = getApplicationPort(cmd, enableTLSFlag);
+ final boolean enableTLS = isTLSEnabled(enableTLSFlag, appPort);
+ StartupProperties.get().setProperty("falcon.enableTLS", String.valueOf(enableTLS));
+
+ startEmbeddedMQIfEnabled();
+
+ LOG.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
+ LOG.info("Server starting with TLS ? {} on port {}", enableTLS, appPort);
+ LOG.info("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
+ EmbeddedServer server = EmbeddedServer.newServer(appPort, appPath, enableTLS);
+ server.start();
+ }
+
+ private static int getApplicationPort(CommandLine cmd, String enableTLSFlag) {
+ final int appPort;
if (cmd.hasOption(APP_PORT)) {
appPort = Integer.valueOf(cmd.getOptionValue(APP_PORT));
+ } else {
+ // default : falcon.enableTLS is true
+ appPort = StringUtils.isEmpty(enableTLSFlag)
+ || enableTLSFlag.equals("true") ? 15443 : 15000;
}
+ return appPort;
+ }
+
+ private static boolean isTLSEnabled(String enableTLSFlag, int appPort) {
+ return Boolean.valueOf(StringUtils.isEmpty(enableTLSFlag)
+ ? System.getProperty("falcon.enableTLS", (appPort % 1000) == 443 ? "true" : "false")
+ : enableTLSFlag);
+ }
+
+ private static void startEmbeddedMQIfEnabled() throws Exception {
boolean startActiveMq = Boolean.valueOf(System.getProperty("falcon.embeddedmq", "true"));
if (startActiveMq) {
String dataDir = System.getProperty("falcon.embeddedmq.data", "target/");
@@ -87,14 +117,5 @@ public final class Main {
broker.setSchedulerSupport(true);
broker.start();
}
-
- boolean enableTLS = Boolean.valueOf(StartupProperties.get().getProperty("falcon.enableTLS",
- System.getProperty("falcon.enableTLS", (appPort % 1000) == 443 ? "true" : "false")));
- LOG.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
- LOG.info("Server started with TLS ?" + enableTLS);
- LOG.info("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
- StartupProperties.get().setProperty("falcon.enableTLS", String.valueOf(enableTLS));
- EmbeddedServer server = EmbeddedServer.newServer(appPort, appPath, enableTLS);
- server.start();
}
}
[4/5] git commit: FALCON-803 Instances displayed on Dashboard entity
page should be sorted by startTime. Contributed by Balu Vellanki
Posted by ve...@apache.org.
FALCON-803 Instances displayed on Dashboard entity page should be sorted by startTime. Contributed by Balu Vellanki
Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/c95b55b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/c95b55b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/c95b55b2
Branch: refs/heads/master
Commit: c95b55b2cefa0c9ea9864f885521b51a3f18fa2a
Parents: 957aab1
Author: Venkatesh Seetharam <ve...@apache.org>
Authored: Thu Oct 16 14:00:42 2014 -0700
Committer: Venkatesh Seetharam <ve...@apache.org>
Committed: Thu Oct 16 14:00:42 2014 -0700
----------------------------------------------------------------------
CHANGES.txt | 3 +++
html5-ui/js/falcon-entity.js | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/c95b55b2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 222c351..a393649 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -117,6 +117,9 @@ Trunk (Unreleased)
OPTIMIZATIONS
BUG FIXES
+ FALCON-803 Instances displayed on Dashboard entity page should be sorted
+ by startTime (Balu Vellanki via Venkatesh Seetharam)
+
FALCON-799 Falcon Dashboard unusable when server is started with umask 077
(Balu Vellanki via Venkatesh Seetharam)
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/c95b55b2/html5-ui/js/falcon-entity.js
----------------------------------------------------------------------
diff --git a/html5-ui/js/falcon-entity.js b/html5-ui/js/falcon-entity.js
index f5563a2..bb6a156 100644
--- a/html5-ui/js/falcon-entity.js
+++ b/html5-ui/js/falcon-entity.js
@@ -45,7 +45,7 @@
}
function loadInstance(start, end) {
- falcon.getJson(url('instance/status') + '?start=' + start + '&end=' + end, function (data) {
+ falcon.getJson(url('instance/status') + '?orderBy=startTime&start=' + start + '&end=' + end, function (data) {
if (data.instances == null)
return;