mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
HBase的etl初步完成
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.alibaba.otter.canal.client.adapter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.alibaba.otter.canal.client.adapter.support.Dml;
|
||||
import com.alibaba.otter.canal.client.adapter.support.EtlResult;
|
||||
@@ -42,7 +43,16 @@ public interface OuterAdapter {
|
||||
* @param params etl筛选条件
|
||||
*/
|
||||
default EtlResult etl(String task, List<String> params) {
|
||||
throw new UnsupportedOperationException();
|
||||
throw new UnsupportedOperationException("unsupported operation");
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算总数
|
||||
*
|
||||
* @param task 任务名, 对应配置名
|
||||
* @return 总数
|
||||
*/
|
||||
default Map<String, Object> count(String task) {
|
||||
throw new UnsupportedOperationException("unsupported operation");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.alibaba.otter.canal.client.adapter.support;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class Result implements Serializable {
|
||||
|
||||
public Integer code = 20000;
|
||||
public Object data;
|
||||
public String message;
|
||||
public Date sysTime = new Date();
|
||||
|
||||
public static Result createSuccess(Object data) {
|
||||
Result result = new Result();
|
||||
result.setData(data);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public Object getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(Object data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Date getSysTime() {
|
||||
return sysTime;
|
||||
}
|
||||
|
||||
public void setSysTime(Date sysTime) {
|
||||
this.sysTime = sysTime;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user