Description

This article describes how to configure the REST request payload to run multiple partitioned GenRocket instances.


Request Payload Parameters

The GenRocket Partition Engine requires a payload containing the following parameters:

  • numberOfRecords  
    • Defines the total number of records to generate across all servers and partitions.
    • The numberOfRecords value must be a number that can be evenly distributed across all instances.
  • numberOfServers  
    • Defines the total number of servers that will be used for partitioning.
  • instancesPerServer  
    • Defines the total number of GenRocket instances to launch on each server.
    • The numberOfServers multiplied by the numberOfInstances must evenly divide the numberOfRecords to be generated.  
  • serverNumber 
    • Defines which server, within the total set of servers, is being launched on the given computer.
    • If two computers are given the same serverNumber, the same data will be generated to the same output location.
    • If a serverNumber is defined outside the range of numberOfServers, the engine will not be started.
  • optimizeAttributes
    • A Boolean parameter that can be set to true/false. The default value is false.
    • When "true", it looks up the Parent/Child relationships to determine if a particular Generator with a parent is not being referenced by any of the children. If not, it turns off Generators for Attributes that are generating data and not being referenced by the child.  
  • scenarioPath  
    • Defines the directory location of the Scenario to run.  
    • The directory location must be on the same computer where the REST engine is running.
  • scenario
    • Defines the name of the Scenario to run.
    • The same Scenario must be run on all instances, or the results will be unpredictable.
  • attributes
    • Defines the set of Attributes within the Scenario's primary Domain, whose Generators will be modified to start generating data, at the appropriate number according to their partition.


Optional Test Data Case (GCase) Parameters  (Click here for more information)

A GCase modifies the components within a Scenario, thus allowing the same Scenario to generate many different permutations of test data for any number of test cases.

  • suitePath
    • Defines the directory location of the GCase to run.  
    • The directory location must be on the same computer where the REST engine is running.
  • suiteName
    • Defines the name of the GCase to run.
    • The same GCase must be run on all instances, or the results will be unpredictable.
  • categoryName
    • Defines the name of the Category to locate within the GCase.
  • caseName
    • Defines the name of the Case within the Category that will be used to modify the Scenario. 


Payload Example

The following example presents a payload configuration for generating 100 million users, to be evenly partitioned across 10 instances on 1 server.


{
    "numberOfRecords": 100000000,
    "numberOfServers": 1,
    "instancesPerServer": 10,
    "serverNumber": 1,
    "optimizeAttributes": true,
    "scenarioPath": "/Users/guest/Scenarios/Partition/",
    "scenario": "UserScenario.grs",
    "attributes": [
        "id",
        "ssn",
        "creditCard"
    ]
}


GCase Payload Example

The following example presents a payload configuration for generating 100 million customers, to be evenly partitioned across 10 instances on 1 server.  However, in this example, the Scenario is modified just prior to the start of data generation.

curl -H "Accept:application/json;" -H "Content-Type:application/json" -d '{
    "numberOfRecords": 100000000,
    "numberOfServers": 1,
    "instancesPerServer": 10,
    "serverNumber": 1,
    "scenarioPath": "/home/parallels/Downloads/Partition/",
    "scenario": "CustomerScenario.grs",
    "suitePath":"/home/parallels/Downloads/Partition/",
    "suiteName":"CustomerSuite.gtdc",
    "categoryName":"Load",
    "caseName":"caseOne",
    "attributes": [
        "id",
        "customerPk",
        "cid"
    ],
}' http://<IpOfLocalSystemOrServer>:8181/grRest/partition