private static String getHiveTablePartitionColumn(String createSql) {
        String partitionSql = fetchByRegx(createSql, "PARTITIONED BY\\s?\\([^)]+\\)");
        String colDef = StringUtils.removeStart(partitionSql, "PARTITIONED BY").trim();
        colDef = StringUtils.removeStart(colDef, "(");
        colDef = StringUtils.removeEnd(colDef, ")");
        if (colDef.split(",").length > 1) {
            throw new IllegalStateException(String.format("%s contains more than one partition column", createSql));
        }
        String colName = fetchByRegx(colDef, "`.+`");
        return StringUtils.strip(colName, "`");
    }
A tool which move realtime data in rt folder into history partition.
Only support one partition column.
It only works on indexr tables which has a hive table with location pointed to the same path and with a table partition column.
indexr-server/src/main/java/io/indexr/server/rt2his/Rt2HisOnHive.java