HBASE-27636 The "CREATE_TIME_TS" value of the hfile generated by the HFileOutputFormat2 class is 0 (#5034)

Co-authored-by: selina.yan <selina.yan@huolala.cn>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 5f0dcdd121833e7665633aabc7706ae1b18f8672)
This commit is contained in:
Kerasone 2023-02-18 10:46:09 +08:00 committed by Duo Zhang
parent beab1eb208
commit 3a5fc6dad6

View File

@ -449,7 +449,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);