Hbase的SQL接口之Phoenix应用总结

Hbase的SQL接口之Phoenix应用总结

http://www.myexception.cn/sql/1252220.html

http://outofmemory.cn/code-snippet/7570/phoenix-jdbc-query-console-application

public class TestWriter {
	public static void main(String[] args) {
		SQLWriter writer = TokenPhoenixWriter.getWriter("ADcjaS");
		writer.writeSingleSQL("upsert into T_RESULT_CONTROL_PLAYERFLOWRATE_DETAIL(minutecol, roomid, streamid, userid, appid, cvl, pd) values('v1','v1','v1', 0,0,0,0)");
		writer.close();

		SQLReader reader = TokenPhoenixReader.getReader("ADcjaS");
		List<Map<String, Object>> res = reader
				.readListMapFromSQL2("select * from T_RESULT_CONTROL_PLAYERFLOWRATE_DETAIL");
		reader.close();

		System.out.println(res);
	}
}
Map<String,Object> map = this.playerflowrateDetaiService.playCalculatedRateInfor(allRequestParam);

List<Map<String, Object>> list = reader.readListMapFromSQL2(sql);

相关推荐