ctubbsii commented on a change in pull request #149:
URL: https://github.com/apache/accumulo-testing/pull/149#discussion_r690773219
##########
File path: src/main/java/org/apache/accumulo/testing/continuous/CreateTable.java
##########
@@ -55,9 +57,19 @@ public static void main(String[] args) throws Exception {
System.exit(-1);
}
+ // retrieve and set tserver props
+ Map<String,String> props = getProps(env,
TestProps.CI_COMMON_SERVER_PROPS);
+ props.forEach((k, v) -> {
+ try {
+ client.instanceOperations().setProperty(k, v);
+ } catch (AccumuloException | AccumuloSecurityException e) {
+ e.printStackTrace();
Review comment:
1. Instead of using `.forEach`, you can just use a regular for loop over
the `props.entrySet()`, so you can throw the exceptions out of the loop.
2. Or, you could log the error and stack trace using the logger, and call
System.exit, like in other scenarios (not a fan of that one).
3. Or just wrap and rethrow as a RuntimeException whose cause is `e`.
Of the options, I think the first is best. `.forEach` is convenient in some
cases, but it doesn't play nice with checked exceptions, so it's often just
cleaner to use traditional loops.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]