Package pku.cbi.abcgrid.master.fragment

Examples of pku.cbi.abcgrid.master.fragment.Fragmentable.fragment()


                if (frag == null)
                    throw new Exception("Failed to  detect the format of input file:" + fname);
                Object[] data;
                int num_workers = WorkerManager.getInstance().getWorkerNum();
                num_workers = num_workers > 0 ? num_workers : 10;
                data = frag.fragment(new ByteArrayInputStream(fdata), num_workers);
                List<Task> tasks = new ArrayList<Task>(data.length);
                for (Object d : data)
                {
                    Task t = new Task(
                            job.getId(),
View Full Code Here


        for (TaskInput input : job.getInput())
        {
            File f = new File(user_dir, input.getName());
            int num_workers = WorkerManager.getInstance().getWorkerNum();
            num_workers = num_workers > 0 ? num_workers : 10;
            Object[] data = frag.fragment(f, num_workers);
            t.addInput(new TaskInput(input.getName(), data[0].toString().getBytes()));
        }
        tasks.add(t);
        return tasks;
    }
View Full Code Here

                Fragmentable frag = FormatDetector.getFragmenter(new File(user_dir, input_filename));
                if (frag == null)
                    throw new Exception("Failed to  detect the format of input file:" + input_filename);
                int num_workers = WorkerManager.getInstance().getWorkerNum();
                num_workers = num_workers > 0 ? num_workers : 10;
                data = frag.fragment(new ByteArrayInputStream(input_data), num_workers);
                List<Task> tasks = new ArrayList<Task>(data.length);
                for (Object d : data)
                {
                    Task t = new Task(
                            job.getId(),
View Full Code Here

                if (frag == null)
                    throw new Exception("Failed to  detect the format of input file:" + fname);
                Object[] data;
                int num_workers = WorkerManager.getInstance().getWorkerNum();
                num_workers = num_workers > 0 ? num_workers : 10;
                data = frag.fragment(new ByteArrayInputStream(fdata), num_workers);
                t.addInput(new TaskInput(fname, data[0].toString().getBytes()));
            }
            tasks.add(t);
            return tasks;
        }
View Full Code Here

        for (TaskInput input : job.getInput())
        {
            File f = new File(user_dir, input.getName());
            int num_workers = WorkerManager.getInstance().getWorkerNum();
            num_workers = num_workers > 0 ? num_workers : 10;
            Object[] data = frag.fragment(f, num_workers);
            t.addInput(new TaskInput(input.getName(), data[0].toString().getBytes()));
        }
        tasks.add(t);
        return tasks;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.