mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-02 11:29:23 +08:00
Update HbaseAbstractTask.java
修复hbase11xwriter插件指定字段类型为boolean、short、int、long、float、double时目标端写入乱码问题。
This commit is contained in:
parent
0cd1472bf8
commit
dd662ab1f9
@ -90,22 +90,22 @@ public abstract class HbaseAbstractTask {
|
||||
if(column.getRawData() != null){
|
||||
switch (columnType) {
|
||||
case INT:
|
||||
bytes = Bytes.toBytes(column.asLong().intValue());
|
||||
bytes = Bytes.toBytes(String.valueOf(column.asLong().intValue()));
|
||||
break;
|
||||
case LONG:
|
||||
bytes = Bytes.toBytes(column.asLong());
|
||||
bytes = Bytes.toBytes(String.valueOf(column.asLong()));
|
||||
break;
|
||||
case DOUBLE:
|
||||
bytes = Bytes.toBytes(column.asDouble());
|
||||
bytes = Bytes.toBytes(String.valueOf(column.asDouble()));
|
||||
break;
|
||||
case FLOAT:
|
||||
bytes = Bytes.toBytes(column.asDouble().floatValue());
|
||||
bytes = Bytes.toBytes(String.valueOf(column.asDouble().floatValue()));
|
||||
break;
|
||||
case SHORT:
|
||||
bytes = Bytes.toBytes(column.asLong().shortValue());
|
||||
bytes = Bytes.toBytes(String.valueOf(column.asLong().shortValue()));
|
||||
break;
|
||||
case BOOLEAN:
|
||||
bytes = Bytes.toBytes(column.asBoolean());
|
||||
bytes = Bytes.toBytes(String.valueOf(column.asBoolean()));
|
||||
break;
|
||||
case STRING:
|
||||
bytes = this.getValueByte(columnType,column.asString());
|
||||
|
Loading…
Reference in New Issue
Block a user