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 5f0dcdd121)
This commit is contained in:
Kerasone 2023-02-18 10:46:09 +08:00 committed by Duo Zhang
parent e845e2e4dc
commit 96e05fe7ba
1 changed files with 2 additions and 1 deletions

View File

@ -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);