You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2020/05/22 13:52:11 UTC
[GitHub] [bookkeeper] mino181295 opened a new pull request #2346: [CLEAN] Replace com.google.common.base.Optional with java.util.Optional
mino181295 opened a new pull request #2346:
URL: https://github.com/apache/bookkeeper/pull/2346
### Motivation
`com.google.common.base.Optional` and `java.util.Optional` exist in the code base at the same time.
### Changes
- Replace `com.google.common.base.Optional` with `java.util.Optional`.
- Add checkstyle rule to avoid the com.google.common.base.Optional import
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] eolivelli commented on pull request #2346: [CLEAN] Replace com.google.common.base.Optional with java.util.Optional
Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #2346:
URL: https://github.com/apache/bookkeeper/pull/2346#issuecomment-632702808
@diegosalvi @sijie PTAL
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] eolivelli commented on a change in pull request #2346: [CLEAN] Replace com.google.common.base.Optional with java.util.Optional
Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #2346:
URL: https://github.com/apache/bookkeeper/pull/2346#discussion_r429260441
##########
File path: site/docs/latest/api/distributedlog-api.md
##########
@@ -222,7 +222,7 @@ logConf.setRetentionPeriodHours(12);
DistributedLogManager logManager = namespace.openLog(
"test-log",
Optional.of(logConf),
- Optional.absent()
+ Optional.empty()
Review comment:
this is documentation but it looks like an API change
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] eolivelli commented on a change in pull request #2346: [CLEAN] Replace com.google.common.base.Optional with java.util.Optional
Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #2346:
URL: https://github.com/apache/bookkeeper/pull/2346#discussion_r429260850
##########
File path: stream/distributedlog/core/src/main/java/org/apache/distributedlog/BookKeeperClientBuilder.java
##########
@@ -59,7 +59,7 @@ public static BookKeeperClientBuilder newBuilder() {
// request timer
private HashedWheelTimer requestTimer = null;
// feature provider
- private Optional<FeatureProvider> featureProvider = Optional.absent();
+ private Optional<FeatureProvider> featureProvider = Optional.empty();
Review comment:
this change looks like an API change
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] mino181295 commented on pull request #2346: [CLEAN] Replace com.google.common.base.Optional with java.util.Optional
Posted by GitBox <gi...@apache.org>.
mino181295 commented on pull request #2346:
URL: https://github.com/apache/bookkeeper/pull/2346#issuecomment-633714126
To answer your questions:
- The guava Optional was marked as @deprecated since 0.5 in favor of
`
loadStreamConf(java.util.Optional<DistributedLogConfiguration> streamConfiguration)
`
- The `Namespace` class is marked as `@Evolving` and I think this change it's not a big deal to fix
cc @sijie
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] sijie merged pull request #2346: [CLEAN] Replace com.google.common.base.Optional with java.util.Optional
Posted by GitBox <gi...@apache.org>.
sijie merged pull request #2346:
URL: https://github.com/apache/bookkeeper/pull/2346
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] eolivelli commented on pull request #2346: [CLEAN] Replace com.google.common.base.Optional with java.util.Optional
Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #2346:
URL: https://github.com/apache/bookkeeper/pull/2346#issuecomment-632701885
@mino181295 awesome work.
One question:
did you check if you are changing public API ?
org.apache.bookkeeper.client
org.apache.bookkeeper.client.api
and DLog API
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org