[
https://issues.apache.org/jira/browse/HBASE-8548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13660097#comment-13660097
]
Nicolas Liochon commented on HBASE-8548:
----------------------------------------
I tried with a wider patch
{noformat}
Index:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
===================================================================
---
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(revision 1482641)
+++
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(working copy)
@@ -682,38 +682,7 @@
// Recover any edits if available.
maxSeqId = Math.max(maxSeqId, replayRecoveredEditsIfAny(
this.fs.getRegionDir(), maxSeqIdInStores, reporter, status));
-
- status.setStatus("Cleaning up detritus from prior splits");
- // Get rid of any splits or merges that were lost in-progress. Clean out
- // these directories here on open. We may be opening a region that was
- // being split but we crashed in the middle of it all.
- fs.cleanupAnySplitDetritus();
- fs.cleanupMergesDir();
- this.writestate.setReadOnly(this.htableDescriptor.isReadOnly());
-
- this.writestate.flushRequested = false;
- this.writestate.compacting = 0;
-
- // Initialize split policy
- this.splitPolicy = RegionSplitPolicy.create(this, conf);
-
- this.lastFlushTime = EnvironmentEdgeManager.currentTimeMillis();
- // Use maximum of log sequenceid or that which was found in stores
- // (particularly if no recovered edits, seqid will be -1).
- long nextSeqid = maxSeqId + 1;
- LOG.info("Onlined " + this.toString() + "; next sequenceid=" + nextSeqid);
-
- // A region can be reopened if failed a split; reset flags
- this.closing.set(false);
- this.closed.set(false);
-
- if (coprocessorHost != null) {
- status.setStatus("Running coprocessor post-open hooks");
- coprocessorHost.postOpen();
- }
-
- status.markComplete("Region opened successfully");
- return nextSeqid;
+ return maxSeqId;
}
/*
{noformat}
but this doesn't pass the tests. I will have a deeper look tomorrow.
> postOpen hook called twice
> --------------------------
>
> Key: HBASE-8548
> URL: https://issues.apache.org/jira/browse/HBASE-8548
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 0.95.0
> Environment: CentOS
> Reporter: Roger Ruiz-Carrillo
> Attachments: HRegion_HBASE-8548-0.95.patch
>
>
> postOpen hook is called twice when a region is initializing:
> Once at the end of the body of the initializeRegionInternals() method of the
> HRegion class.
> Once at the end initializeRegionStores() method of the HRegion class;
> initializeRegionStores() is called inside initializeRegionInternals() and as
> such causes the postOpen hook to be called twice.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira