private static String getHiveTableCreateSql(Connection connection, String tableName) throws Exception {
        try (Statement statement = connection.createStatement()) {
            ResultSet resultSet = statement.executeQuery(String.format("SHOW CREATE TABLE %s", tableName));
            String createTable = "";
            while (resultSet.next()) {
                createTable += resultSet.getString(1) + "\n";
            }
            resultSet.close();
            return createTable;
        }
    }
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