keith-turner commented on code in PR #5935:
URL: https://github.com/apache/accumulo/pull/5935#discussion_r2388226785


##########
core/src/main/java/org/apache/accumulo/core/client/admin/compaction/CompactableFile.java:
##########
@@ -52,12 +52,4 @@ static CompactableFile create(URI uri, long estimatedSize, 
long estimatedEntries
     return new CompactableFileImpl(uri, estimatedSize, estimatedEntries);
   }
 
-  /**
-   * Creates a new CompactableFile object that implements this interface.
-   *
-   * @since 4.0.0
-   */
-  static CompactableFile create(URI uri, Range range, long estimatedSize, long 
estimatedEntries) {

Review Comment:
   One of the methods is existing public API that was added in 2.1.0 and should 
be deprecated.  The other was added when added ranges to metadata file entries.
   
   > Does "useful" (especially for unit testing) imply "should be new public 
API", though?
   
   Yes, these are useful in the public API for two reasons.  They can be used 
by anyone who writes one of the compaction plugins and wishes to unit test 
their plugin.  Mocking these objects is non trivial because they have non 
trivial hashCode and equals functions, so attempting to mock them in a user 
unit test would likely be wrong and if correct would involve a lot of 
duplicative effort.  Plugins will likely need to do set operations on these 
that require hashCode and equals.  The easiest option for the user would be to 
use CompactableFileImpl in their unit test if these do not exist.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to