Skip to content

Commit b15b8b7

Browse files
committed
[hotfix-33089][hbase][async-side]add rowkey value to sideVal.
1 parent 77d2a01 commit b15b8b7

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

hbase/hbase-side/hbase-async-side/src/main/java/com/dtstack/flink/sql/side/hbase/rowkeydealer/AbstractRowKeyModeDealer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ public abstract class AbstractRowKeyModeDealer {
5555

5656
protected List<FieldInfo> outFieldInfoList;
5757

58+
protected static final String ROWKEY = "rowkey";
59+
5860
//key:Returns the value of the position, returns the index values ​​in the input data
5961
protected Map<Integer, Integer> inFieldIndex = Maps.newHashMap();
6062

hbase/hbase-side/hbase-async-side/src/main/java/com/dtstack/flink/sql/side/hbase/rowkeydealer/PreRowKeyModeDealerDealer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ private String dealOneRow(ArrayList<ArrayList<KeyValue>> args, String rowKeyStr,
110110
//The order of the fields defined in the data conversion table
111111
List<Object> sideVal = Lists.newArrayList();
112112
for (String key : colNames) {
113+
114+
if (ROWKEY.equalsIgnoreCase(key)) {
115+
sideVal.add(rowKeyStr);
116+
continue;
117+
}
118+
113119
Object val = sideMap.get(key);
114120
if (val == null) {
115121
LOG.error("can't get data with column {}", key);

hbase/hbase-side/hbase-async-side/src/main/java/com/dtstack/flink/sql/side/hbase/rowkeydealer/RowKeyEqualModeDealer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ public void asyncGetData(String tableName, String rowKeyStr, BaseRow input, Resu
8484
//The order of the fields defined in the data conversion table
8585
List<Object> sideVal = Lists.newArrayList();
8686
for(String key : colNames){
87+
88+
if (ROWKEY.equalsIgnoreCase(key)) {
89+
sideVal.add(rowKeyStr);
90+
continue;
91+
}
92+
8793
Object val = sideMap.get(key);
8894
if(val == null){
8995
LOG.error("can't get data with column {}", key);

0 commit comments

Comments
 (0)