Skip to content

Commit 9252830

Browse files
author
gituser
committed
Merge branch 'hotfix_1.10_4.0.x_30677' into 1.10_release_4.0.x
2 parents f82c757 + e31035b commit 9252830

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

hbase/hbase-sink/src/main/java/com/dtstack/flink/sql/sink/hbase/HbaseOutputFormat.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,13 @@ private Put getPutByRow(Row record) {
215215
Put put = new Put(rowKey.getBytes());
216216
for (int i = 0; i < record.getArity(); ++i) {
217217
Object fieldVal = record.getField(i);
218-
byte[] val = null;
219218
if (fieldVal != null) {
220-
val = fieldVal.toString().getBytes();
221-
}
222-
byte[] cf = families[i].getBytes();
223-
byte[] qualifier = qualifiers[i].getBytes();
219+
byte[] val = fieldVal.toString().getBytes();
220+
byte[] cf = families[i].getBytes();
221+
byte[] qualifier = qualifiers[i].getBytes();
224222

225-
put.addColumn(cf, qualifier, val);
223+
put.addColumn(cf, qualifier, val);
224+
}
226225
}
227226
return put;
228227
}

0 commit comments

Comments
 (0)