[ 
https://issues.apache.org/jira/browse/HBASE-27688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17700973#comment-17700973
 ] 

Hudson commented on HBASE-27688:
--------------------------------

Results for branch branch-2.4
        [build #530 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/530/]:
 (/) *{color:green}+1 overall{color}*
----
details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/530/General_20Nightly_20Build_20Report/]


(/) {color:green}+1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/530/JDK8_20Nightly_20Build_20Report_20_28Hadoop2_29/]


(/) {color:green}+1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/530/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/530/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> HFile splitting occurs during bulkload, the CREATE_TIME_TS of hfileinfo is 0
> ----------------------------------------------------------------------------
>
>                 Key: HBASE-27688
>                 URL: https://issues.apache.org/jira/browse/HBASE-27688
>             Project: HBase
>          Issue Type: Bug
>          Components: HFile
>            Reporter: alan.zhao
>            Assignee: alan.zhao
>            Priority: Major
>             Fix For: 2.6.0, 3.0.0-alpha-4, 2.4.17, 2.5.4
>
>
> If HFile splitting occurs during bulkload, the CREATE_TIME_TS of hfileinfo 
> =0,When HFile is copied after splitting, CREATE_TIME_TS of the original file 
> is not copied。
> {code:java}
> ##BulkLoadHFilesTool.class 
> /**
>  * Copy half of an HFile into a new HFile.
>  */
> private static void copyHFileHalf(Configuration conf, Path inFile, Path 
> outFile,
>   Reference reference, ColumnFamilyDescriptor familyDescriptor) throws 
> IOException {
>   FileSystem fs = inFile.getFileSystem(conf);
>   CacheConfig cacheConf = CacheConfig.DISABLED;
>   HalfStoreFileReader halfReader = null;
>   StoreFileWriter halfWriter = null;
>   try {
>     。。。
>     HFileContext hFileContext = new 
> HFileContextBuilder().withCompression(compression)
>       .withChecksumType(StoreUtils.getChecksumType(conf))
>       
> .withBytesPerCheckSum(StoreUtils.getBytesPerChecksum(conf)).withBlockSize(blocksize)
>       
> .withDataBlockEncoding(familyDescriptor.getDataBlockEncoding()).withIncludesTags(true)
>       .build();
> // TODO .withCreateTime(EnvironmentEdgeManager.currentTime())      
> halfWriter = new StoreFileWriter.Builder(conf, cacheConf, 
> fs).withFilePath(outFile)
>       .withBloomType(bloomFilterType).withFileContext(hFileContext).build();
>     HFileScanner scanner = halfReader.getScanner(false, false, false);
>     scanner.seekTo();
>     do {
>       halfWriter.append(scanner.getCell());
>     } while (scanner.next());
>     for (Map.Entry<byte[], byte[]> entry : fileInfo.entrySet()) {
>       if (shouldCopyHFileMetaKey(entry.getKey())) {
>         halfWriter.appendFileInfo(entry.getKey(), entry.getValue());
>       }
>     }
>   } finally {
>     。。。
>   }
> } 
> ##get lastMajorCompactionTs metric
>   lastMajorCompactionTs = this.region.getOldestHfileTs(true);
> ...
>   long now = EnvironmentEdgeManager.currentTime();
>   return now - lastMajorCompactionTs;
> ...
> ##
> public long getOldestHfileTs(boolean majorCompactionOnly) throws IOException {
>   long result = Long.MAX_VALUE;
>   for (HStore store : stores.values()) {
>     Collection<HStoreFile> storeFiles = store.getStorefiles();
>    ...
>     for (HStoreFile file : storeFiles) {
>       StoreFileReader sfReader = file.getReader();
>      ...
>       result = Math.min(result, reader.getFileContext().getFileCreateTime());
>     }
>   }
>   return result == Long.MAX_VALUE ? 0 : result;
> }{code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to