splitting job into job chunks of smaller size, after execution of those chunks user will get results of the whole job. There are different strategies that should be implemented for splitting:
equal(N), creates N chunks out of job descriptor
proportional([p_1, p_2, …, p_N]), creates N chunks of sizes proportional to integers p_i
next(p), gives next job chunk of p items
you should implement following methods for class JobDescriptor:
you have to write class JobDescriptor, that can create object by parsing job descriptor JSON (https://github.com/anaderi/openlab_ship_proto/wiki/Job-descriptor) and that can split itself into smaller chunks:
splitting job into job chunks of smaller size, after execution of those chunks user will get results of the whole job. There are different strategies that should be implemented for splitting:
you should implement following methods for class JobDescriptor:
Split_equal(integer N) Split_proportional(ArrayList l) Next(p)
That realize split functionality. as well as several several unit-tests.