[
https://issues.apache.org/jira/browse/PHOENIX-1565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14259959#comment-14259959
]
ramkrishna.s.vasudevan commented on PHOENIX-1565:
-------------------------------------------------
{code}
double per = (double)(midEndIndex + 1) / size;
if (rowCountCell != null) {
rowCount =
PLong.INSTANCE.getCodec().decodeLong(rowCountCell.getValueArray(),
rowCountCell.getValueOffset(),
SortOrder.getDefault());
rowCount = (long)(per * rowCount);
}
if (byteSizeCell != null) {
byteSize =
PLong.INSTANCE.getCodec().decodeLong(byteSizeCell.getValueArray(),
byteSizeCell.getValueOffset(),
SortOrder.getDefault());
byteSize = (long)(per * byteSize);
}
{code}
Something like the above should be fine right?
> Estimate byte count more accurately when split occurs
> -----------------------------------------------------
>
> Key: PHOENIX-1565
> URL: https://issues.apache.org/jira/browse/PHOENIX-1565
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: James Taylor
>
> We're currently always dividing the byteCount by two when we split a region.
> Instead, we should calculate a percentage based on the index into the
> guidepost array as this will be more accurate.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)