|
MONK : SEASR Calls
This page last changed on Nov 03, 2008 by amitku.
Getting list of jobs for a project/get/SchedulerManager.getJobListAndStatus?projectId=40
Notice the <token> element -use that for all other requests. The lifecycles of the job are: _There is a possibility that some jobs have "RUNNING" status or no status at all, that's because of Example: http://monk.lis.uiuc.edu:8888/monkmiddleware/get/SchedulerManager.getJobListAndStatus?projectId=40
Scheduling a FlowScheduling a flow is the preferred way of calling analytics. Scheduler makes sure that the request to run the flow Step Icall runAnalysis Send all the parameters to the flow that the flow needs. The token attribute is something that should be randomly generated in javascript; The result of this call in the event of success is
The result of failure is as below. The call would fail if you reuse the token value or of the flow is not supported
Step IIcall status (Call every 10 seconds) /SchedulerManager.status?token=testtoken2067 This call will return the current flowStatus. Upon Successful completion the success message looks like as below
The @type attribute can be "FINISH", "STARTED", or "ENQUEUED". Step IIIcall abort (Can call anytime the flow is running) /SchedulerManager.abort?token=testtoken2067 Use the abort call to stop a long running flow that has not yet completed Upon success the message would look as below <status> If the flow has finished, the token is invalid or the flow has already aborted -you will <error> After making the abort call -A call to status should be made after 3 seconds to confirm that the flow Step IVcall log The log call returns the location of the log file. /SchedulerManager.log?token=token2067 Upon success the message will return the location of the log file -accessible through http
Upon failure an error message will be sent; The error message would be sent if the token is invalid Step VgetClientList call /SchedulerManager.getClientList The getClientList call will return the detailed information about the available clients. The clients are the analytics servers The success message from the getClientList call looks as below Using SEASR Manager to call analyticsStep I @DEPRECATEDCall doSetup <flow> <weburl>http://127.0.0.1:1737/</weburl> <instanceId> http://test.org/flow/testmac/1205219875332/128185752 </instanceId> </flow> Step II @DEPRECATEDCall runAnalysis http://127.0.0.1:8080/get/SeasrManager.runAnalysis You need to identify the flow and the weburl for the flow using following two parametes and then identify the parameters required to do the analysis worksetId=17 (if you provide worksetId the application looks for the trainingSet,trainingSetRating and documentList from the workset) -Be careful with this the current implementation is not very stable to make sure that the workset has proper trainingset/trainingSetRatings and workList -else it will throw an error. or all of the below (these are for testing purposes...) on success <running error="false" dateStarted="2008-03-11 11:11:09.0"/> upon error <error> Flow has already completed use getPrediction method to get results </error> Step IIICall Get Prediction http://127.0.0.1:8080/monkmiddleware/SEASRManager/getPrediction?instanceId=http://test.org/flow/testmac/1205229661381/150094972 on Error <result> <instanceId> http://test.org/flow/testmac/1205231794739/19551588922 </instanceId> <status> Flow with flowInstanceID http://test.org/flow/testmac/1205231794739/19551588922 has not yet started </status> </result> on Success <result> <instanceId> http://test.org/flow/testmac/1205240666245/45300353 </instanceId> <dateStarted>2008-03-11 08:07:57.0</dateStarted> <dateEnded>2008-03-11 08:08:04.0</dateEnded> <status>results follow</status> <json> {"org.seasr.meandre.components.weka.PredictionFlowResult":{"resultSummary":"Some summary of the result Tue Mar 11 08:09:06 CDT 2008","result":{"PredictionResult":[{"docId":"work.1","predictedClass":"0","value":"s","probabilityRatio":{"double":["0.832676564617279","0.8060886582342885"]}},{"docId":"work.2","predictedClass":"0","value":"s","probabilityRatio":{"double":["0.42221846048762735","0.2826080526645438"]}}]},"classList":{"string":["s","e"],"trainingList":{"entry":[{"string":["work.5","s"]},{"string":["work.4","e"]}]}}}} </json> <dataType> org.seasr.meandre.components.weka.PredictionFlowResult </dataType> </result> |
| Document generated by Confluence on Apr 19, 2009 15:04 |