Skip to content

Commit 5f0dcdd

Browse files
Kerasoneselina.yan
andauthored
HBASE-27636 The "CREATE_TIME_TS" value of the hfile generated by the HFileOutputFormat2 class is 0 (#5034)
Co-authored-by: selina.yan <[email protected]> Signed-off-by: Duo Zhang <[email protected]>
1 parent 1664b6b commit 5f0dcdd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,8 @@ private WriterLength getNewWriter(byte[] tableName, byte[] family, Configuration
415415
HFileContextBuilder contextBuilder = new HFileContextBuilder().withCompression(compression)
416416
.withDataBlockEncoding(encoding).withChecksumType(StoreUtils.getChecksumType(conf))
417417
.withBytesPerCheckSum(StoreUtils.getBytesPerChecksum(conf)).withBlockSize(blockSize)
418-
.withColumnFamily(family).withTableName(tableName);
418+
.withColumnFamily(family).withTableName(tableName)
419+
.withCreateTime(EnvironmentEdgeManager.currentTime());
419420

420421
if (HFile.getFormatVersion(conf) >= HFile.MIN_FORMAT_VERSION_WITH_TAGS) {
421422
contextBuilder.withIncludesTags(true);

0 commit comments

Comments
 (0)