[ https://issues.apache.org/jira/browse/HBASE-19017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16206682#comment-16206682 ]
Hadoop QA commented on HBASE-19017: ----------------------------------- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 8m 51s{color} | {color:blue} Docker mode activated. {color} | | {color:green}+1{color} | {color:green} hbaseanti {color} | {color:green} 0m 0s{color} | {color:green} Patch does not have any anti-patterns. {color} | | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 0s{color} | {color:green} The patch appears to include 1 new or modified test files. {color} | | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 6m 25s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 6s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 1m 6s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 29s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} shadedjars {color} | {color:green} 7m 0s{color} | {color:green} branch has no errors when building our shaded downstream artifacts. {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 3m 25s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 42s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 8s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 7s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 7s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 1m 7s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 28s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} shadedjars {color} | {color:green} 5m 41s{color} | {color:green} patch has no errors when building our shaded downstream artifacts. {color} | | {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 58m 9s{color} | {color:green} Patch does not cause any errors with Hadoop 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3 or 3.0.0-alpha4. {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 4m 1s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 45s{color} | {color:green} the patch passed {color} | | {color:red}-1{color} | {color:red} unit {color} | {color:red}149m 39s{color} | {color:red} hbase-server in the patch failed. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 38s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black}245m 14s{color} | {color:black} {color} | \\ \\ || Reason || Tests || | Failed junit tests | hadoop.hbase.security.token.TestZKSecretWatcher | \\ \\ || Subsystem || Report/Notes || | Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hbase:5d60123 | | JIRA Issue | HBASE-19017 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12892430/HBASE-19017.patch | | Optional Tests | asflicense shadedjars javac javadoc unit findbugs hadoopcheck hbaseanti checkstyle compile | | uname | Linux 16c9c55bd1a0 3.13.0-119-generic #166-Ubuntu SMP Wed May 3 12:18:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | /home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build@2/component/dev-support/hbase-personality.sh | | git revision | master / 51489b20 | | Default Java | 1.8.0_144 | | findbugs | v3.1.0-RC3 | | unit | https://builds.apache.org/job/PreCommit-HBASE-Build/9145/artifact/patchprocess/patch-unit-hbase-server.txt | | Test Results | https://builds.apache.org/job/PreCommit-HBASE-Build/9145/testReport/ | | modules | C: hbase-server U: hbase-server | | Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/9145/console | | Powered by | Apache Yetus 0.4.0 http://yetus.apache.org | This message was automatically generated. > EnableTableProcedure is not retaining the assignments > ----------------------------------------------------- > > Key: HBASE-19017 > URL: https://issues.apache.org/jira/browse/HBASE-19017 > Project: HBase > Issue Type: Bug > Components: Region Assignment > Affects Versions: 2.0.0-alpha-3 > Reporter: ramkrishna.s.vasudevan > Assignee: ramkrishna.s.vasudevan > Fix For: 2.0.0-beta-1 > > Attachments: HBASE-19017.patch > > > Found this while working on HBASE-18946. In branch-1.4 when ever we do enable > table we try retain assignment. > But in branch-2 and trunk the EnableTableProcedure tries to get the location > from the existing regionNode. It always returns null because while doing > region CLOSE while disabling a table, the regionNode's 'regionLocation' is > made NULL but the 'lastHost' is actually having the servername where the > region was hosted. But on trying assignment again we try to see what was the > last RegionLocation and not the 'lastHost' and we go ahead with new > assignment. > On region CLOSE while disable table > {code} > public void markRegionAsClosed(final RegionStateNode regionNode) throws > IOException { > final RegionInfo hri = regionNode.getRegionInfo(); > synchronized (regionNode) { > State state = regionNode.transitionState(State.CLOSED, > RegionStates.STATES_EXPECTED_ON_CLOSE); > regionStates.removeRegionFromServer(regionNode.getRegionLocation(), > regionNode); > regionNode.setLastHost(regionNode.getRegionLocation()); > regionNode.setRegionLocation(null); > regionStateStore.updateRegionLocation(regionNode.getRegionInfo(), state, > regionNode.getRegionLocation()/*null*/, regionNode.getLastHost(), > HConstants.NO_SEQNUM, regionNode.getProcedure().getProcId()); > sendRegionClosedNotification(hri); > } > {code} > In AssignProcedure > {code} > ServerName lastRegionLocation = regionNode.offline(); > {code} > {code} > public ServerName setRegionLocation(final ServerName serverName) { > ServerName lastRegionLocation = this.regionLocation; > if (LOG.isTraceEnabled() && serverName == null) { > LOG.trace("Tracking when we are set to null " + this, new > Throwable("TRACE")); > } > this.regionLocation = serverName; > this.lastUpdate = EnvironmentEdgeManager.currentTime(); > return lastRegionLocation; > } > {code} > So further code in AssignProcedure > {code} > boolean retain = false; > if (!forceNewPlan) { > if (this.targetServer != null) { > retain = targetServer.equals(lastRegionLocation); > regionNode.setRegionLocation(targetServer); > } else { > if (lastRegionLocation != null) { > // Try and keep the location we had before we offlined. > retain = true; > regionNode.setRegionLocation(lastRegionLocation); > } > } > } > {code} > Tries to do retainAssignment but fails because lastRegionLocation is always > null. -- This message was sent by Atlassian JIRA (v6.4.14#64029)