You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Pratyaksh Sharma (Jira)" <ji...@apache.org> on 2019/11/06 09:23:00 UTC
[jira] [Commented] (HUDI-302) Simplify count operation in
HoodieDefaultTimeline::countInstants
[ https://issues.apache.org/jira/browse/HUDI-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16968210#comment-16968210 ]
Pratyaksh Sharma commented on HUDI-302:
---------------------------------------
[~jghoman] I would like to take it up. Will be sending the PR soon.
> Simplify count operation in HoodieDefaultTimeline::countInstants
> ----------------------------------------------------------------
>
> Key: HUDI-302
> URL: https://issues.apache.org/jira/browse/HUDI-302
> Project: Apache Hudi (incubating)
> Issue Type: Bug
> Components: Common Core
> Reporter: Jakob Homan
> Priority: Trivial
> Labels: newbie
>
> In {{HoodieDefaultTimeline}} there's a conversion of an List to a stream in order to count the elements. This is unnecessary since the underlying List has a {{size()}} method that returns the same result.
> {code:java}
> @Override
> public int countInstants() {
> return new Long(instants.stream().count()).intValue();
> }
> {code}
> *Note:* This is a newbie ticket designed as a starter task for a new contributor.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)