Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this example, we launch the EagleMLAPI Client in synchronous mode generating RTR from the command line.

  • RTR is formed from this query:

    Code Block
    -data="EN|EN|ActionType;EXTRACT;StreamName;eagle_ml-2-0_default_out_q;FeedType;ENTITYEXTRACT;maxrows;10;"
  • Metrics are have additional logging in metricsDir folder

  • Extracted data is saved to results folder

  • All necessary libraries required for the process are in the lib folder

  • o

    To start execution we create runapitestSync.cmd file with the following contents:

    Code Block
    languagejava
    set EAGLEAPIPASS=eagle1[PASS]
    java -jar lib/eaglemlapiclient-2.1.09.1.jar -data="EN|EN|ActionType;EXTRACT;StreamName;eagle_ml-2-0_default_out_q;FeedType;ENTITYEXTRACT;maxrows;10;" -execution=sync -endpoint=httphttps://10.100.38.145[REGION]/EagleMLWebService20 -login=eagleadmin[LOGIN] -resultsdir=results -csvmetricsdir=metricsdir
  • To set IP address to receive response use (port is optional, any available port is used if value is not set):

    Code Block
    languagejava
    -callback-address=clientipaddress[:port]

This is how a working folder for such parameters should look like:
Image Modified

Run runapitestSync.cmd:
Image Modified

  1. A RunTaskRequest with task parameters from the -data command has been created with corrId EN_LYQMQAFV6LJA:

    Code Block
    INFO  [LINE:1,CORRID:EN_LYQMQAFV6LJA] Executing request.
  2. askStatusResponse with SUCCESS status arrived:

    Code Block
    INFO  TSR status SUCCESS
  3. Extract file has been unzipped and saved to results folder:

    Code Block
    INFO  [LINE:1,CORRID:EN_LYQMQAFV6LJA] Output file results\EN_LYQMQAFV6LJA.xml written in 10 ms

    This extract process can be also examined via Message Center Console:
    Image Modified
    The RTR created by EagleML API client in MCC:

    Code Block
    languagexml
    <EagleML xmlnxsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RunTaskRequest" eaglemlVersion="2-0" eaglemlType="RunTaskRequest">
    <header>
    <messageId>EN_LYQMQAFV6LJA</messageId>
    <sentBy>user</sentBy>
    <sendTo>http://www.eagleinvsys.com/eagle_ml-2-0_default_cm_control_message</sendTo>
    <replyTo></replyTo>
    <creationTimestamp>2016-12-08 07:54:59</creationTimestamp>
    </header>
    <taskIdentifier>
    <correlationId correlationIdScheme="correlationIdScheme">EN_LYQMQAFV6LJA</correlationId>
    <businessTaskId correlationIdScheme="businessTaskIdScheme">EN</businessTaskId>
    </taskIdentifier>
    <synchronousExecution>yes</synchronousExecution>
    <taskParameters>
    <taskParameter>
    <name>maxrows</name>
    <value>10</value>
    </taskParameter>
    <taskParameter>
    <name>FeedType</name>
    <value>ENTITYEXTRACT</value>
    </taskParameter>
    <taskParameter>
    <name>ActionType</name>
    <value>EXTRACT</value>
    </taskParameter>
    <taskParameter>
    <name>StreamName</name>
    <value>eagle_ml-2-0_default_out_q</value>
    </taskParameter>
    <taskParameter>
    <name>CompressExtract</name>
    <value>Y</value>
    </taskParameter>
    </taskParameters>
    </EagleML>

    Image Modified
    Image Modified
    results folder:
    Image Modified
    Data extract file has been received and saved to the appropriate folder.