From: <st...@us...> - 2009-09-06 19:30:56
|
Revision: 7835 http://smartfrog.svn.sourceforge.net/smartfrog/?rev=7835&view=rev Author: steve_l Date: 2009-09-06 19:30:45 +0000 (Sun, 06 Sep 2009) Log Message: ----------- SFOS-1040 master and worker templates and targets are working Modified Paths: -------------- trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/examples/cluster-driven.sf trunk/core/extras/hadoop-cluster/build.xml trunk/core/extras/hadoop-cluster/src/org/smartfrog/extras/hadoop/cluster/services/bondable/components.sf Added Paths: ----------- trunk/core/extras/hadoop-cluster/src/org/smartfrog/extras/hadoop/cluster/services/bondable/checkconfig.sf Modified: trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/examples/cluster-driven.sf =================================================================== --- trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/examples/cluster-driven.sf 2009-09-04 19:46:12 UTC (rev 7834) +++ trunk/core/components/hadoop/src/org/smartfrog/services/hadoop/examples/cluster-driven.sf 2009-09-06 19:30:45 UTC (rev 7835) @@ -176,6 +176,7 @@ */ ConfiguredHdfsCluster extends Compound { + description "A compound with a cluster, a namenode and a datanode "; //two flags which control whether or not the node is live or not master true; worker true; @@ -201,6 +202,7 @@ ConfiguredCluster extends ConfiguredHdfsCluster { + description (ConfiguredHdfsCluster:description ++ " and a jobtracker and tasktracker "); jobtracker.enabled master; tasktracker.enabled worker; Modified: trunk/core/extras/hadoop-cluster/build.xml =================================================================== --- trunk/core/extras/hadoop-cluster/build.xml 2009-09-04 19:46:12 UTC (rev 7834) +++ trunk/core/extras/hadoop-cluster/build.xml 2009-09-06 19:30:45 UTC (rev 7835) @@ -347,13 +347,39 @@ <sshcommand command="ls -l ${ssh.bin.dir}" /> </target> + <target name="ready-to-deploy-master" + depends="ready-to-deploy"> + <property name="binding.master.hostname" value="localhost"/> + <property name="binding.tasktracker.slots" value="4"/> - <target name="master"> - <property name="binding.master.hostname" value="localhost"/> + <echo>binding.master.hostname = ${binding.master.hostname}</echo> + + + </target> + + <target name="master" + description="Deploy the master node" + depends="ready-to-deploy-master"> <deploy> + <syspropertyset> + <propertyref prefix="binding."/> + </syspropertyset> <application name="master" descriptor="/org/smartfrog/extras/hadoop/cluster/services/bondable/master.sf"/> </deploy> </target> + + <target name="worker" + description="Deploy a worker node" + depends="ready-to-deploy-master"> + <deploy> + <syspropertyset> + <propertyref prefix="binding."/> + </syspropertyset> + <application name="worker" + descriptor="/org/smartfrog/extras/hadoop/cluster/services/bondable/worker.sf"/> + </deploy> + </target> + </project> \ No newline at end of file Copied: trunk/core/extras/hadoop-cluster/src/org/smartfrog/extras/hadoop/cluster/services/bondable/checkconfig.sf (from rev 7834, trunk/core/extras/hadoop-cluster/src/org/smartfrog/extras/hadoop/cluster/services/bondable/worker.sf) =================================================================== --- trunk/core/extras/hadoop-cluster/src/org/smartfrog/extras/hadoop/cluster/services/bondable/checkconfig.sf (rev 0) +++ trunk/core/extras/hadoop-cluster/src/org/smartfrog/extras/hadoop/cluster/services/bondable/checkconfig.sf 2009-09-06 19:30:45 UTC (rev 7835) @@ -0,0 +1,23 @@ +/** (C) Copyright 2009 Hewlett-Packard Development Company, LP + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + For more information: www.smartfrog.org + + */ + +#include "/org/smartfrog/extras/hadoop/cluster/services/bondable/components.sf" + + sfConfig CheckMasterWorkerConfig; \ No newline at end of file Modified: trunk/core/extras/hadoop-cluster/src/org/smartfrog/extras/hadoop/cluster/services/bondable/components.sf =================================================================== --- trunk/core/extras/hadoop-cluster/src/org/smartfrog/extras/hadoop/cluster/services/bondable/components.sf 2009-09-04 19:46:12 UTC (rev 7834) +++ trunk/core/extras/hadoop-cluster/src/org/smartfrog/extras/hadoop/cluster/services/bondable/components.sf 2009-09-06 19:30:45 UTC (rev 7835) @@ -99,11 +99,16 @@ */ binding.tasktracker.slots IPROPERTY binding.tasktracker.slots; + + + /** by default this will deploy nothing; you have to opt for either a master or a worker */ + + BindableCluster extends FullCluster { master false; @@ -119,6 +124,14 @@ } /** + * Deploys nothing, but is a preflight check of all the bindings + */ +CheckMasterWorkerConfig extends BindableCluster { + +} + + +/** * the master node */ MasterNode extends BindableCluster { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |