[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Clustering: Queues and Nodes  XML
Forum Index -> Quartz
Author Message
bsener

master

Joined: 11/18/2011 08:29:59
Messages: 63
Offline

Hello,

I'm a little confused about how nodes execute jobs. If I have 1 scheduler with 3 nodes, can these nodes have separate queues?

For example let's says I have node A, B, and C. Each with 2 thread count. I schedule 10 jobs with node A and 10 jobs with node B. Will node C try to execute any of these jobs? If it will, what happens when I schedule 10 jobs with node C. Will node C stop executing jobs that were scheduled using node A and node B, and start executing its own jobs?

I'm basically trying to have separate queues for each node. I don't mind nodes executing each other's jobs when they have free threads. But if node C has 50 jobs scheduled, I want it to stop/finish executing other node's jobs and start executing its own jobs.

Please let me know if this doesn't make sense :)

Thanks!

jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline

All nodes in a cluster act like one larger, logical scheduler.

Hence they all see all data and act on all data. first come first serve. So any job scheduled by any node might be fired on any node.

If you want certain jobs to run on a given node you have two options:

1- Quartz Where features
2- Create multiple schedulers - start() the scheduler instance only on the node where the jobs in it should run, use the (non-started) instances on the other nodes to do scheduling.
bsener

master

Joined: 11/18/2011 08:29:59
Messages: 63
Offline

Thanks a lot, that answers my question!

I have another question. It doesn't really relate to this topic...

I'm using Sybase for quartz. I schedule all my jobs durably, and if I get no exceptions I delete the job at the very end of the job class.

But when I try to delete the job at the very end, I get a connection error. Somehow, something is calling Statement.close(). I'm not sure if it's my web server or quartz, but my guess is it's quartz. Do you have any idea?

Here is what I get:

2012-08-31 10:21:48,298 INFO [SinglePoolConnectionInterceptor] Removing ManagedConnectionInfo: org.apache.geronimo.connector.outbound.ManagedConnectionInfo@224fb195. mc: org.tranql.connector.jdbc.ManagedJDBCConnection@20e10434] from pool org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor@706d0c69
2012-08-31 10:21:48,327 WARN [GeronimoConnectionEventListener] connectionErrorOccurred called with null
java.sql.SQLException: JZ0S2: Statement object has already been closed.
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(ErrorMessage.java:572)
at com.sybase.jdbc3.jdbc.SybStatement.checkDead(SybStatement.java:2058)
at com.sybase.jdbc3.jdbc.SybStatement.close(SybStatement.java:494)
at com.sybase.jdbc3.jdbc.SybStatement.close(SybStatement.java:482)
at org.tranql.connector.jdbc.StatementHandle.close(StatementHandle.java:112)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.closeStatement(StdJDBCDelegate.java:3241)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTrigger(StdJDBCDelegate.java:1829)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1520)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2790)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2746)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3810)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2742)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)


Thanks!

 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team