You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2015/01/29 23:10:30 UTC

[1/2] hbase git commit: HBASE-12859; Addendum

Repository: hbase
Updated Branches:
  refs/heads/branch-1 0b3502f2b -> 45b0aa874
  refs/heads/master 1270e590d -> 9c37d5dab


HBASE-12859; Addendum


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9c37d5da
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9c37d5da
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9c37d5da

Branch: refs/heads/master
Commit: 9c37d5dab7a42db72a6fbe66d716dacc69d02188
Parents: 1270e59
Author: Lars Hofhansl <la...@apache.org>
Authored: Thu Jan 29 14:10:59 2015 -0800
Committer: Lars Hofhansl <la...@apache.org>
Committed: Thu Jan 29 14:10:59 2015 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/9c37d5da/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
index 26cb6c9..250001e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
@@ -157,7 +157,8 @@ public class HFileReaderV2 extends AbstractHFileReader {
     // File info
     fileInfo = new FileInfo();
     fileInfo.read(blockIter.nextBlockWithBlockType(BlockType.FILE_INFO).getByteStream());
-    this.hfileContext.setFileCreateTime(Bytes.toLong(fileInfo.get(FileInfo.CREATE_TIME_TS)));
+    byte[] creationTimeBytes = fileInfo.get(FileInfo.CREATE_TIME_TS);
+    this.hfileContext.setFileCreateTime(creationTimeBytes == null ? 0 : Bytes.toLong(creationTimeBytes));
     lastKey = fileInfo.get(FileInfo.LASTKEY);
     avgKeyLen = Bytes.toInt(fileInfo.get(FileInfo.AVG_KEY_LEN));
     avgValueLen = Bytes.toInt(fileInfo.get(FileInfo.AVG_VALUE_LEN));


[2/2] hbase git commit: HBASE-12859; Addendum

Posted by la...@apache.org.
HBASE-12859; Addendum


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/45b0aa87
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/45b0aa87
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/45b0aa87

Branch: refs/heads/branch-1
Commit: 45b0aa874d817c933f3e6272de1181cf1262b8db
Parents: 0b3502f
Author: Lars Hofhansl <la...@apache.org>
Authored: Thu Jan 29 14:10:59 2015 -0800
Committer: Lars Hofhansl <la...@apache.org>
Committed: Thu Jan 29 14:11:19 2015 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/45b0aa87/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
index 26cb6c9..250001e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
@@ -157,7 +157,8 @@ public class HFileReaderV2 extends AbstractHFileReader {
     // File info
     fileInfo = new FileInfo();
     fileInfo.read(blockIter.nextBlockWithBlockType(BlockType.FILE_INFO).getByteStream());
-    this.hfileContext.setFileCreateTime(Bytes.toLong(fileInfo.get(FileInfo.CREATE_TIME_TS)));
+    byte[] creationTimeBytes = fileInfo.get(FileInfo.CREATE_TIME_TS);
+    this.hfileContext.setFileCreateTime(creationTimeBytes == null ? 0 : Bytes.toLong(creationTimeBytes));
     lastKey = fileInfo.get(FileInfo.LASTKEY);
     avgKeyLen = Bytes.toInt(fileInfo.get(FileInfo.AVG_KEY_LEN));
     avgValueLen = Bytes.toInt(fileInfo.get(FileInfo.AVG_VALUE_LEN));