You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2023/02/18 02:46:18 UTC

[hbase] branch master updated: HBASE-27636 The "CREATE_TIME_TS" value of the hfile generated by the HFileOutputFormat2 class is 0 (#5034)

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 5f0dcdd1218 HBASE-27636 The "CREATE_TIME_TS" value of the hfile generated by the HFileOutputFormat2 class is 0 (#5034)
5f0dcdd1218 is described below

commit 5f0dcdd121833e7665633aabc7706ae1b18f8672
Author: Kerasone <42...@users.noreply.github.com>
AuthorDate: Sat Feb 18 10:46:09 2023 +0800

    HBASE-27636 The "CREATE_TIME_TS" value of the hfile generated by the HFileOutputFormat2 class is 0 (#5034)
    
    Co-authored-by: selina.yan <se...@huolala.cn>
    Signed-off-by: Duo Zhang <zh...@apache.org>
---
 .../java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java
index c17066974bb..2bd5330a62f 100644
--- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java
+++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java
@@ -415,7 +415,8 @@ public class HFileOutputFormat2 extends FileOutputFormat<ImmutableBytesWritable,
         HFileContextBuilder contextBuilder = new HFileContextBuilder().withCompression(compression)
           .withDataBlockEncoding(encoding).withChecksumType(StoreUtils.getChecksumType(conf))
           .withBytesPerCheckSum(StoreUtils.getBytesPerChecksum(conf)).withBlockSize(blockSize)
-          .withColumnFamily(family).withTableName(tableName);
+          .withColumnFamily(family).withTableName(tableName)
+          .withCreateTime(EnvironmentEdgeManager.currentTime());
 
         if (HFile.getFormatVersion(conf) >= HFile.MIN_FORMAT_VERSION_WITH_TAGS) {
           contextBuilder.withIncludesTags(true);