Skip to content

Commit

Permalink
fix unserialize of job
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljar committed Jul 25, 2016
1 parent 91b2ea6 commit fe6f4bc
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions data.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,16 @@ class Data : public JSON::Object, private TupleHelper
JSON::Object(object),
_input(object.array("input"))
{
// Check if we are a mapreduce, race or regular task
// if we contain mapper information we are a map reduce algorithm
if (contains("mapper") && contains("reducer") && contains("finalizer")) _algorithm = Algorithm::mapreduce;
// if we are not a map reduce algorithm but have input we are a race algorithm
else if (contains("input")) _algorithm = Algorithm::race;
// if we are neither a mapreduce nor a race algorithm we are
// a regular task
else _algorithm = Algorithm::job;
// Check if we are a mapreduce, race or regular task
// if we contain mapper information we are a map reduce algorithm
if (contains("mapper") && contains("reducer") && contains("finalizer")) _algorithm = Algorithm::mapreduce;

// if we are not a map reduce algorithm but have input we are a race algorithm
else if (contains("input")) _algorithm = Algorithm::race;

// if we are neither a mapreduce nor a race algorithm we are
// a regular task
else _algorithm = Algorithm::job;
}

/**
Expand Down

0 comments on commit fe6f4bc

Please sign in to comment.