hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1333304 - in /hbase/trunk/src/main/java/org/apache/hadoop/hbase: master/SplitLogManager.java regionserver/wal/HLog.java util/Bytes.java
Date Thu, 03 May 2012 04:14:26 GMT
Author: tedyu
Date: Thu May  3 04:14:26 2012
New Revision: 1333304

URL: http://svn.apache.org/viewvc?rev=1333304&view=rev
Log:
HBASE-5919 Add fixes for Ted's review comments from HBASE-5869

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/Bytes.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java?rev=1333304&r1=1333303&r2=1333304&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java Thu May
 3 04:14:26 2012
@@ -538,7 +538,7 @@ public class SplitLogManager extends Zoo
       try {
         getDataSetWatchSuccess(path, null, Integer.MIN_VALUE);
       } catch (DeserializationException e1) {
-        LOG.debug("failed to re-resubmit task " + path + " because of deserialization issue");
+        LOG.debug("Failed to re-resubmit task " + path + " because of deserialization issue",
e1);
         task.heartbeatNoDetails(EnvironmentEdgeManager.currentTimeMillis());
         return false;
       }

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java?rev=1333304&r1=1333303&r2=1333304&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java Thu May 
3 04:14:26 2012
@@ -1715,7 +1715,7 @@ public class HLog implements Syncable {
    * Construct the HLog directory name
    *
    * @param serverName Server name formatted as described in {@link ServerName}
-   * @return the relative HLog directory name, e.g. <code>.logs/1.example.org,6030,12345</code>
+   * @return the relative HLog directory name, e.g. <code>.logs/1.example.org,60030,12345</code>
    * if <code>serverName</code> passed is <code>1.example.org,60030,12345</code>
    */
   public static String getHLogDirectoryName(final String serverName) {
@@ -1891,4 +1891,4 @@ public class HLog implements Syncable {
       System.exit(-1);
     }
   }
-}
\ No newline at end of file
+}

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/Bytes.java?rev=1333304&r1=1333303&r2=1333304&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/Bytes.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/Bytes.java Thu May  3 04:14:26
2012
@@ -343,6 +343,9 @@ public class Bytes {
    */
   public static String toStringBinary(final byte [] b, int off, int len) {
     StringBuilder result = new StringBuilder();
+    // Just in case we are passed a 'len' that is > buffer length...
+    if (off >= b.length) return result.toString();
+    if (off + len > b.length) len = b.length - off;
     try {
       String first = new String(b, off, len, "ISO-8859-1");
       for (int i = 0; i < first.length() ; ++i ) {



Mime
View raw message