You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by vi...@apache.org on 2019/11/06 20:56:17 UTC

[incubator-hudi] branch master updated: [HUDI-302]: simplified countInstants() method in HoodieDefaultTimeline (#997)

This is an automated email from the ASF dual-hosted git repository.

vinoth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 20871a1  [HUDI-302]: simplified countInstants() method in HoodieDefaultTimeline (#997)
20871a1 is described below

commit 20871a17b2ec2b0998b80d941bac51434b0854d5
Author: pratyakshsharma <30...@users.noreply.github.com>
AuthorDate: Thu Nov 7 02:26:09 2019 +0530

    [HUDI-302]: simplified countInstants() method in HoodieDefaultTimeline (#997)
---
 .../org/apache/hudi/common/table/timeline/HoodieDefaultTimeline.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieDefaultTimeline.java b/hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieDefaultTimeline.java
index 1566336..937bbfc 100644
--- a/hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieDefaultTimeline.java
+++ b/hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieDefaultTimeline.java
@@ -141,7 +141,7 @@ public class HoodieDefaultTimeline implements HoodieTimeline {
 
   @Override
   public int countInstants() {
-    return new Long(instants.stream().count()).intValue();
+    return instants.size();
   }
 
   @Override