alb3rtobr opened a new pull request #6638:
URL: https://github.com/apache/geode/pull/6638
`gfsh` handling of wrong disk store directories sizes can be improved. This
is the output when trying to use wrong values:
Negative size:
```
gfsh>create disk-store --name=storage --dir=dataStore#-100
Member | Status | Message
--------- | ------ |
-----------------------------------------------------------------------
theServer | ERROR | java.lang.IllegalArgumentException: Dir size cannot be
negative : -100
Did not complete waiting for Disk Store MBean proxy creation
```
Using a wrong number string:
```
gfsh>create disk-store --name=storage --dir=dataStore#123ABC
For input string: "123ABC"
```
Using a value bigger than the maximum allowed value which is `2147483647`
(`Integer.MAX_VALUE`):
```
gfsh>create disk-store --name=storage --dir=dataStore#2147483648
For input string: "2147483648"
```
This PR improves the user experience in this cases: the user gets a better
error message in the case of wrong number strings and values bigger than the
maximum, and it fails faster in case of negative values:
```
gfsh>create disk-store --name=storage --dir=dataStore#-100
Directory size cannot be negative (-100)
gfsh>create disk-store --name=storage --dir=dataStore#2147483648
Directory size (2147483648) is over the maximum allowed value.
gfsh>create disk-store --name=storage --dir=dataStore#123ABC
Incorrect directory size specified (123ABC)
```
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]