Phoenix Tips (5) 使用任意时间戳
在Property里面设置属性 "CurrentSCN"。
ts是一个long。
Properties props = new Properties();
props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts));
Connection conn = DriverManager.connect(myUrl, props);
conn.createStatement().execute("UPSERT INTO myTable VALUES ('a')");
conn.commit();
相当于:
myTable.put(Bytes.toBytes('a'),ts);
浙公网安备 33010602011771号