-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-28432 Refactor tools which are under test packaging to a new mo… #6249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
very rough change. lot of things to handle:
Will post a summary of changes and things to be take care of later tomorrow |
ee858f5 to
da6b839
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
da6b839 to
469be3d
Compare
|
Change Summary
TODO
@ndimiduk, @stoty @Apache9 Would you be able to provide some early feedback for this draft PR.? |
469be3d to
167c153
Compare
This comment has been minimized.
This comment has been minimized.
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
stoty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not having to deal with Copy classes would also make the patch much smaller, half the files only differ due to those renames.
| * Remove after tfile is committed and use the tfile version of this class instead. | ||
| * </p> | ||
| */ | ||
| public class RandomDistributionCopy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bad name.
Do we need two copies of this class ? Can't we just move this from hbase-compression to hbase-common with the same name ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same applies to the other "Copy" classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @stoty Thanks for having a look at the PR.
Do we need two copies of this class ? Can't we just move this from hbase-compression to hbase-common with the same name ?
These files are not supposed to be bundled and are here only for draft change. please see previous comment where I have captured a summary of changes: #6249 (comment)
See
Created a copy just to bring out the all the usages of the class to help decide (based on references) where we move this in final patch:
RandomDistribution
KeyProviderForTesting
LoadTestKVGenerator
Also see
Deal with copied classes which have cyclic dependencies and remove all copies and its references
Should we copy these to main of hbase-server or hbase-common?
I have created copy to show case how these files are being used across the project. Just want to discuss
- if it is fine to move these files to proper module, outside hbase-diagnostics to resolve cyclic dependencies of usage
- or is it fine to create a new copy them retaining the test copies where ever they are, which IMO is not clean code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just move this from hbase-compression to hbase-common with the same name ?
I am +1 on moving to hbase-common. Will wait some time before updating draft with this change, lets also see what other think about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a separete patch on top of this one which moves the classes to hbase-common ?
You can open a separate PR for that one, so this one still shows what you wanted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see how big the patch is without the copies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a separete patch on top of this one which moves the classes to hbase-common ?
Sure @stoty let me post a new PR with suggested change.
| table.close(); | ||
|
|
||
| } | ||
| // TODO: Below test seems to be using FilterAllFilter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to resolve this before commit
|
Sorry I did not read your comments @NihalJain . |
Hey @stoty no problem at all. I have raised a new PR with suggested changes where I will continue rest of the work, will close this one soon |
…dule hbase-diagnostics
The purpose of this task is to refactor and move certain tools currently located under the test packaging to a new module, named 'hbase-diagnostics'.
The following tools have been initially identified for relocation(will add more as and when identified):
These tools are valuable beyond the scope of testing and should be accessible in the binary distribution of HBase. However, their current location within the test jars adds unnecessary bloat to the assembly and classpath, and potentially introduces CVE-prone JARs into the binary assemblies. We plan to remove all test jars from assembly with HBASE-28433.
This task involves creating the new 'hbase-diagnostics' module, and moving the identified tools into this module. It also includes ensuring that these tools function correctly in their new location and that their relocation does not negatively impact any existing functionality or dependencies.
Also see draft patch without this change for follow up work HBASE-28433 at #6184