Skip to content

adds commands to import/export all config to/from yaml#6322

Open
keith-turner wants to merge 6 commits intoapache:mainfrom
keith-turner:yaml-props
Open

adds commands to import/export all config to/from yaml#6322
keith-turner wants to merge 6 commits intoapache:mainfrom
keith-turner:yaml-props

Conversation

@keith-turner
Copy link
Copy Markdown
Contributor

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.

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.
@keith-turner keith-turner added this to the 4.0.0 milestone Apr 17, 2026
Comment on lines +200 to +203
table.durability: sync,
table.failures.ignore: 'false',
table.file.compress.blocksize: 32K,
table.file.replication: '5',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason that some of these are surrounded by single quotes and some are not?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure and was wondering the same thing. Snakeyaml does that for some reason.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick Google search suggested trying the following in the DumperOptions to surround everything with a single quote:

options.setDefaultScalarStyle(DumperOptions.ScalarStyle.SINGLE_QUOTED);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants