hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r713467 - in /hadoop/hbase/branches/0.18: ./ src/java/org/apache/hadoop/hbase/ src/java/org/apache/hadoop/hbase/master/ src/java/org/apache/hadoop/hbase/regionserver/
Date Wed, 12 Nov 2008 19:30:05 GMT
Author: jimk
Date: Wed Nov 12 11:30:04 2008
New Revision: 713467

URL: http://svn.apache.org/viewvc?rev=713467&view=rev
Log:
HBASE-602   HBase Crash when network card has a IPv6 address

Modified:
    hadoop/hbase/branches/0.18/CHANGES.txt
    hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/HServerAddress.java
    hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/master/ProcessServerShutdown.java
    hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/regionserver/HLog.java
    hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hadoop/hbase/branches/0.18/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.18/CHANGES.txt?rev=713467&r1=713466&r2=713467&view=diff
==============================================================================
--- hadoop/hbase/branches/0.18/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.18/CHANGES.txt Wed Nov 12 11:30:04 2008
@@ -1,6 +1,11 @@
 HBase Change Log
 
-Release 0.18.1 - Unreleased
+Release 0.18.2 - Unreleased
+
+  BUG FIXES
+   HBASE-602   HBase Crash when network card has a IPv6 address
+
+Release 0.18.1 - Released October 27, 2008
 
   BUG FIXES
    HBASE-891   HRS.validateValuesLength throws IOE, gets caught in the retries

Modified: hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/HServerAddress.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/HServerAddress.java?rev=713467&r1=713466&r2=713467&view=diff
==============================================================================
--- hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/HServerAddress.java (original)
+++ hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/HServerAddress.java Wed Nov
12 11:30:04 2008
@@ -30,6 +30,7 @@
  * HServerAddress is a "label" for a HBase server that combines the host
  * name and port number.
  */
+@SuppressWarnings("unchecked")
 public class HServerAddress implements WritableComparable {
   private InetSocketAddress address;
   String stringValue;

Modified: hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/master/ProcessServerShutdown.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/master/ProcessServerShutdown.java?rev=713467&r1=713466&r2=713467&view=diff
==============================================================================
--- hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/master/ProcessServerShutdown.java
(original)
+++ hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/master/ProcessServerShutdown.java
Wed Nov 12 11:30:04 2008
@@ -20,7 +20,6 @@
 package org.apache.hadoop.hbase.master;
 
 import java.io.IOException;
-import java.io.UnsupportedEncodingException;    //TODO: remove
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
@@ -72,13 +71,8 @@
     this.deadServerName = this.deadServer.toString();
     this.logSplit = false;
     this.rootRescanned = false;
-    StringBuilder dirName = new StringBuilder("log_");
-    dirName.append(deadServer.getBindAddress());
-    dirName.append("_");
-    dirName.append(serverInfo.getStartCode());
-    dirName.append("_");
-    dirName.append(deadServer.getPort());
-    this.oldLogDir = new Path(master.rootdir, dirName.toString());
+    this.oldLogDir =
+      new Path(master.rootdir, HLog.getHLogDirectoryName(serverInfo));
   }
 
   @Override

Modified: hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/regionserver/HLog.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/regionserver/HLog.java?rev=713467&r1=713466&r2=713467&view=diff
==============================================================================
--- hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/regionserver/HLog.java (original)
+++ hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/regionserver/HLog.java Wed
Nov 12 11:30:04 2008
@@ -39,6 +39,7 @@
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HRegionInfo;
+import org.apache.hadoop.hbase.HServerInfo;
 import org.apache.hadoop.hbase.HStoreKey;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.RemoteExceptionHandler;
@@ -168,7 +169,7 @@
   }
 
   /*
-   * Accessor for tests.
+   * Accessor for tests. Not part of public API. Hence no javadoc.
    * @return Current state of the monotonically increasing file id.
    */
   public long getFilenum() {
@@ -716,6 +717,22 @@
     }
     LOG.info("log file splitting completed for " + srcDir.toString());
   }
+  
+  /**
+   * Construct the HLog directory name
+   * 
+   * @param info HServerInfo for server
+   * @return the HLog directory name
+   */
+  public static String getHLogDirectoryName(HServerInfo info) {
+    StringBuilder dirName = new StringBuilder("log_");
+    dirName.append(info.getServerAddress().getBindAddress().replaceAll(":", "."));
+    dirName.append("_");
+    dirName.append(info.getStartCode());
+    dirName.append("_");
+    dirName.append(info.getServerAddress().getPort());
+    return dirName.toString();
+  }
 
   private static void usage() {
     System.err.println("Usage: java org.apache.hbase.HLog" +

Modified: hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=713467&r1=713466&r2=713467&view=diff
==============================================================================
--- hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hadoop/hbase/branches/0.18/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Wed Nov 12 11:30:04 2008
@@ -542,10 +542,7 @@
   private HLog setupHLog() throws RegionServerRunningException,
     IOException {
     
-    Path logdir = new Path(rootDir, "log" + "_" + 
-        serverInfo.getServerAddress().getBindAddress() + "_" +
-        this.serverInfo.getStartCode() + "_" + 
-        this.serverInfo.getServerAddress().getPort());
+    Path logdir = new Path(rootDir, HLog.getHLogDirectoryName(serverInfo));
     if (LOG.isDebugEnabled()) {
       LOG.debug("Log dir " + logdir);
     }



Mime
View raw message