如下,注意幾個地方的配置:
(1)rowKeycolumn 主鍵的構成
這裏是para0和para5通過"_"拼接,構成主鍵
(2)column中的task:hbase表的NAME
"column": [
{
"name": "task:para0",
(3)
{
"type": "job",
"steps": [
{
"stepType": "odps",
"parameter": {
"partition": [],
"datasource": "odps_first",
"column": [
"para0",
"para1",
"para2",
"para3",
"para4",
"para5"
],
"emptyAsNull": false,
"table": "table_odps"
},
"name": "Reader",
"category": "reader"
},
{
"stepType": "hbase",
"parameter": {
"mode": "normal",
"walFlag": "false",
"hbaseVersion": "11x",
"rowkeyColumn": [
{
"index": "0",
"type": "string"
},
{
"index": "-1",
"type": "string",
"value": "_"
},
{
"index": "5",
"type": "string"
}
],
"nullMode": "skip",
"column": [
{
"name": "task:para0",
"index": "0",
"type": "string"
},
{
"name": "task:para1",
"index": "1",
"type": "string"
},
{
"name": "task:para2",
"index": "2",
"type": "string"
},
{
"name": "task:para3",
"index": "3",
"type": "string"
},
{
"name": "task:para4",
"index": "4",
"type": "string"
},
{
"name": "task:para5",
"index": "5",
"type": "string"
}
],
"writeMode": "api",
"encoding": "utf-8",
"table": "table_hbase",
"hbaseConfig": {
"hbase.zookeeper.quorum": "xxx.hbase.rds.aliyuncs.com:xxxx",
"hbase.rootdir": "hdfs://xxx.hbase.rds.aliyuncs.com:9099/xxx",
"hbase.cluster.distributed": "true"
}
},
"name": "Writer",
"category": "writer"
}
],
"version": "2.0",
"order": {
"hops": [
{
"from": "Reader",
"to": "Writer"
}
]
},
"setting": {
"errorLimit": {
"record": ""
},
"speed": {
"throttle": false,
"concurrent": "2"
}
}
}