[
https://issues.apache.org/jira/browse/DL-124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035938#comment-16035938
]
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_r119984733
--- Diff:
distributedlog-core/src/main/java/org/apache/distributedlog/bk/SimpleLedgerAllocator.java
---
@@ -105,73 +103,71 @@ public ConcurrentObtainException(Phase phase, String
msg) {
// Allocated Ledger
LedgerHandle allocatedLh = null;
- Future<Void> closeFuture = null;
- final LinkedList<Future<Void>> ledgerDeletions =
- new LinkedList<Future<Void>>();
+ CompletableFuture<Void> closeFuture = null;
+ final LinkedList<CompletableFuture<Void>> ledgerDeletions =
+ new LinkedList<CompletableFuture<Void>>();
// Ledger configuration
private final QuorumConfigProvider quorumConfigProvider;
- static Future<Versioned<byte[]>> getAndCreateAllocationData(final
String allocatePath,
+ static CompletableFuture<Versioned<byte[]>>
getAndCreateAllocationData(final String allocatePath,
--- End diff --
Please also do the code alignment change here, and also at line 128, 159.
> 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)