public void sortLargeFile(final String from, final long memoryLimit, final boolean makeCopy)
        throws IOException
    {
        LOG.info("Sort Large File start, fromFile {}, memoryLimit {}, make a copy {}", new Object[] {from, memoryLimit, makeCopy});
        long start = System.currentTimeMillis();
        if (from == null || from.trim().length() == 0 || memoryLimit <= 0)
        {
            LOG.error("Sort Large File stop, input parameter can not be null or empty.");
            return;
        }
        /*check and obtain the file*/
        File file = new File(from);
        if (file.exists() && file.isFile())
        {
            /*split files into parts*/
            splitFile(file, memoryLimit);
            /*sort each files in split folder*/
            sortSplitFile(file.getParent());
            /*merge sorted files back and copy to new location*/
            mergeFiles(from, makeCopy);

            LOG.info("Sort Large File end, whole time is {}ms.", System.currentTimeMillis() - start);
        }
        else
        {
            LOG.error("Sort stop, file not exist or not a normal file, please check your input parameter.");
        }
    }