hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject [2/2] hbase git commit: HBASE-12859; Addendum
Date Thu, 29 Jan 2015 22:10:31 GMT
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 <larsh@apache.org>
Authored: Thu Jan 29 14:10:59 2015 -0800
Committer: Lars Hofhansl <larsh@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));


Mime
View raw message