Package pku.cbi.abcgrid.master.fragment

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


                break;
            }
            if (fdata != null)
            {
                String user_dir = config.getUserDir(job.getSubmitter());
                Fragmentable frag = FormatDetector.getFragmenter(new File(user_dir, fname));
                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


                task_id.getAndIncrement(),
                job.getServiceName(),
                job.getCommand(),
                job.getPriority(),
                0);
        Fragmentable frag = new PDB();
        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

            }
            if (input_data != null)
            {
                String user_dir = config.getUserDir(job.getSubmitter());
                Object[] data;
                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

                    0);
            for (TaskInput entry : job.getInput())
            {
                String fname = entry.getName();
                byte[] fdata = entry.getData();
                Fragmentable frag = FormatDetector.getFragmenter(new File(user_dir, fname));
                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

                task_id.getAndIncrement(),
                job.getServiceName(),
                job.getCommand(),
                job.getPriority(),
                0);
        Fragmentable frag = new PDB();
        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

Related Classes of pku.cbi.abcgrid.master.fragment.Fragmentable

Copyright © 2018 www.massapicom. 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.