dlmarion commented on code in PR #6176:
URL: https://github.com/apache/accumulo/pull/6176#discussion_r2889728575
##########
test/src/main/java/org/apache/accumulo/test/ScanServerGroupConfigurationIT.java:
##########
@@ -46,56 +46,60 @@
public class ScanServerGroupConfigurationIT extends SharedMiniClusterBase {
// @formatter:off
- public static final String clientConfiguration =
- "["+
- " {"+
- " \"isDefault\": true,"+
- " \"maxBusyTimeout\": \"5m\","+
- " \"busyTimeoutMultiplier\": 8,"+
- " \"scanTypeActivations\": [],"+
- " \"timeToWaitForScanServers\":\"0s\","+
- " \"attemptPlans\": ["+
- " {"+
- " \"servers\": \"3\","+
- " \"busyTimeout\": \"33ms\","+
- " \"salt\": \"one\""+
- " },"+
- " {"+
- " \"servers\": \"13\","+
- " \"busyTimeout\": \"33ms\","+
- " \"salt\": \"two\""+
- " },"+
- " {"+
- " \"servers\": \"100%\","+
- " \"busyTimeout\": \"33ms\""+
- " }"+
- " ]"+
- " },"+
- " {"+
- " \"isDefault\": false,"+
- " \"maxBusyTimeout\": \"5m\","+
- " \"busyTimeoutMultiplier\": 8,"+
- " \"group\": \"GROUP1\","+
- " \"scanTypeActivations\": [\"use_group1\"],"+
- " \"timeToWaitForScanServers\":\"0s\","+
- " \"attemptPlans\": ["+
- " {"+
- " \"servers\": \"3\","+
- " \"busyTimeout\": \"33ms\","+
- " \"salt\": \"one\""+
- " },"+
- " {"+
- " \"servers\": \"13\","+
- " \"busyTimeout\": \"33ms\","+
- " \"salt\": \"two\""+
- " },"+
- " {"+
- " \"servers\": \"100%\","+
- " \"busyTimeout\": \"33ms\""+
- " }"+
- " ]"+
- " }"+
- "]";
+ public static final String clientConfiguration = """
+ [ \
Review Comment:
I think I tracked down the issue. It has to do with the properties being
written to a file and then read back in. When using ` \` at the end of each
line in the text block, then the newlines are suppressed so that when the
property is written out to a file it's just one line. Without the ` \` at the
end of the line, each line contains a newline.
In MiniAccumuloCluster, the client properties are written to a file at
https://github.com/apache/accumulo/blob/4a4d84b3a955716a9a6751d2addd3cbcb5fc2a58/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java#L271-L272
and then read back in at
https://github.com/apache/accumulo/blob/4a4d84b3a955716a9a6751d2addd3cbcb5fc2a58/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java#L192-L193
After reading the client properties back in, the profile property contains
just one line, which in this case is `[` and the json parsing fails.
--
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]