distributedlog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DL-124) Use Java8 Future rather than twitter Future
Date Sat, 03 Jun 2017 10:51:04 GMT

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

ASF GitHub Bot commented on DL-124:
-----------------------------------

Github user jiazhai commented on a diff in the pull request:

    https://github.com/apache/incubator-distributedlog/pull/133#discussion_r119984432
  
    --- Diff: distributedlog-core/src/main/java/org/apache/distributedlog/BKAbstractLogWriter.java
---
    @@ -357,80 +354,72 @@ private void truncateLogSegmentsIfNecessary(BKLogWriteHandler writeHandler)
{
             // skip scheduling if there is task that's already running
             //
             synchronized (this) {
    -            if (truncationEnabled && ((lastTruncationAttempt == null) || lastTruncationAttempt.isDefined()))
{
    +            if (truncationEnabled && ((lastTruncationAttempt == null) || lastTruncationAttempt.isDone()))
{
                     lastTruncationAttempt = writeHandler.purgeLogSegmentsOlderThanTimestamp(minTimestampToKeep);
                 }
             }
         }
     
    -    private Future<BKLogSegmentWriter> asyncStartNewLogSegment(final BKLogWriteHandler
writeHandler,
    +    private CompletableFuture<BKLogSegmentWriter> asyncStartNewLogSegment(final
BKLogWriteHandler writeHandler,
                                                                    final long startTxId,
    --- End diff --
    
    Please also do the code alignment change here.


> Use Java8 Future rather than twitter Future
> -------------------------------------------
>
>                 Key: DL-124
>                 URL: https://issues.apache.org/jira/browse/DL-124
>             Project: DistributedLog
>          Issue Type: Bug
>    Affects Versions: 0.4.0
>            Reporter: Gerrit Sundaram
>            Assignee: Sijie Guo
>              Labels: help-wanted
>             Fix For: 0.5.0
>
>
> Since it is written in java, it would be good to leverage java8 future rather than introducing
dependencies on scala.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message