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

ASF GitHub Bot commented on PHOENIX-6955:
-----------------------------------------

Kerasone commented on PR #1606:
URL: https://github.com/apache/phoenix/pull/1606#issuecomment-1869211182

   I'm so sorry,I'll do it quickly,thanks for your help
   
   
   
   --

> The value of region  metric--lastMajorCompactionAge is wrong,when the hfile 
> is buckload file
> --------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-6955
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6955
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: selina.yan
>            Priority: Major
>
> When MultiHfileOutputFormat is used to create an hfile, the CREATE_TIME_TS of 
> hfileinfo will not be assigned when creating an hfileContext, resulting in 
> the value of  lastMajorCompactionAge  is the timestamp of the current time.
> {code:java}
> HFileContextBuilder contextBuilder = new HFileContextBuilder()
>                         .withCompression(compression)
>                         .withChecksumType(CompatUtil.getChecksumType(conf))
>                         
> .withBytesPerCheckSum(CompatUtil.getBytesPerChecksum(conf))
>                         .withBlockSize(blockSize)
>                         .withDataBlockEncoding(encoding)
>                         .withCellComparator(CellComparatorImpl.COMPARATOR);
> ##get lastMajorCompactionTs metriclastMajorCompactionTs = 
> 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();{code}



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

Reply via email to