GridSAM can utilise most JDBC compliant database to support job persistence and pipeline recovery. The default setup uses the embedded Hypersonic SQL database, which requires no administrative attention. However if you would like to use other database implementation, you will need to modify the configuration file $OMII_HOME/apache-tomcat-5.5.23/webapps/gridsam/WEB-INF/classes/database.xml referenced by the main jobmanager.xml file.
GridSAM has been tested with the following databases. You should consult the documentation for the MySQL Database to learn how to experiment with other systems.
GridSAM can survive server crashes given the database is intact. The container can simply be restarted and the failed job stages would recover from the point they have left off. For example, if the server has failed during the staging-out stage of a job, GridSAM will attempt to stage files out again without re-running the preceduing stages of the job. Therefore, it is important the database server is kept on high availability hardware and the vendor-specific tools be used to replicate the database servers in case of failure.
GridSAM is preconfigured with an embedded Hypersonic SQL database that requires no administrative attention. It provides a fast in-VM JDBC compliant database to the JobStore abstraction.
The Hypersonic database files are stored in the directory $OMII_BASE/apache-tomcat-5.5.23/webapps/gridsam/WEB-INF/data by default.
WARNING: Redeploying GridSAM will overwrite the database files. Please ensure you have backed up the directory prior to redeployment if you want to retain the database content.
$> cp -R ${OMII_HOME}/apache-tomcat-5.5.23/webapps/gridsam/WEB-INF/data /new/database/dir
.. <!-- database.xml file available in the classpath --> <sub-module descriptor="database.xml"/> ..
... <contribution configuration-id="gridsam.SchedulerConfig"> <Properties preference="10"> org.quartz.dataSource.QuartzDataSource.URL = jdbc:hsqldb:file:/new/database/dir </Properties> </contribution> <contribution configuration-id="gridsam.JobInstanceStoreConfig"> <Properties preference="10"> hibernate.connection.url=jdbc:hsqldb:file:/new/database/dir </Properties> </contribution> ...
By using a networked Hypersonic Server, the SQL processing can be performed on a host other than the container host. This mode of deployment is suitable for high-traffic service.
$> cp -R ${OMII_HOME}/apache-tomcat-5.5.23/webapps/gridsam/WEB-INF/data ~/hsqldb/
$> java -cp ${HSQLDB_HOME}/lib/hsqldb.jar org.hsqldb.Server -database.0 ~/hsqldb/gridsam-db -dbname.0 gridsam
.. <!-- database.xml file available in the classpath --> <sub-module descriptor="database.xml"/> ..
... <contribution configuration-id="gridsam.SchedulerConfig"> <Properties preference="10"> org.quartz.dataSource.QuartzDataSource.URL = jdbc:hsqldb:hsql://your.db.host/gridsam </Properties> </contribution> <contribution configuration-id="gridsam.JobInstanceStoreConfig"> <Properties preference="10"> hibernate.connection.url=jdbc:hsqldb:hsql://your.db.host/gridsam </Properties> </contribution> ...
To use MySQL as the database implementation, you must ensure the necessary tables are created. The database scripts required by GridSAM can be found in the directory config/ddl/tables_[DB_VENDOR].sql in the server distribution.
.. <!-- database.xml file available in the classpath --> <sub-module descriptor="database.xml"/> ..
... <contribution configuration-id="gridsam.SchedulerConfig"> <Properties> org.quartz.jobStore.driverDelegateClass=[SchedulerDBDelegateClass] # Default setting: Use HSQL as the database org.quartz.dataSource.QuartzDataSource.driver = [JDBCDriverClassName] org.quartz.dataSource.QuartzDataSource.URL = [JDBCURL] org.quartz.dataSource.QuartzDataSource.user = [JDBCUser] org.quartz.dataSource.QuartzDataSource.password = [JDBCPassword] # OR # Use the following instead if the data source is configured in the application server (such as the OMII data source) # org.quartz.dataSource.NAME.jndiURL = DB_JNDI_URL </Properties> </contribution> <contribution configuration-id="gridsam.JobInstanceStoreConfig"> <Properties> hibernate.connection.driver_class=[JDBCDriverClassName] hibernate.connection.url=[JDBCURL] hibernate.dialect=[DBVendorDialectClass] </Properties> </contribution> ...
SchedulerDBDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate DBVendorDialectClass: org.hibernate.dialect.MySQLDialect JDBCDriverClassName: com.mysql.jdbc.Driver JDBCURL: jdbc:mysql://${HOST}:${PORT}/${DBALIAS} JDBCUser: your database username JDBCPassword: your database password