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:57:43 UTC

[hbase] branch branch-2.4 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 branch-2.4
in repository https://gitbox.apache.org/repos/asf/hbase.git


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

commit 44c4e90b33a65d2595e0e056fe361129f6a56a39
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>
    (cherry picked from commit 5f0dcdd121833e7665633aabc7706ae1b18f8672)
---
 .../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 cdb6054b7d1..e098b1c3277 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
@@ -432,7 +432,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);