com.sun.faban.harness.engine
Class MysqlService

java.lang.Object
  extended by com.sun.faban.harness.engine.MysqlService

Deprecated.

@Deprecated
public final class MysqlService
extends Object

This class implements the service to start/stop the Mysql server. It also provides functionality to transfer the portion of the mysql errlog (host.err) for a run to the run output directory. It can be used by any MySQL benchmark to manage a mysql server and perform these operations remotely using this Service. NOTE: It is assumed that the pid and err file are in $DBHOME/data.

Author:
Shanti Subramanyam

Method Summary
static GregorianCalendar getGregorianCalendar(String hostName)
          Deprecated. Obtains the gregorian calendar representing the current time.
static MysqlService getHandle()
          Deprecated. Get the reference to the singleton object.
 void kill()
          Deprecated. Kill the MySQL server.
 boolean restartServer()
          Deprecated. Restart the MySQL server.
 void setup(String serverMachine, String dbDir)
          Deprecated. The setup method is called to set up a benchmark run.
 boolean startServer()
          Deprecated. Start the mysql server on the configured host.
 boolean stopServer()
          Deprecated. Stop server.
 void xferLogs(int totalRunTime)
          Deprecated. Transfer log files to the master.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHandle

public static MysqlService getHandle()
Deprecated. 
Get the reference to the singleton object. Use this method to get access to the service.

Returns:
MysqlService - service object handle

setup

public void setup(String serverMachine,
                  String dbDir)
Deprecated. 
The setup method is called to set up a benchmark run.

Parameters:
serverMachine - - the name of the mysql server machine.
dbDir - - MySQL installation directory

startServer

public boolean startServer()
Deprecated. 
Start the mysql server on the configured host.

Returns:
boolean true if start succeeded, else false

restartServer

public boolean restartServer()
Deprecated. 
Restart the MySQL server. It first stops the server and then attempts to start it up again.

Returns:
true if server restarted successfully, otherwise false

stopServer

public boolean stopServer()
Deprecated. 
Stop server.

Returns:
true if stop succeeded, else false

xferLogs

public void xferLogs(int totalRunTime)
Deprecated. 
Transfer log files to the master. This method copies over the error_log to the run output directory and keeps only the portion of the log relevant for this run.

Parameters:
totalRunTime - - the time in seconds for this run TODO: Modify code for mysql date/time format

getGregorianCalendar

public static GregorianCalendar getGregorianCalendar(String hostName)
                                              throws Exception
Deprecated. 
Obtains the gregorian calendar representing the current time.

Parameters:
hostName - The host name to get the calendar from
Returns:
The calendar
Throws:
Exception - Error obtaining calendar

kill

public void kill()
Deprecated. 
Kill the MySQL server. Same as stopServer.