Coder Social home page Coder Social logo

Comments (11)

andrewserff avatar andrewserff commented on August 16, 2024

If I understand correctly, there isn't a way to do this currently. You would just need to make separate simulation configs with only one producer.

from json-data-generator.

sriharshamutnuru avatar sriharshamutnuru commented on August 16, 2024

Thanks Andrew,as you said to make separate configs,how can we do multiple config files that and how we run those multiple config files

from json-data-generator.

andrewserff avatar andrewserff commented on August 16, 2024

Just pass the name of the config when you start it. If you need them running at the same time, you would have to run separate instances of the generator, passing different configs to each one.

from json-data-generator.

sriharshamutnuru avatar sriharshamutnuru commented on August 16, 2024

i have changed the sim config file like this and changed the code to run the multiple workflows to multiple producers simultaneously
{
"workflows": [{
"workflowName": "Harsha",
"workflowFilename": "newWorkflow2.json",
"producers": [{
"type": "logger"
}]
},
{
"workflowName": "Harsha",
"workflowFilename": "newWorkflow.json",
"producers": [{
"type": "logger"
}]
}]
}

from json-data-generator.

sriharshamutnuru avatar sriharshamutnuru commented on August 16, 2024

after running generator, records randomly generated for some time suddenly one of the threads stopping by the exception

org.apache.commons.math3.exception.NumberIsTooLargeException: lower bound (0) must be strictly less than upper bound (-1)
at org.apache.commons.math3.distribution.UniformIntegerDistribution.(UniformIntegerDistribution.java:78) ~[commons-math3-3.5.jar:3.5]
at org.apache.commons.math3.random.RandomDataGenerator.nextInt(RandomDataGenerator.java:198) ~[commons-math3-3.5.jar:3.5]
at net.acesinc.data.json.generator.types.RandomType.getNextRandomValue(RandomType.java:47) ~[classes/:?]
at net.acesinc.data.json.generator.RandomJsonGenerator.processProperties(RandomJsonGenerator.java:102) [classes/:?]
at net.acesinc.data.json.generator.RandomJsonGenerator.processProperties(RandomJsonGenerator.java:134) [classes/:?]
at net.acesinc.data.json.generator.RandomJsonGenerator.generateJson(RandomJsonGenerator.java:50) [classes/:?]
at net.acesinc.data.json.generator.EventGenerator.generateEvent(EventGenerator.java:258) [classes/:?]
at net.acesinc.data.json.generator.EventGenerator.executeStep(EventGenerator.java:129) [classes/:?]
at net.acesinc.data.json.generator.EventGenerator.runRandom(EventGenerator.java:88) [classes/:?]
at net.acesinc.data.json.generator.EventGenerator.runWorkflow(EventGenerator.java:50) [classes/:?]
at net.acesinc.data.json.generator.EventGenerator.run(EventGenerator.java:339) [classes/:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_91]

from json-data-generator.

sriharshamutnuru avatar sriharshamutnuru commented on August 16, 2024

some times generator not able to pick the random value from the json and getting null pointer exception too

from json-data-generator.

andrewserff avatar andrewserff commented on August 16, 2024

Your sim config is invalid. You can only have one in the file (needs to be valid json). Put them in two separate files (simConfig1.json, simConfig2.json). As for the exceptions, I guess I'd need to see the workflow configs. I've never seen that happen. Are you passing a very large number into an integer() in your conifg as a max value? and what is the NPE you are seeing?

from json-data-generator.

sriharshamutnuru avatar sriharshamutnuru commented on August 16, 2024

workflow.txt

this is the work flow iam using

from json-data-generator.

sriharshamutnuru avatar sriharshamutnuru commented on August 16, 2024

Iam getting NPE for the any one of the keys in the workflow not one specifically

from json-data-generator.

drakulavich avatar drakulavich commented on August 16, 2024

@sriharshamutnuru Please, check out the new version. I've fixed issues like this:

org.apache.commons.math3.exception.NumberIsTooLargeException: lower bound (0) must be strictly less than upper bound (-1)

from json-data-generator.

andrewserff avatar andrewserff commented on August 16, 2024

Closing based on lack of activity. If there is still an issue, please let me know.

from json-data-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.