(Configuration conf)
| 364 | } |
| 365 | |
| 366 | public List<String> getStringAsList(Configuration conf) { |
| 367 | String value = getString(null, conf); |
| 368 | List<String> confList = new ArrayList<>(); |
| 369 | if (value == null || value.isEmpty()) { |
| 370 | return confList; |
| 371 | } |
| 372 | for (String str: value.split(",")) { |
| 373 | String trimStr = str.trim(); |
| 374 | if (!trimStr.isEmpty()) { |
| 375 | confList.add(trimStr); |
| 376 | } |
| 377 | } |
| 378 | return confList; |
| 379 | } |
| 380 | |
| 381 | public void setString(Configuration conf, String value) { |
| 382 | conf.set(attribute, value); |