incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/3] git commit: Changing the logging
Date Wed, 23 Oct 2013 18:38:04 GMT
Updated Branches:
  refs/heads/apache-blur-0.2 b4da410c4 -> aae10d8ec


Changing the logging


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/64a9721f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/64a9721f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/64a9721f

Branch: refs/heads/apache-blur-0.2
Commit: 64a9721fb5b134d9c07fb972276a8539cb446026
Parents: b4da410
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Wed Oct 23 14:33:31 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Oct 23 14:36:48 2013 -0400

----------------------------------------------------------------------
 .../blur/manager/writer/TransactionRecorder.java      | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/64a9721f/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
b/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
index 605fe32..ad9c690 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/writer/TransactionRecorder.java
@@ -45,6 +45,7 @@ import org.apache.blur.thrift.generated.Row;
 import org.apache.blur.utils.BlurConstants;
 import org.apache.blur.utils.BlurUtil;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.ChecksumException;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
@@ -185,11 +186,20 @@ public class TransactionRecorder extends TimerTask implements Closeable
{
       byte[] buffer = new byte[length];
       inputStream.readFully(buffer);
       return buffer;
+    } catch (ChecksumException e) {
+      LOG.warn("End of WAL file found.");
+      if (LOG.isDebugEnabled()) {
+        LOG.error("End of WAL file found.", e);
+      }
+      return null;
     } catch (IOException e) {
       if (e instanceof EOFException) {
+        LOG.warn("End of WAL file found.");
+        if (LOG.isDebugEnabled()) {
+          LOG.error("End of WAL file found.", e);
+        }
         return null;
       }
-      e.printStackTrace();
     }
     return null;
   }
@@ -274,7 +284,7 @@ public class TransactionRecorder extends TimerTask implements Closeable
{
 
   private static void writeString(DataOutputStream outputStream, String s) throws IOException
{
     if (s == null) {
-      Utils.writeVInt(outputStream, -1);  
+      Utils.writeVInt(outputStream, -1);
       return;
     }
     byte[] bs = s.getBytes();


Mime
View raw message