[jboss-user] [Clustering/JBoss] - Pull New Deployments on Startup Jboss 4.2.3

ozguy do-not-reply at jboss.com
Fri Apr 24 16:49:49 EDT 2009


Hi,

Having some problems with Jboss clustering and just wanted to see if i have missed anything importent.

Problem: Whenever a node startsup, it always pulls the deployed applications from the Coordinator node even if that application is already on the node that which just restarted. This is causing a huge delay for the node to startup as it pulls all the deployments and i have more than 50 Apps which are huge in size.

Example:
Cluster with 2 Node A and B. 
1. Deploy X.war  file on Node A 
2. File pushed to Node B ( all good here )
3. restart Node A
4. Node A pulls the X.war from Node B (** This is not a desired behaviour as X.war already exists on the Node A and also timestamp ( last mod date ) on X.war is not changed, so this is not a new deployment.


Going throug the FarmService code i can see the bug, but am not sure if its really a bug or a design issue.

line 174: DeployedURL du = (DeployedURL)parentDUMap.get(depName);
parentDUMap is always empty on startup as the pull new deployment is called form the startService method, therefore all the farmed applications are getting pulled by the node that just started.

Does anyone has  come across this  issuse ?


protected void pullNewDeployments(HAPartition partition, HashMap farmed)
  168      {
  169         log.info("**** pullNewDeployments ****");
  170         Iterator it = farmed.keySet().iterator();
  171         while (it.hasNext())
  172         {
  173            String depName = (String)it.next();
  174            DeployedURL du = (DeployedURL)parentDUMap.get(depName);
  175            Date last = (Date)farmed.get(depName);
  176            if (du != null)
  177            {
  178               Date theLast = new Date(du.getFile().lastModified());
  179               if (!theLast.before(last))
  180               {
  181                  continue;
  182               }
  183            }
  184   
  185            String parentName = depName.substring(0, depName.indexOf('/'));
  186            File destFile = new File(depName);
  187            try
  188            {
  189               mFileTransfer.pull(destFile,parentName);
  190               synchronized (remotelyDeployed)
  191               {
  192                  remotelyDeployed.add (destFile.getName());
  193               }
  194            }
  195            catch(ClusterFileTransferException e)
  196            {
  197               // log the exception and continue with the next deployment
  198               this.logException(e);
  199            }
  200         }
  201      }



 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226696#4226696

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226696



More information about the jboss-user mailing list