Repository: falcon Updated Branches: refs/heads/master 44d5028f6 -> 5ecae18ec
FALCON 1559 Config changes required for native scheduler Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/5ecae18e Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/5ecae18e Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/5ecae18e Branch: refs/heads/master Commit: 5ecae18ec10f7e1d5eca70e207fd4da768e5b127 Parents: 44d5028 Author: Pallavi Rao <[email protected]> Authored: Thu Oct 29 15:39:46 2015 +0530 Committer: Pallavi Rao <[email protected]> Committed: Thu Oct 29 15:39:46 2015 +0530 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ .../apache/falcon/state/store/AbstractStateStore.java | 2 +- .../falcon/workflow/engine/DAGEngineFactory.java | 9 ++++++++- src/conf/startup.properties | 13 +++++++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/5ecae18e/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 9305340..b1f9269 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,8 @@ Trunk (Unreleased) INCOMPATIBLE CHANGES NEW FEATURES + FALCON-1559 Config changes required for native scheduler (Pallavi Rao) + FALCON-1459 Ability to import from database(Venkat Ramachandran via Sowmya Ramesh) FALCON-1213 Base framework of the native scheduler(Pallavi Rao) http://git-wip-us.apache.org/repos/asf/falcon/blob/5ecae18e/scheduler/src/main/java/org/apache/falcon/state/store/AbstractStateStore.java ---------------------------------------------------------------------- diff --git a/scheduler/src/main/java/org/apache/falcon/state/store/AbstractStateStore.java b/scheduler/src/main/java/org/apache/falcon/state/store/AbstractStateStore.java index 67e047f..ba3d5fd 100644 --- a/scheduler/src/main/java/org/apache/falcon/state/store/AbstractStateStore.java +++ b/scheduler/src/main/java/org/apache/falcon/state/store/AbstractStateStore.java @@ -79,7 +79,7 @@ public abstract class AbstractStateStore implements StateStore, ConfigurationCha */ public static synchronized StateStore get() { if (stateStore == null) { - String storeImpl = StartupProperties.get().getProperty("state.store", + String storeImpl = StartupProperties.get().getProperty("state.store.impl", "org.apache.falcon.state.store.InMemoryStateStore"); try { stateStore = ReflectionUtils.getInstanceByClassName(storeImpl); http://git-wip-us.apache.org/repos/asf/falcon/blob/5ecae18e/scheduler/src/main/java/org/apache/falcon/workflow/engine/DAGEngineFactory.java ---------------------------------------------------------------------- diff --git a/scheduler/src/main/java/org/apache/falcon/workflow/engine/DAGEngineFactory.java b/scheduler/src/main/java/org/apache/falcon/workflow/engine/DAGEngineFactory.java index e400326..ad2bd91 100644 --- a/scheduler/src/main/java/org/apache/falcon/workflow/engine/DAGEngineFactory.java +++ b/scheduler/src/main/java/org/apache/falcon/workflow/engine/DAGEngineFactory.java @@ -37,7 +37,14 @@ public final class DAGEngineFactory { } public static DAGEngine getDAGEngine(Cluster cluster) throws FalconException { - return getDAGEngine(cluster.getName()); + String clusterName = cluster.getName(); + // Cache the DAGEngines for every cluster. + if (!DAG_ENGINES.containsKey(clusterName)) { + DAG_ENGINES.put(clusterName, + (DAGEngine) ReflectionUtils.getInstance(DAG_ENGINE, Cluster.class, cluster)); + } + + return DAG_ENGINES.get(clusterName); } public static DAGEngine getDAGEngine(String clusterName) throws FalconException { http://git-wip-us.apache.org/repos/asf/falcon/blob/5ecae18e/src/conf/startup.properties ---------------------------------------------------------------------- diff --git a/src/conf/startup.properties b/src/conf/startup.properties index dc9e393..ce6e91f 100644 --- a/src/conf/startup.properties +++ b/src/conf/startup.properties @@ -25,6 +25,11 @@ ######### Implementation classes ######### ## DONT MODIFY UNLESS SURE ABOUT CHANGE ## +## If you wish to use Falcon native scheduler uncomment and enable the properties below.## +#*.dag.engine.impl=org.apache.falcon.workflow.engine.OozieDAGEngine +#*.state.store.impl=org.apache.falcon.state.store.jdbc.JdbcStateStore +## If you wish to use Falcon native scheduler set the workflow engine to FalconWorkflowEngine instead of OozieWorkflowEngine. ## +#*.workflow.engine.impl=org.apache.falcon.workflow.engine.FalconWorkflowEngine *.workflow.engine.impl=org.apache.falcon.workflow.engine.OozieWorkflowEngine *.lifecycle.engine.impl=org.apache.falcon.lifecycle.engine.oozie.OoziePolicyBuilderFactory *.oozie.process.workflow.builder=org.apache.falcon.workflow.OozieProcessWorkflowBuilder @@ -47,6 +52,12 @@ org.apache.falcon.service.LogCleanupService,\ org.apache.falcon.service.GroupsService,\ org.apache.falcon.service.ProxyUserService +## If you wish to use Falcon native scheduler add the commented out services below to application.services ## +# org.apache.falcon.notification.service.impl.JobCompletionService,\ +# org.apache.falcon.notification.service.impl.SchedulerService,\ +# org.apache.falcon.notification.service.impl.AlarmService,\ +# org.apache.falcon.notification.service.impl.DataAvailabilityService,\ +# org.apache.falcon.execution.FalconExecutionService ##### Prism Services ##### prism.application.services=org.apache.falcon.service.LifecyclePolicyMap,\ @@ -65,6 +76,8 @@ prism.application.services=org.apache.falcon.service.LifecyclePolicyMap,\ org.apache.falcon.entity.store.FeedLocationStore,\ org.apache.falcon.service.FeedSLAMonitoringService,\ org.apache.falcon.service.SharedLibraryHostingService +## If you wish to use Falcon native scheduler, add the State store as a configstore listener. ## +# org.apache.falcon.state.store.jdbc.JdbcStateStore ##### Prism Configuration Store Change listeners ##### prism.configstore.listeners=org.apache.falcon.entity.v0.EntityGraph,\
