adds commands to import/export all config to/from yaml#6322
adds commands to import/export all config to/from yaml#6322keith-turner wants to merge 6 commits intoapache:mainfrom
Conversation
These new command will make it easier to manage all accumulo properties in a configuration management system like git. The yaml produced has a very well defined sort order making it easy to diff two exports from different times. In follow on work can remove or deprecate some of the existing commands that have subsets of similar functionality.
| table.durability: sync, | ||
| table.failures.ignore: 'false', | ||
| table.file.compress.blocksize: 32K, | ||
| table.file.replication: '5', |
There was a problem hiding this comment.
Is there a reason that some of these are surrounded by single quotes and some are not?
There was a problem hiding this comment.
I am not sure and was wondering the same thing. Snakeyaml does that for some reason.
There was a problem hiding this comment.
Quick Google search suggested trying the following in the DumperOptions to surround everything with a single quote:
options.setDefaultScalarStyle(DumperOptions.ScalarStyle.SINGLE_QUOTED);
There was a problem hiding this comment.
Tried the SINGLE_QUOTED option and it quoted everything including the keys. In 9372df3 made some changes to use types that removed a lot of quoting. I think snakeyaml was trying to minimize quoting by default, but when given a string that contained an integer it quoted it to make the type clear. So made some changes to use integer and boolean types in the data given to snakeyaml instead of always using string.
These new command will make it easier to manage all accumulo properties in a configuration management system like git. The yaml produced has a very well defined sort order making it easy to diff two exports from different times.
In follow on work can remove or deprecate some of the existing commands that have subsets of similar functionality.