You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2012/12/03 02:02:23 UTC

[jira] [Commented] (HBASE-7213) Have HLog files for .META. edits only

    [ https://issues.apache.org/jira/browse/HBASE-7213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508425#comment-13508425 ] 

Ted Yu commented on HBASE-7213:
-------------------------------

{code}
+    List<ServerName> serverNames = new ArrayList<ServerName>();
+    serverNames.add(serverName);
+    List<Path> logDirs = getLogDirs(serverNames);
{code}
The first two lines above can be moved below the if block which checks logDirs.isEmpty()
{code}
+   * @throws IOException
+   *             if there was an error while splitting any log file
+   * @return cumulative size of the logfiles split
+   * @throws IOException 
+   */
+  public long splitMetatLogDistributed(final List<Path> logDirs) throws IOException {
{code}
Please group the @throws lines together. The method name is misspelled - I couldn't find where it is called.
I think the above method is eclipsed by splitMetaLogDistributed() which appears later.
{code}
+      if (isCarryingMeta() || isCarryingRoot()) {
+        try {
+          LOG.info("Splitting META logs for " + serverName);
+          if (this.shouldSplitHlog) {
+            this.services.getMasterFileSystem().splitMetaLog(serverName);
{code}
The check for ROOT region above is for assigning ROOT. Suggest making the check of ROOT and .META. separate so that the logic is clearer.
{code}
+  protected HLog instantiateMetaHLog(Path rootdir, String logName) throws IOException {
+    return HLogFactory.createMetaHLog(this.fs.getBackingFs(), rootdir, logName, this.conf,
+        getMETAWALActionListeners(), this.serverNameFromMasterPOV.toString());
+  }
{code}
The above method is only called by setupMetaWAL(). Can we merge it with setupMetaWAL() ?
nit: getMETAWALActionListeners(), do we need to make all 4 letters of Meta capitalized ?
{code}
+      LOG.info("ISALIVE: " + leases.isAlive() + " " +cacheFlusher.isAlive() + " "+ this.compactionChecker.isAlive() + " " + hlogRoller.isAlive() + " " + metaHlogRoller.isAlive()); //REMOVETHIS
{code}
As the comment says: remove in next patch.
{code}
+class MetaLogRoller extends LogRoller {
{code}
Consider putting MetaLogRoller in its own class.

For MetaServices.java, please add license and audience annotation.
                
> Have HLog files for .META. edits only
> -------------------------------------
>
>                 Key: HBASE-7213
>                 URL: https://issues.apache.org/jira/browse/HBASE-7213
>             Project: HBase
>          Issue Type: Improvement
>          Components: master, regionserver
>            Reporter: Devaraj Das
>            Assignee: Devaraj Das
>         Attachments: 7213-in-progress.2.patch, 7213-in-progress.patch
>
>
> Over on HBASE-6774, there is a discussion on separating out the edits for .META. regions from the other regions' edits w.r.t where the edits are written. This jira is to track an implementation of that.

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