You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/05/12 02:58:00 UTC

[jira] [Commented] (PHOENIX-6955) The value of region metric--lastMajorCompactionAge is wrong,when the hfile is buckload file

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

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

Kerasone opened a new pull request, #1606:
URL: https://github.com/apache/phoenix/pull/1606

   (no comment)




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