public class KuduAssit extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addTableColumn(String tableName,
ListenerConf.ColHis colHis,
String[] addColNames)
新增字段
|
void |
close() |
static org.apache.kudu.Type |
convertMysqlToKuduType(String mySqlDataType) |
void |
createTable(String tb,
List<MySqlColBean> mysqlCols,
MySqlColBean... addCols)
通过mysql字段创建表
|
Result |
dataDelete(String tb,
List<Map<String,String>> keysValues)
删除数据
|
void |
dropTable(String tb) |
static void |
putValueByType(org.apache.kudu.client.PartialRow row,
String key,
String value,
org.apache.kudu.Type colType)
条件查询 select * from person where id=1
|
void |
upsertRow(String tb,
List<Map<String,String>> datas)
更新数据
|
public KuduAssit(String ds)
public void close()
public void createTable(String tb, List<MySqlColBean> mysqlCols, MySqlColBean... addCols) throws Exception
tb - 要创建的表名mysqlCols - 要创建的mysql字段addCols - 附加字段Exceptionpublic void addTableColumn(String tableName, ListenerConf.ColHis colHis, String[] addColNames) throws Exception
tableName - addColNames - Exceptionpublic void upsertRow(String tb, List<Map<String,String>> datas) throws Exception
tb - datas - Exceptionpublic Result dataDelete(String tb, List<Map<String,String>> keysValues) throws Exception
Exceptionpublic static void putValueByType(org.apache.kudu.client.PartialRow row,
String key,
String value,
org.apache.kudu.Type colType)
public static org.apache.kudu.Type convertMysqlToKuduType(String mySqlDataType)
mySqlDataType - mysql数据类型,参考:MySqlColBean.DataTypeCopyright © 2023–2024. All rights reserved.