Browse Source

优化调整 增加指定数据源

jkzlzhoujie 6 years ago
parent
commit
d7b9e672f0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/main/java/com/yihu/ehr/listener/HbaseLogListener.java

+ 2 - 0
src/main/java/com/yihu/ehr/listener/HbaseLogListener.java

@ -22,6 +22,7 @@ public class HbaseLogListener implements EventListener {
    private static String action_put = "Put";//添加和修改单个字段值
    private static String action_del = "DeleteColumn";//删除单个字段值
    private static String action_delFamily = "DeleteFamily";//删除整行
    private static String hbase = "Hbase";
    @Override
    public void processEvents(List<SepEvent> sepEvents) {
@ -32,6 +33,7 @@ public class HbaseLogListener implements EventListener {
            log.debug("  table = " + Bytes.toString(sepEvent.getTable()));
            log.debug("  row = " + Bytes.toString(sepEvent.getRow()));
            Map<String, Object> dataMap = new HashMap<String, Object>();
            dataMap.put("dataSource",hbase);
            dataMap.put("table",Bytes.toString(sepEvent.getTable()));
            dataMap.put("rowKey",Bytes.toString(sepEvent.getRow()));
            for (Cell cell : sepEvent.getKeyValues()) {