This commit is contained in:
airyv 2025-04-10 16:20:37 +08:00 committed by GitHub
commit 7a5e6de60f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 13 deletions

View File

@ -92,22 +92,22 @@ public abstract class HbaseAbstractTask {
Column column;
switch (columnType) {
case BOOLEAN:
column = new BoolColumn(ArrayUtils.isEmpty(byteArray) ? null : Bytes.toBoolean(byteArray));
column = new BoolColumn(ArrayUtils.isEmpty(byteArray) ? null : Boolean.valueOf(Bytes.toString(byteArray)));
break;
case SHORT:
column = new LongColumn(ArrayUtils.isEmpty(byteArray) ? null : String.valueOf(Bytes.toShort(byteArray)));
column = new LongColumn(ArrayUtils.isEmpty(byteArray) ? null : Bytes.toString(byteArray));
break;
case INT:
column = new LongColumn(ArrayUtils.isEmpty(byteArray) ? null : Bytes.toInt(byteArray));
column = new LongColumn(ArrayUtils.isEmpty(byteArray) ? null : Integer.valueOf(Bytes.toString(byteArray)));
break;
case LONG:
column = new LongColumn(ArrayUtils.isEmpty(byteArray) ? null : Bytes.toLong(byteArray));
column = new LongColumn(ArrayUtils.isEmpty(byteArray) ? null : Long.valueOf(Bytes.toString(byteArray)));
break;
case FLOAT:
column = new DoubleColumn(ArrayUtils.isEmpty(byteArray) ? null : Bytes.toFloat(byteArray));
column = new DoubleColumn(ArrayUtils.isEmpty(byteArray) ? null : Float.valueOf(Bytes.toString(byteArray)));
break;
case DOUBLE:
column = new DoubleColumn(ArrayUtils.isEmpty(byteArray) ? null : Bytes.toDouble(byteArray));
column = new DoubleColumn(ArrayUtils.isEmpty(byteArray) ? null : Double.valueOf(Bytes.toString(byteArray)));
break;
case STRING:
column = new StringColumn(ArrayUtils.isEmpty(byteArray) ? null : new String(byteArray, encoding));

View File

@ -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());

View File

@ -194,7 +194,7 @@ OracleReader插件实现了从Oracle读取数据。在底层实现上OracleRe
* **where**
* 描述:筛选条件,MysqlReader根据指定的column、table、where条件拼接SQL并根据这个SQL进行数据抽取。在实际业务场景中往往会选择当天的数据进行同步可以将where条件指定为gmt_create > $bizdate 。注意不可以将where条件指定为limit 10limit不是SQL的合法where子句。<br />
* 描述:筛选条件,OracleReader根据指定的column、table、where条件拼接SQL并根据这个SQL进行数据抽取。在实际业务场景中往往会选择当天的数据进行同步可以将where条件指定为gmt_create > $bizdate 。注意不可以将where条件指定为limit 10limit不是SQL的合法where子句。<br />
where条件可以有效地进行业务增量同步。