File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
hbase/hbase-sink/src/main/java/com/dtstack/flink/sql/sink/hbase Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -213,16 +213,16 @@ public HbaseOutputFormat finish() {
213213 String [] families = new String [format .columnNames .length ];
214214 String [] qualifiers = new String [format .columnNames .length ];
215215
216- Set <String > keySet = format .columnNameFamily .keySet ();
217- String [] columns = new String [keySet .size ()];
218- keySet .toArray (columns );
219- for (int i = 0 ; i < columns .length ; ++i ) {
220- String col = columns [i ];
221- String [] part = col .split (":" );
222- families [i ] = part [0 ];
223- qualifiers [i ] = part [1 ];
216+ if (format .columnNameFamily != null ) {
217+ Set <String > keySet = format .columnNameFamily .keySet ();
218+ String [] columns = keySet .toArray (new String [keySet .size ()]);
219+ for (int i = 0 ; i < columns .length ; ++i ) {
220+ String col = columns [i ];
221+ String [] part = col .split (":" );
222+ families [i ] = part [0 ];
223+ qualifiers [i ] = part [1 ];
224+ }
224225 }
225-
226226 format .families = families ;
227227 format .qualifiers = qualifiers ;
228228
You can’t perform that action at this time.
0 commit comments