Skip to content
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

HBASE-22285 A normalizer which merges small size regions with adjacen… #931

Closed
wants to merge 8 commits into from
Closed

Conversation

mnpoonia
Copy link
Contributor

…t regions

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 7m 30s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ branch-1 Compile Tests _
+1 💚 mvninstall 8m 53s branch-1 passed
+1 💚 compile 0m 40s branch-1 passed with JDK v1.8.0_232
+1 💚 compile 0m 44s branch-1 passed with JDK v1.7.0_242
+1 💚 checkstyle 1m 34s branch-1 passed
+1 💚 shadedjars 2m 51s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 37s branch-1 passed with JDK v1.8.0_232
+1 💚 javadoc 0m 41s branch-1 passed with JDK v1.7.0_242
+0 🆗 spotbugs 2m 51s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 2m 49s branch-1 passed
_ Patch Compile Tests _
+1 💚 mvninstall 1m 59s the patch passed
+1 💚 compile 0m 42s the patch passed with JDK v1.8.0_232
+1 💚 javac 0m 42s the patch passed
+1 💚 compile 0m 45s the patch passed with JDK v1.7.0_242
+1 💚 javac 0m 45s the patch passed
-1 ❌ checkstyle 1m 31s hbase-server: The patch generated 10 new + 0 unchanged - 0 fixed = 10 total (was 0)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
-1 ❌ shadedjars 2m 0s patch has 10 errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 5m 1s Patch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚 javadoc 0m 30s the patch passed with JDK v1.8.0_232
+1 💚 javadoc 0m 41s the patch passed with JDK v1.7.0_242
+1 💚 findbugs 2m 53s the patch passed
_ Other Tests _
-1 ❌ unit 124m 1s hbase-server in the patch failed.
-1 ❌ asflicense 0m 33s The patch generated 2 ASF License warnings.
170m 40s
Reason Tests
Failed junit tests hadoop.hbase.regionserver.TestSplitTransactionOnCluster
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/1/artifact/out/Dockerfile
GITHUB PR #931
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux d78bb7c53e83 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-931/out/precommit/personality/provided.sh
git revision branch-1 / 84c0a90
Default Java 1.7.0_242
Multi-JDK versions /usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/1/artifact/out/diff-checkstyle-hbase-server.txt
shadedjars https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/1/artifact/out/patch-shadedjars.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/1/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/1/testReport/
asflicense https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/1/artifact/out/patch-asflicense-problems.txt
Max. process+thread count 4107 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/1/console
versions git=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

mergeEnabled = masterRpcServices.isSplitOrMergeEnabled(null,
RequestConverter.buildIsSplitOrMergeEnabledRequest(Admin.MasterSwitchType.MERGE)).getEnabled();
} catch (ServiceException se) {
LOG.debug("Unable to determine whether merge is enabled", se);
Copy link
Contributor

Choose a reason for hiding this comment

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

LOG.error() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can make it WARN but not error. Its a valid scenario for table to disable merge and still at cluster level have normalizer enabled.

* <li> get all regions of a given table
* <li> get avg size S of each region (by total size of store files reported in RegionLoad)
* <li> Otherwise, two region R1 and its smallest neighbor R2 are merged,
* if R1 + R1 &lt; S, and all such regions are returned to be merged
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: R1 + R2 &lt; S

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for catching that

candidateIdx++;
}
} catch (Exception e) {
e.printStackTrace();
Copy link
Contributor

@virajjasani virajjasani Dec 13, 2019

Choose a reason for hiding this comment

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

nit: LOG.error("MergeNormalizer failed for region {} and {}", r1Name, r2Name, e);

"Table " + table + ", small region size: " + regionSize + " plus its neighbor size: "
+ regionSize2 + ", less than the avg size " + avgRegionSize + ", merging them");
plans.add(new MergeNormalizationPlan(hri, hri2));
candidateIdx++;
Copy link
Contributor

Choose a reason for hiding this comment

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

should be candidateIdx = candidateIdx + 2? e.g. if we have 3 regions: r1, r2, r3 and if we consider r1, r2 for merging, plans should have only one entry with Plan(r1, r2) right? but with candidateIdx++, we might end up adding 2 plans: Plan(r1, r2) and Plan(r2, r3)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is candidateIdx++ outside if block and was kept outside purposefully.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, got it

Copy link
Contributor

@wchevreuil wchevreuil left a comment

Choose a reason for hiding this comment

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

Additional to @virajjasani observations, had made some minor suggestions over the code. On Another thought, the main structure for computePlanForTable looks very similar to the one from SimpleRegionNormalizer. Would it be too difficult to refactor _SimpleRegionNormalizer so that both normalizer implementations could make most of code reuse?

}
HRegionInfo hri2 = tableRegions.get(candidateIdx + 1);
long regionSize2 = getRegionSize(hri2);
if (regionSize >= 0 && regionSize2 >= 0 && regionSize + regionSize2 < avgRegionSize) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe worth logging (debug?) regions that didn't pass this check.

Comment on lines 119 to 123
if (!(new Timestamp(hriTime.getTime() + TimeUnit.DAYS.toMillis(MIN_DURATION_FOR_MERGE)))
.after(currentTime)
|| !(new Timestamp(
hri2Time.getTime() + TimeUnit.DAYS.toMillis(MIN_DURATION_FOR_MERGE)))
.after(currentTime)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Few minor suggestions:

  1. Maybe worth mention this extra condition on the class javadoc comment.
  2. The checking logic seems duplicate. Place the check into a separate method:
    !(new Timestamp(hriTime.getTime() + TimeUnit.DAYS.toMillis(MIN_DURATION_FOR_MERGE))) .after(currentTime)
  3. Make MIN_DURATION_FOR_MERGE configurable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 8m 19s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ branch-1 Compile Tests _
+1 💚 mvninstall 9m 0s branch-1 passed
+1 💚 compile 0m 46s branch-1 passed with JDK v1.8.0_232
+1 💚 compile 0m 53s branch-1 passed with JDK v1.7.0_242
+1 💚 checkstyle 1m 59s branch-1 passed
+1 💚 shadedjars 3m 30s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 41s branch-1 passed with JDK v1.8.0_232
+1 💚 javadoc 0m 50s branch-1 passed with JDK v1.7.0_242
+0 🆗 spotbugs 3m 20s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 3m 15s branch-1 passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 26s the patch passed
+1 💚 compile 0m 50s the patch passed with JDK v1.8.0_232
+1 💚 javac 0m 50s the patch passed
+1 💚 compile 0m 54s the patch passed with JDK v1.7.0_242
+1 💚 javac 0m 54s the patch passed
-1 ❌ checkstyle 1m 56s hbase-server: The patch generated 4 new + 0 unchanged - 0 fixed = 4 total (was 0)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 3m 19s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 6m 8s Patch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚 javadoc 0m 32s the patch passed with JDK v1.8.0_232
+1 💚 javadoc 0m 45s the patch passed with JDK v1.7.0_242
+1 💚 findbugs 3m 17s the patch passed
_ Other Tests _
+1 💚 unit 129m 22s hbase-server in the patch passed.
+1 💚 asflicense 0m 31s The patch does not generate ASF License warnings.
183m 15s
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/2/artifact/out/Dockerfile
GITHUB PR #931
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 32b4f202dd2f 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-931/out/precommit/personality/provided.sh
git revision branch-1 / 28673f0
Default Java 1.7.0_242
Multi-JDK versions /usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/2/artifact/out/diff-checkstyle-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/2/testReport/
Max. process+thread count 4394 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/2/console
versions git=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@mnpoonia
Copy link
Contributor Author

mnpoonia commented Dec 17, 2019

Another thought, the main structure for computePlanForTable looks very similar to the one from SimpleRegionNormalizer. Would it be too difficult to refactor _SimpleRegionNormalizer so that both normalizer implementations could make most of code reuse?

After giving it a thought i believe we should have two normalizers one which splits and second which merges and may be third SimpleRegionNormalizer which uses these two and together.
And to reuse code maybe we can have a utility class for normalizer which contains only pure methods which will help other normalization implementations.
@wchevreuil
An example mnpoonia@b8489d5

@mnpoonia
Copy link
Contributor Author

Also i will make the MIN_DURATION_FOR_MERGE configurable.
@apurtell - FYI

@wchevreuil
Copy link
Contributor

After giving it a thought i believe we should have two normalizers one which splits and second which merges and may be third SimpleRegionNormalizer which uses these two and together.
And to reuse code maybe we can have a utility class for normalizer which contains only pure methods which will help other normalization implementations.

I'm not sure moving logic to an util class is a good design practice. Here I think we could probably do a strategy pattern: An abstract normalizer class implementing most of computePlanForTable logic, with only the parts related to picking a region to the region plan and what actions should be perfomed over the region plan (merge, or split, or both) being delegated to methods that would be implemented differently on each of the subclasses.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 37s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
-1 ❌ hbaseanti 0m 0s The patch appears use Hadoop classification instead of HBase.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ branch-1 Compile Tests _
+1 💚 mvninstall 8m 44s branch-1 passed
+1 💚 compile 0m 39s branch-1 passed with JDK v1.8.0_232
+1 💚 compile 0m 44s branch-1 passed with JDK v1.7.0_242
+1 💚 checkstyle 1m 34s branch-1 passed
+1 💚 shadedjars 2m 51s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 37s branch-1 passed with JDK v1.8.0_232
+1 💚 javadoc 0m 42s branch-1 passed with JDK v1.7.0_242
+0 🆗 spotbugs 2m 54s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 2m 52s branch-1 passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 1s the patch passed
+1 💚 compile 0m 39s the patch passed with JDK v1.8.0_232
+1 💚 javac 0m 39s the patch passed
+1 💚 compile 0m 44s the patch passed with JDK v1.7.0_242
+1 💚 javac 0m 44s the patch passed
+1 💚 checkstyle 1m 32s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 2m 43s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 4m 59s Patch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚 javadoc 0m 29s the patch passed with JDK v1.8.0_232
+1 💚 javadoc 0m 41s the patch passed with JDK v1.7.0_242
+1 💚 findbugs 2m 49s the patch passed
_ Other Tests _
+1 💚 unit 128m 39s hbase-server in the patch passed.
+1 💚 asflicense 0m 32s The patch does not generate ASF License warnings.
168m 37s
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/3/artifact/out/Dockerfile
GITHUB PR #931
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux d75d0ccbe3ef 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-931/out/precommit/personality/provided.sh
git revision branch-1 / 85b43a7
Default Java 1.7.0_242
Multi-JDK versions /usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/3/testReport/
Max. process+thread count 4234 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/3/console
versions git=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

private static final int MIN_DURATION_FOR_MERGE = 2;

@Override
public List<NormalizationPlan> computePlanForTable(TableName table) throws HBaseIOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we implement all common parts of computePlanForTable in the base parent class, then only merge or split normalizer specifc logic would need to go on the implementations?

Comment on lines 77 to 84
if (isOldEnoughToMerge(hri) || isOldEnoughToMerge(hri2)) {
LOG.info(
"Table {}, small region size: {} plus its neighbor size: {}, less than the avg size "
+ "{}, merging them",
table, regionSize, regionSize2, avgRegionSize);
plans.add(new MergeNormalizationPlan(hri, hri2));
candidateIdx++;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

For example, this could go to a separate, abstract method computeNormalization in the base parent class, then MergeNormalizer would implement it as it is now, and SimpleRegionNormalizer would do it the way it does now.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ docker 5m 51s Docker failed to build yetus/hbase:41990ba20a.
Subsystem Report/Notes
GITHUB PR #931
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/4/console
versions git=2.17.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

RequestConverter.buildIsSplitOrMergeEnabledRequest(Admin.MasterSwitchType.MERGE))
.getEnabled();
} catch (ServiceException se) {
LOG.debug("Unable to determine whether merge is enabled", se);
Copy link
Contributor

Choose a reason for hiding this comment

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

want to convert this to error or warn log?

RequestConverter.buildIsSplitOrMergeEnabledRequest(Admin.MasterSwitchType.SPLIT))
.getEnabled();
} catch (ServiceException se) {
LOG.debug("Unable to determine whether merge is enabled", se);
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

WARN it is. 😄


private static final Log LOG = LogFactory.getLog(SimpleRegionNormalizer.class);
public class SimpleRegionNormalizer extends BaseNormalizer {
private static final Logger LOG = LoggerFactory.getLogger(SimpleRegionNormalizer.class);
private static final int MIN_REGION_COUNT = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

MergeNormalizer and SimpleRegionNormalizer both can use same constant MIN_REGION_COUNT, may be good to move it to HConstant

Copy link
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 about this yet. Let me think a bit. The point is that both normalizer can have different requirement for the MIN_REGION_COUNT. But then we can't have both normalizer enabled together.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, also this is mostly same constant. if we want to use configs for these values(which we don't want I believe), then we could use it separately but here, may be we can refer to same constant.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 42s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
-1 ❌ hbaseanti 0m 0s The patch appears use Hadoop classification instead of HBase.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 3 new or modified test files.
_ branch-1 Compile Tests _
+0 🆗 mvndep 1m 24s Maven dependency ordering for branch
+1 💚 mvninstall 7m 32s branch-1 passed
+1 💚 compile 1m 4s branch-1 passed with JDK v1.8.0_232
+1 💚 compile 1m 10s branch-1 passed with JDK v1.7.0_242
+1 💚 checkstyle 2m 11s branch-1 passed
+1 💚 shadedjars 2m 59s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 52s branch-1 passed with JDK v1.8.0_232
+1 💚 javadoc 1m 10s branch-1 passed with JDK v1.7.0_242
+0 🆗 spotbugs 2m 49s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 3m 57s branch-1 passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 17s Maven dependency ordering for patch
+1 💚 mvninstall 2m 0s the patch passed
+1 💚 compile 1m 5s the patch passed with JDK v1.8.0_232
+1 💚 javac 1m 5s the patch passed
+1 💚 compile 1m 13s the patch passed with JDK v1.7.0_242
+1 💚 javac 1m 13s the patch passed
+1 💚 checkstyle 0m 33s The patch passed checkstyle in hbase-common
+1 💚 checkstyle 1m 40s hbase-server: The patch generated 0 new + 4 unchanged - 2 fixed = 4 total (was 6)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 3m 2s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 5m 20s Patch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚 javadoc 0m 52s the patch passed with JDK v1.8.0_232
+1 💚 javadoc 1m 7s the patch passed with JDK v1.7.0_242
-1 ❌ findbugs 3m 13s hbase-server generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
_ Other Tests _
+1 💚 unit 2m 49s hbase-common in the patch passed.
+1 💚 unit 126m 22s hbase-server in the patch passed.
+1 💚 asflicense 0m 56s The patch does not generate ASF License warnings.
179m 56s
Reason Tests
FindBugs module:hbase-server
Dead store to entries in org.apache.hadoop.hbase.master.normalizer.MergeNormalizer.getMinimumDurationBeforeMerge() At MergeNormalizer.java:org.apache.hadoop.hbase.master.normalizer.MergeNormalizer.getMinimumDurationBeforeMerge() At MergeNormalizer.java:[line 131]
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/5/artifact/out/Dockerfile
GITHUB PR #931
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 82b2a708c4c9 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-931/out/precommit/personality/provided.sh
git revision branch-1 / 27fc96e
Default Java 1.7.0_242
Multi-JDK versions /usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
findbugs https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/5/artifact/out/new-findbugs-hbase-server.html
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/5/testReport/
Max. process+thread count 4214 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/5/console
versions git=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 38s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
-1 ❌ hbaseanti 0m 0s The patch appears use Hadoop classification instead of HBase.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 3 new or modified test files.
_ branch-1 Compile Tests _
+0 🆗 mvndep 1m 22s Maven dependency ordering for branch
+1 💚 mvninstall 7m 19s branch-1 passed
+1 💚 compile 1m 0s branch-1 passed with JDK v1.8.0_232
+1 💚 compile 1m 6s branch-1 passed with JDK v1.7.0_242
+1 💚 checkstyle 2m 1s branch-1 passed
+1 💚 shadedjars 2m 54s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 53s branch-1 passed with JDK v1.8.0_232
+1 💚 javadoc 1m 3s branch-1 passed with JDK v1.7.0_242
+0 🆗 spotbugs 2m 39s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 3m 45s branch-1 passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 16s Maven dependency ordering for patch
+1 💚 mvninstall 1m 59s the patch passed
+1 💚 compile 0m 58s the patch passed with JDK v1.8.0_232
+1 💚 javac 0m 58s the patch passed
+1 💚 compile 1m 6s the patch passed with JDK v1.7.0_242
+1 💚 javac 1m 6s the patch passed
+1 💚 checkstyle 0m 29s The patch passed checkstyle in hbase-common
+1 💚 checkstyle 1m 28s hbase-server: The patch generated 0 new + 0 unchanged - 6 fixed = 0 total (was 6)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 2m 44s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 5m 0s Patch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚 javadoc 0m 52s the patch passed with JDK v1.8.0_232
+1 💚 javadoc 1m 6s the patch passed with JDK v1.7.0_242
-1 ❌ findbugs 2m 54s hbase-server generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
_ Other Tests _
+1 💚 unit 2m 51s hbase-common in the patch passed.
-1 ❌ unit 125m 39s hbase-server in the patch failed.
+1 💚 asflicense 0m 56s The patch does not generate ASF License warnings.
175m 43s
Reason Tests
FindBugs module:hbase-server
Dead store to entries in org.apache.hadoop.hbase.master.normalizer.MergeNormalizer.getMinimumDurationBeforeMerge() At MergeNormalizer.java:org.apache.hadoop.hbase.master.normalizer.MergeNormalizer.getMinimumDurationBeforeMerge() At MergeNormalizer.java:[line 111]
Failed junit tests hadoop.hbase.master.TestMasterMetrics
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/6/artifact/out/Dockerfile
GITHUB PR #931
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 19d523ff1edd 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-931/out/precommit/personality/provided.sh
git revision branch-1 / 27fc96e
Default Java 1.7.0_242
Multi-JDK versions /usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
findbugs https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/6/artifact/out/new-findbugs-hbase-server.html
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/6/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/6/testReport/
Max. process+thread count 4154 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/6/console
versions git=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 41s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
-1 ❌ hbaseanti 0m 0s The patch appears use Hadoop classification instead of HBase.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 3 new or modified test files.
_ branch-1 Compile Tests _
+0 🆗 mvndep 1m 22s Maven dependency ordering for branch
+1 💚 mvninstall 7m 22s branch-1 passed
+1 💚 compile 1m 1s branch-1 passed with JDK v1.8.0_232
+1 💚 compile 1m 7s branch-1 passed with JDK v1.7.0_242
+1 💚 checkstyle 2m 10s branch-1 passed
+1 💚 shadedjars 2m 58s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 51s branch-1 passed with JDK v1.8.0_232
+1 💚 javadoc 1m 7s branch-1 passed with JDK v1.7.0_242
+0 🆗 spotbugs 2m 45s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 3m 54s branch-1 passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 19s Maven dependency ordering for patch
+1 💚 mvninstall 2m 4s the patch passed
+1 💚 compile 0m 59s the patch passed with JDK v1.8.0_232
+1 💚 javac 0m 59s the patch passed
+1 💚 compile 1m 9s the patch passed with JDK v1.7.0_242
+1 💚 javac 1m 8s the patch passed
+1 💚 checkstyle 0m 29s The patch passed checkstyle in hbase-common
+1 💚 checkstyle 1m 37s hbase-server: The patch generated 0 new + 0 unchanged - 6 fixed = 0 total (was 6)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 2m 48s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 5m 16s Patch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚 javadoc 0m 50s the patch passed with JDK v1.8.0_232
+1 💚 javadoc 1m 6s the patch passed with JDK v1.7.0_242
+1 💚 findbugs 4m 11s the patch passed
_ Other Tests _
+1 💚 unit 2m 34s hbase-common in the patch passed.
-1 ❌ unit 127m 14s hbase-server in the patch failed.
+1 💚 asflicense 0m 53s The patch does not generate ASF License warnings.
178m 2s
Reason Tests
Failed junit tests hadoop.hbase.security.token.TestGenerateDelegationToken
Subsystem Report/Notes
Docker Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/7/artifact/out/Dockerfile
GITHUB PR #931
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux daf16f1c9047 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-931/out/precommit/personality/provided.sh
git revision branch-1 / 27fc96e
Default Java 1.7.0_242
Multi-JDK versions /usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/7/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/7/testReport/
Max. process+thread count 4412 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/7/console
versions git=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.


int candidateIdx = 0;
while (candidateIdx < tableRegions.size()) {
if (candidateIdx == tableRegions.size() - 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we can get rid of this if condition with while( candidateIdx < tableRegions.size()-1 )

plans.add(new MergeNormalizationPlan(hri, hri2));
candidateIdx++;
} else {
LOG.debug("Skipping region {} of table {} with size {}", hri.getRegionId(), table,
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of regionId, may be good to print region name with hri.getRegionNameAsString()

if (splitEnabled) {
List<NormalizationPlan> splitNormalizationPlan = getSplitNormalizationPlan(table);
if (splitNormalizationPlan != null) {
plans = splitNormalizationPlan;
Copy link
Contributor

Choose a reason for hiding this comment

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

To keep it aligned with mergeNormalization, here also, it's good to add all: plans.addAll(splitNormalizationPlan)

}
}
if (mergeEnabled) {
List<NormalizationPlan> normalizationPlans = getMergeNormalizationPlan(table);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: rename to mergeNormalizationPlans?

private boolean shouldNormalize(TableName table) {
boolean normalize = false;
if (table == null || table.isSystemTable()) {
LOG.debug("Normalization of system table {} isn't allowed", table);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think table could be null here, and we can remove null check from this if condition. Even if null was possible, log message would not be appropriate: Normalization of system table null isn't allowed

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 48s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
-1 ❌ hbaseanti 0m 0s The patch appears use Hadoop classification instead of HBase.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 3 new or modified test files.
_ branch-1 Compile Tests _
+0 🆗 mvndep 2m 23s Maven dependency ordering for branch
+1 💚 mvninstall 7m 56s branch-1 passed
+1 💚 compile 0m 58s branch-1 passed with JDK v1.8.0_252
+1 💚 compile 1m 6s branch-1 passed with JDK v1.7.0_262
+1 💚 checkstyle 2m 12s branch-1 passed
+1 💚 shadedjars 3m 1s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 59s branch-1 passed with JDK v1.8.0_252
+1 💚 javadoc 1m 7s branch-1 passed with JDK v1.7.0_262
+0 🆗 spotbugs 2m 59s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 4m 15s branch-1 passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 17s Maven dependency ordering for patch
+1 💚 mvninstall 2m 2s the patch passed
+1 💚 compile 1m 6s the patch passed with JDK v1.8.0_252
+1 💚 javac 1m 6s the patch passed
+1 💚 compile 1m 13s the patch passed with JDK v1.7.0_262
+1 💚 javac 1m 13s the patch passed
+1 💚 checkstyle 0m 28s The patch passed checkstyle in hbase-common
+1 💚 checkstyle 1m 33s hbase-server: The patch generated 0 new + 0 unchanged - 6 fixed = 0 total (was 6)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedjars 2m 58s patch has no errors when building our shaded downstream artifacts.
+1 💚 hadoopcheck 4m 53s Patch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚 javadoc 0m 50s the patch passed with JDK v1.8.0_252
+1 💚 javadoc 1m 9s the patch passed with JDK v1.7.0_262
+1 💚 findbugs 4m 28s the patch passed
_ Other Tests _
+1 💚 unit 2m 40s hbase-common in the patch passed.
-1 ❌ unit 136m 20s hbase-server in the patch failed.
+1 💚 asflicense 0m 54s The patch does not generate ASF License warnings.
189m 32s
Reason Tests
Failed junit tests hadoop.hbase.master.TestWarmupRegion
Subsystem Report/Notes
Docker Client=19.03.9 Server=19.03.9 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/1/artifact/out/Dockerfile
GITHUB PR #931
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux f839211cc491 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-931/out/precommit/personality/provided.sh
git revision branch-1 / 3235b56
Default Java 1.7.0_262
Multi-JDK versions /usr/lib/jvm/zulu-8-amd64:1.8.0_252 /usr/lib/jvm/zulu-7-amd64:1.7.0_262
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/1/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/1/testReport/
Max. process+thread count 4430 (vs. ulimit of 10000)
modules C: hbase-common hbase-server U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-931/1/console
versions git=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@mnpoonia mnpoonia closed this Aug 30, 2020
@mnpoonia mnpoonia deleted the HBASE-22285 branch August 30, 2020 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants