Commit 746d6acf by WangJinfeng

fix RTDmpFetch

parent f0c963b1
...@@ -79,19 +79,23 @@ public class MySQLUtil { ...@@ -79,19 +79,23 @@ public class MySQLUtil {
String sql; String sql;
// last partition // last partition
sql = "SELECT part,utime FROM dmp.table_info WHERE db_name = '" + dbName + "' AND tb_name = '" + tbName + "' AND flag = 1 ORDER BY part DESC LIMIT 1"; sql = "SELECT part,utime FROM dmp.table_info WHERE db_name = '" + dbName + "' AND tb_name = '" + tbName + "' AND flag = 1 ORDER BY part DESC LIMIT 1";
System.out.println("getPartitionTime,SQL --->>> " + sql);
ResultSet rs = stmt.executeQuery(sql); ResultSet rs = stmt.executeQuery(sql);
if (!rs.next()) { if (!rs.next()) {
System.out.println("getPartitionTime Null,SQL --->>> " + sql); System.out.println("getPartitionTime Null,SQL --->>> " + sql);
} }
while (rs.next()) { while (rs.next()) {
partition = rs.getString("part"); partition = rs.getString("part");
utime = rs.getTimestamp("utime"); utime = rs.getTimestamp("utime");
System.out.println("partition:" + partition + ",utime:" + utime);
} }
System.out.println("getPartitionTime,SQL --->>> " + sql);
rs.close(); rs.close();
stmt.close(); stmt.close();
conn.close(); conn.close();
} catch (Exception se) { } catch (Exception se) {
se.printStackTrace(); System.out.println(se.getMessage());
} finally { } finally {
try { try {
if (stmt != null) { if (stmt != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment