Updated Branches: refs/heads/master 43bdf5aa4 -> 8424d1e8f
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/a6543467 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/a6543467 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/a6543467 Branch: refs/heads/master Commit: a654346781ead1f9a7931ecc2a4aabf83dfb3283 Parents: 43bdf5a Author: Aaron McCurry <[email protected]> Authored: Wed Oct 23 14:33:31 2013 -0400 Committer: Aaron McCurry <[email protected]> Committed: Wed Oct 23 14:33:31 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/a6543467/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();
