|
ZetaGrid v1.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--zeta.handler.RequestWorkUnitHandler
Handles a GET request for new work units. The request must contains the following parameters:
user - name of the resource provider.email - email of the resource provider.team - name of the team where the resource provider is join in.task - name of task for the work units.size - size of the work units.number_of_work_units - number of work units which are requested.hostname - name of the host of the resource provider.hostaddr - TCP/IP address of the host of the resource provider.version - version number of the task.os_name - name of the operating system of the resource provider.os_version - version of the operating system of the resource provider.os_arch - processor architecture of the requested resource.hostname
if the number of defined processors is larger than the number of requested work units.task, hostname
and hostaddr to the response.
Note: the global parameter 'work_unit_id_complete' was used to reduce the evaluation time.task, hostname, user and
email to the response. This is important for resources which used DHCP.
Note: the global parameter 'work_unit_id_complete' was used to reduce the evaluation time.user, email) is unknown.hostname by hostaddr
if the hostaddr is different to the registered address and the resource provider is equal to
the pair (user, email).hostname,hostaddr,os_name,os_version,os_arch)
if the pair (hostname,hostaddr) is unknown.task from the recomputation pool if the resource provider is activated for recomputations.task, resource and his provider. The new identifications of the work units
depend on the largest known identification, the size and the globale parameter 'work_unit_id_overlap'.
Note: The sizes of the new work units can be different whether they have the same size.
| Field Summary | |
private static int |
DEFAULT_WORK_UNIT_SIZE
Default size of a new work unit. |
private static int |
MAX_WORK_UNITS_TRUST0
Maximal number of work units which can be requested by one client. |
private static int |
MAX_WORK_UNITS_TRUST1
|
private static int |
MAX_WORK_UNITS_TRUST2
|
private ZetaServlet |
servlet
Servlet which owns this handler. |
private java.util.Map |
userMap
Maps a key (server-ID,name,email) of an user to the user-ID. |
private java.util.Map |
workstationMap
Maps a key (server-ID,user-ID) of a workstation to a list of workstation-IDs. |
private java.util.Map |
workUnitSize
Defined sizes for specified tasks and work unit sizes. |
| Constructor Summary | |
RequestWorkUnitHandler(ZetaServlet servlet)
|
|
| Method Summary | |
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Handles a GET request for new work units. |
private int |
getWorkUnitSize(int taskId,
java.lang.String sizeOfWorkUnit,
long workUnitId,
java.sql.Statement stmt)
Returns the size of a work unit for a specified taskId, size and workUnitId. |
private void |
insertWorkUnitsIntoDatabase(WorkUnit[] workUnits,
TaskRequestWorkUnitProcessor processor,
int taskId,
int serverId,
int workstationId,
java.lang.String version,
int userId)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final int DEFAULT_WORK_UNIT_SIZE
private static final int MAX_WORK_UNITS_TRUST0
private static final int MAX_WORK_UNITS_TRUST1
private static final int MAX_WORK_UNITS_TRUST2
private java.util.Map workUnitSize
private java.util.Map userMap
private java.util.Map workstationMap
private ZetaServlet servlet
| Constructor Detail |
public RequestWorkUnitHandler(ZetaServlet servlet)
servlet - servlet which owns this handler.| Method Detail |
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.sql.SQLException,
java.io.IOException
req must contains the following parameters:
user - name of the resource provider.email - email of the resource provider.team - name of the team where the resource provider is join in.task - name of task for the work units.size - size of the work units.work_units - number of work units which are requested.hostname - name of the host of the resource provider.hostaddr - TCP/IP address of the host of the resource provider.version - version number of the task.os_name - name of the operating system of the resource provider.os_version - version of the operating system of the resource provider.os_arch - processor architecture of the requested resource.resp contains the parameters (work_unit_id, size) of the new work units.
doGet in interface GetHandlerjavax.servlet.ServletException
java.sql.SQLException
java.io.IOException
private void insertWorkUnitsIntoDatabase(WorkUnit[] workUnits,
TaskRequestWorkUnitProcessor processor,
int taskId,
int serverId,
int workstationId,
java.lang.String version,
int userId)
throws javax.servlet.ServletException,
java.sql.SQLException
javax.servlet.ServletException
java.sql.SQLException
private int getWorkUnitSize(int taskId,
java.lang.String sizeOfWorkUnit,
long workUnitId,
java.sql.Statement stmt)
throws java.sql.SQLException
taskId, size and workUnitId.
taskId - identification of the task.workUnitId - id of the work unit
taskId, size and workUnitId.
java.sql.SQLException
|
ZetaGrid v1.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||