一、 需求
業務上需要將當天的數據寫入hbase 提供給後臺查詢前臺展示,第二天清空前一天的數據
二、實現
-
vim truncateGpsToDay.sh
truncate 'TBL_GPS_TODAY'
-
executorTruncateToDay.sh
hbase shell /root/truncateGpsToDay.sh
-
配置定時任務
0 0 * * * sh /root/executorTruncateToDay.sh
業務上需要將當天的數據寫入hbase 提供給後臺查詢前臺展示,第二天清空前一天的數據
vim truncateGpsToDay.sh
truncate 'TBL_GPS_TODAY'
executorTruncateToDay.sh
hbase shell /root/truncateGpsToDay.sh
配置定時任務
0 0 * * * sh /root/executorTruncateToDay.sh