keith-turner commented on code in PR #3439:
URL: https://github.com/apache/accumulo/pull/3439#discussion_r1211666752
##########
server/manager/src/main/java/org/apache/accumulo/manager/split/Splitter.java:
##########
@@ -112,10 +102,7 @@ private static int weigh(KeyExtent keyExtent) {
return size;
}
- public Splitter(ServerContext context, Ample.DataLevel level, Manager
manager) {
- this.context = context;
- this.level = level;
- this.manager = manager;
+ public Splitter(ServerContext context) {
this.splitExecutor =
context.threadPools().createExecutorService(context.getConfiguration(),
Property.MANAGER_SPLIT_WORKER_THREADS, true);
this.scanExecutor =
Review Comment:
This thread pool may be able to be removed
##########
server/manager/src/main/java/org/apache/accumulo/manager/split/Splitter.java:
##########
@@ -197,6 +182,10 @@ public boolean shouldInspect(TabletMetadata tablet) {
if (hashCode != null) {
if (hashCode.equals(caclulateFilesHash(tablet))) {
return false;
+ } else {
+ // We know that the list of files for this tablet have changed
+ // so we can remove it from the set of unsplittable tablets.
+ unsplittable.invalidate(tablet.getExtent());
Review Comment:
This is a nice fix. Would be nice to add a unit test for this case.
##########
server/manager/src/test/java/org/apache/accumulo/manager/split/SplitterTest.java:
##########
@@ -65,23 +65,23 @@ public void testShouldInspect() {
expect(tabletMeta2.getExtent()).andReturn(ke2).anyTimes();
replay(tabletMeta2);
- assertTrue(splitter.shouldInspect(tabletMeta1));
Review Comment:
The method name for this test has shouldInspect in it, could rename the test
method.
--
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]