private List<File> split() throws IOException {

        List<String> lines = new ArrayList<String>();
        List<File> splittedFiles = new ArrayList<File>();
        String line;
        BufferedReader reader = new BufferedReader(new FileReader(conf.trainFile));
        while ((line = reader.readLine()) != null) {
            lines.add(line);
        }
        reader.close();

        // Split files
        Random rand = new Random();
        Collections.shuffle(lines, rand);
        int numWritedLines = 0;
        for (int i = 0; i < cores; ++i) {
            int numToWrite;
            if (i == cores - 1) {
                numToWrite = lines.size() - numWritedLines;
            }
            else {
                numToWrite = lines.size() / cores;
            }
            String tmpname = String.format("%x.part", rand.nextInt());
            File tmpfile = new File(SPLIT_PATH, tmpname);
            BufferedWriter writer = new BufferedWriter(new FileWriter(tmpfile));
            for (int lineNum = numWritedLines; lineNum < numWritedLines + numToWrite; ++ lineNum) {
                writer.write(lines.get(lineNum));
                writer.write("\n");
            }
            numWritedLines += numToWrite;
            writer.close();
            splittedFiles.add(tmpfile);
        }
        return splittedFiles;
    }