private static Map<String, String> getTableProperties(String createSql) {
        String propertiesSql = fetchByRegx(createSql, "TBLPROPERTIES\\s?\\([^)]+\\)");
        String colDef = StringUtils.removeStart(propertiesSql, "TBLPROPERTIES").trim();
        colDef = StringUtils.removeStart(colDef, "(");
        colDef = StringUtils.removeEnd(colDef, ")").trim();
        Map<String, String> m = new HashMap<>();
        for (String s : colDef.split("\n")) {
            String[] k_v = StringUtils.removeEnd(s.trim(), ",").split("'='", 2);
            if (k_v.length != 2) {
                continue;
            }
            String key = StringUtils.removeStart(k_v[0], "'");
            String value = StringUtils.removeEnd(k_v[1], "'");
            m.put(key, value);
        }
        return m;
    }
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