Skip to content

Add PrintInfo options to dump full keys, apply formatter#1537

Merged
drewfarris merged 2 commits intoapache:masterfrom
drewfarris:printinfo-formatter
Mar 13, 2020
Merged

Add PrintInfo options to dump full keys, apply formatter#1537
drewfarris merged 2 commits intoapache:masterfrom
drewfarris:printinfo-formatter

Conversation

@drewfarris
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Member

@ctubbsii ctubbsii left a comment

Choose a reason for hiding this comment

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

@drewfarris Do these changes work on the current development branch? (master) Specifically, I'm concerned that Formatter is not public API, and adding it here could cause problems between branches.

Also, new features typically shouldn't be added to maintenance branches. I know we're preparing to release 1.10, so it would be a minor version, where new features are okay, but I still have reservations about going back to older versions to try to support new features there, but especially so if it stalls work on the latest development branch. It could also be very confusing to have the feature in 1.10, not have it in 2.0, and then to have it in 2.1. I could be convinced that these are important enough changes that we definitely need them in 1.10... but normally, I'd argue for changes like these to be put in the next version.

@drewfarris
Copy link
Copy Markdown
Contributor Author

drewfarris commented Mar 2, 2020

@drewfarris Do these changes work on the current development branch? (master) Specifically, I'm concerned that Formatter is not public API, and adding it here could cause problems between branches.

@ctubbsii Would Keith's suggestion of BiFunction<Key, Value, String> address this concern? It eliminates the reliance on the Formatter API entirely.

Also, new features typically shouldn't be added to maintenance branches. [..] . I could be convinced that these are important enough changes that we definitely need them in 1.10... but normally, I'd argue for changes like these to be put in the next version.

I agree with the principle of adding this to the newest branch. We really shouldn't be adding features to a 'legacy' baseline. I don't have a compelling argument for putting in in 1.10 other than it is the version we're using in our development and production environments currently and I have a practical need for this feature in that environment. I'd prefer not to maintain a patch/fork for this somewhat trivial feature that most folks won't observe.

I agree with your point about the fact that this should be targeted at all branches 1.10, 2.0, 2.1 - and I intend to do that based on your feedback. Unfortunately there's just not a nice way to do that without opening multiple PR's which I'd like to avoid until we all have notional agreement that this is a good thing to do (in order to maintain a single conversation thread.)

@drewfarris drewfarris changed the base branch from 1.9 to master March 6, 2020 22:13
@drewfarris drewfarris force-pushed the printinfo-formatter branch from 5b7a3b9 to 5b5976f Compare March 6, 2020 22:23
@drewfarris
Copy link
Copy Markdown
Contributor Author

@ctubbsii - retargeted at master.

Copy link
Copy Markdown
Contributor

@keith-turner keith-turner left a comment

Choose a reason for hiding this comment

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

Would be nice to fail with an error message if --fullKeys and --formatter are specified.

@ctubbsii
Copy link
Copy Markdown
Member

ctubbsii commented Mar 6, 2020

Unfortunately there's just not a nice way to do that without opening multiple PR's which I'd like to avoid until we all have notional agreement that this is a good thing to do (in order to maintain a single conversation thread.)

While I think new feature development in upstream Accumulo should focus on targeting the master branch, I understand the practical desire to have such features in currently used versions. Once we reach consensus on how this should look in master, I wouldn't be strongly opposed to backporting these flags to 1.10, if the change is small and can be done with minimal impact. I just think it's best to vet new features in master first, since that's where main development is happening.

@drewfarris
Copy link
Copy Markdown
Contributor Author

Would be nice to fail with an error message if --fullKeys and --formatter are specified.

done. The wording is a little weird because both --fullKeys and --dump are mutually exclusive with --formater, but hopefully you'll agree this is sufficient as it.

If you assign the unchecked code to a variable, you can add this suppression on just that assignment, so it doesn't mask other (fixable, avoidable) problems in the method.

done. I'd wanted to do this, but hadn't figured out the variable assignment bit, thanks.

we should probably hard-fail by letting this exception fall through, rather than returning null and by effetively wasting time dumping a file in a format the user doesn't want.

done, also removed the null check as it was unnecessary.

Copy link
Copy Markdown
Member

@ctubbsii ctubbsii left a comment

Choose a reason for hiding this comment

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

LGTM

@drewfarris drewfarris merged commit d4542ef into apache:master Mar 13, 2020
@drewfarris drewfarris deleted the printinfo-formatter branch March 13, 2020 19:51
@ctubbsii ctubbsii added this to the 2.1.0 milestone Jul 12, 2024
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.

4 participants