GithubHelp home page GithubHelp logo

oursim-ext's People

Contributors

abmargb avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

oursim-ext's Issues

"NullPointer" in "RequestWorkersEvent" running with attached job and grid

Grid configuration

http://pastebin.com/YymVcCFk

Events configuration

http://pastebin.com/wsrpKWz8

Exception message:

Exception in thread "main" java.lang.NullPointerException
at br.edu.ufcg.lsd.oursim.events.peer.RequestWorkersEvent.forwardRequestToCommunity(RequestWorkersEvent.java:64)
at br.edu.ufcg.lsd.oursim.events.peer.RequestWorkersEvent.process(RequestWorkersEvent.java:52)
at br.edu.ufcg.lsd.oursim.OurSim.run(OurSim.java:65)
at br.edu.ufcg.lsd.oursim.Main.main(Main.java:30)

Error when omit "workers" index in the grid configuration

Grid configuration:

{
discoveryService: {id : "ds"},
peers: [{id: "peerA", discoveryService: "ds", workers:[
{id: "worker1A", cpu: "2"},
{id: "worker2A", cpu: "1.5"},
{id: "worker3A", cpu: "1.2"},
{id: "worker4A", cpu: "1"},
{id: "worker5A", cpu: "1.3"},
{id: "worker6A", cpu: "1.5"}
]},
{id: "peerB", discoveryService: "ds"}
],
brokers: [{id: "broker1A", peer: "peerA"}, {id: "broker2A", peer: "peerA"}, {id: "broker1B", peer: "peerB"}]
}

Exception message:

Exception in thread "main" java.lang.IllegalArgumentException: org.json.JSONException: JSONObject["workers"] not found.
at br.edu.ufcg.lsd.oursim.util.JSONUtils.getJSONArray(JSONUtils.java:37)
at br.edu.ufcg.lsd.oursim.factories.DefaultGridFactory.createPeer(DefaultGridFactory.java:141)
at br.edu.ufcg.lsd.oursim.factories.DefaultGridFactory.createGrid(DefaultGridFactory.java:61)
at br.edu.ufcg.lsd.oursim.OurSim.(OurSim.java:38)
at br.edu.ufcg.lsd.oursim.Main.main(Main.java:25)
Caused by: org.json.JSONException: JSONObject["workers"] not found.
at org.json.JSONObject.get(JSONObject.java:498)
at org.json.JSONObject.getJSONArray(JSONObject.java:574)
at br.edu.ufcg.lsd.oursim.util.JSONUtils.getJSONArray(JSONUtils.java:35)
... 4 more

Error running with property "BROKER_MAX_REPLICAS" defined as 1

Grid configuration:

{
discoveryService: {id : "ds"},
peers: [{id: "peerA", discoveryService: "ds", workers:[
{id: "worker1A", cpu: "2"},
{id: "worker2A", cpu: "1.5"},
{id: "worker3A", cpu: "1.2"},
{id: "worker4A", cpu: "1"},
{id: "worker5A", cpu: "1.3"},
{id: "worker6A", cpu: "1.5"}
]},
{id: "peerB", discoveryService: "ds", workers:[]}
],
brokers: [{id: "broker1A", peer: "peerA"}, {id: "broker2A", peer: "peerA"}, {id: "broker1B", peer: "peerB"}]
}

Events queue:

DS_UP 100 ds
WORKER_UP 300 worker1A
WORKER_UP 400 worker2A
WORKER_UP 400 worker3A
WORKER_UP 400 worker4A
WORKER_UP 400 worker5A
WORKER_UP 400 worker6A
BROKER_UP 500 broker1A
BROKER_UP 500 broker2A
BROKER_UP 500 broker1B
PEER_UP 800 peerA
PEER_UP 800 peerB
ADD_JOB 15000 broker1A {id:1 , tasks:[{duration:10000},{duration:1000}]}
ADD_JOB 100000 broker1B {id:1 , tasks:[{duration:10000},{duration:10000}]}
HALT 500000

Exception message

Exception in thread "main" java.lang.NullPointerException
at br.edu.ufcg.lsd.oursim.events.peer.accounting.AccountingHelper.getAccountingsByProvider(AccountingHelper.java:53)
at br.edu.ufcg.lsd.oursim.events.peer.accounting.AccountingHelper.commitReplicaAccountings(AccountingHelper.java:16)
at br.edu.ufcg.lsd.oursim.events.peer.FinishRequestEvent.process(FinishRequestEvent.java:32)
at br.edu.ufcg.lsd.oursim.OurSim.run(OurSim.java:65)
at br.edu.ufcg.lsd.oursim.Main.main(Main.java:32)

"NullPointer" in "AddJobEvent" when set the same time to "ADD_JOB" and "BROKER_UP" events

This error occurs when the time to set up the broker that requests the "add_job" is the same time in "add_job" event

Exception in thread "main" java.lang.NullPointerException
at br.edu.ufcg.lsd.oursim.events.broker.AddJobEvent.process(AddJobEvent.java:34)
at br.edu.ufcg.lsd.oursim.OurSim.run(OurSim.java:65)
at br.edu.ufcg.lsd.oursim.Main.main(Main.java:31)

Refactor event logic

Register every event in the event factory. Infer event constructor by reflection.

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.