This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 5521a9f Make bookkeeper-server module buildable on jdk10
5521a9f is described below
commit 5521a9f9109c59733323760fe54c4149635be633
Author: Enrico Olivelli <[email protected]>
AuthorDate: Thu May 31 10:45:59 2018 +0200
Make bookkeeper-server module buildable on jdk10
Upgrade lombok and javadoc plugin to latest versions.
This way it is possible to work on most of the modules using JDK10.
Author: Enrico Olivelli <[email protected]>
Reviewers: Jia Zhai <None>, Sijie Guo <[email protected]>
This closes #1453 from eolivelli/fix/build-jdk10
---
.../org/apache/bookkeeper/client/BookKeeper.java | 22 +++----------
.../apache/bookkeeper/client/BookieWatcher.java | 1 -
.../bookkeeper/client/EnsemblePlacementPolicy.java | 21 ++++++------
.../org/apache/bookkeeper/client/LedgerHandle.java | 7 ++--
.../apache/bookkeeper/client/UpdateLedgerOp.java | 2 --
.../bookkeeper/client/api/CreateBuilder.java | 3 +-
.../bookkeeper/conf/AbstractConfiguration.java | 5 ++-
.../bookkeeper/conf/ClientConfiguration.java | 37 ++++++++++------------
pom.xml | 6 ++--
9 files changed, 44 insertions(+), 60 deletions(-)
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java
index 98d3651..5746994 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java
@@ -323,7 +323,6 @@ public class BookKeeper implements
org.apache.bookkeeper.client.api.BookKeeper {
* {@link AbstractConfiguration#getZkAvailableBookiesPath()}
* @throws IOException
* @throws InterruptedException
- * @throws KeeperException
*/
public BookKeeper(String servers) throws IOException, InterruptedException,
BKException {
@@ -339,7 +338,6 @@ public class BookKeeper implements
org.apache.bookkeeper.client.api.BookKeeper {
* Client Configuration object
* @throws IOException
* @throws InterruptedException
- * @throws KeeperException
*/
public BookKeeper(final ClientConfiguration conf)
throws IOException, InterruptedException, BKException {
@@ -374,7 +372,6 @@ public class BookKeeper implements
org.apache.bookkeeper.client.api.BookKeeper {
* the bookies have registered
* @throws IOException
* @throws InterruptedException
- * @throws KeeperException
*/
public BookKeeper(ClientConfiguration conf, ZooKeeper zk)
throws IOException, InterruptedException, BKException {
@@ -934,9 +931,7 @@ public class BookKeeper implements
org.apache.bookkeeper.client.api.BookKeeper {
}
/**
- * Synchronous call to create ledger. Parameters match those of
- * {@link #asyncCreateLedger(int, int, int, DigestType, byte[],
- * AsyncCallback.CreateCallback, Object)}
+ * Synchronous call to create ledger. Parameters match those of
asyncCreateLedger
*
* @param ensSize
* @param writeQuorumSize
@@ -971,9 +966,7 @@ public class BookKeeper implements
org.apache.bookkeeper.client.api.BookKeeper {
/**
* Synchronous call to create ledger.
* Creates a new ledger asynchronously and returns {@link LedgerHandleAdv}
which can accept entryId.
- * Parameters must match those of
- * {@link #asyncCreateLedgerAdv(int, int, int, DigestType, byte[],
- * AsyncCallback.CreateCallback, Object)}
+ * Parameters must match those of asyncCreateLedgerAdv
*
* @param ensSize
* @param writeQuorumSize
@@ -994,9 +987,7 @@ public class BookKeeper implements
org.apache.bookkeeper.client.api.BookKeeper {
/**
* Synchronous call to create ledger.
* Creates a new ledger asynchronously and returns {@link LedgerHandleAdv}
which can accept entryId.
- * Parameters must match those of
- * {@link #asyncCreateLedgerAdv(int, int, int, DigestType, byte[],
- * AsyncCallback.CreateCallback, Object)}
+ * Parameters must match those of asyncCreateLedgerAdv
*
* @param ensSize
* @param writeQuorumSize
@@ -1084,9 +1075,7 @@ public class BookKeeper implements
org.apache.bookkeeper.client.api.BookKeeper {
/**
* Synchronously creates a new ledger using the interface which accepts a
ledgerId as input.
* This method returns {@link LedgerHandleAdv} which can accept entryId.
- * Parameters must match those of
- * {@link #asyncCreateLedgerAdvWithLedgerId(byte[], long, int, int, int,
DigestType, byte[],
- * AsyncCallback.CreateCallback, Object)}
+ * Parameters must match those of asyncCreateLedgerAdvWithLedgerId
* @param ledgerId
* @param ensSize
* @param writeQuorumSize
@@ -1143,8 +1132,7 @@ public class BookKeeper implements
org.apache.bookkeeper.client.api.BookKeeper {
* {@link ClientConfiguration#getReadTimeout()}. Once the bookie failure
is detected,
* that bookie will be removed from the ensemble.
*
- * <p>The other parameters match those of {@link #asyncCreateLedger(long,
int, int, DigestType, byte[],
- * AsyncCallback.CreateCallback,
Object)}
+ * <p>The other parameters match those of asyncCreateLedger</p>
*
* @param ledgerId
* ledger Id to use for the newly created ledger
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookieWatcher.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookieWatcher.java
index 5dea774..43d0c26 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookieWatcher.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookieWatcher.java
@@ -262,7 +262,6 @@ class BookieWatcher {
/**
* Quarantine <i>bookie</i> so it will not be preferred to be chosen for
new ensembles.
* @param bookie
- * @return
*/
public void quarantineBookie(BookieSocketAddress bookie) {
if (quarantinedBookies.getIfPresent(bookie) == null) {
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/EnsemblePlacementPolicy.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/EnsemblePlacementPolicy.java
index 8dab4ea..500ca16 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/EnsemblePlacementPolicy.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/EnsemblePlacementPolicy.java
@@ -19,7 +19,6 @@ package org.apache.bookkeeper.client;
import io.netty.util.HashedWheelTimer;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
@@ -42,12 +41,12 @@ import org.apache.bookkeeper.stats.StatsLogger;
*
* <h2>How does it work?</h2>
*
- * <p>This interface basically covers three parts:
+ * <p>This interface basically covers three parts:</p>
* <ul>
* <li>Initialization and uninitialization</li>
* <li>How to choose bookies to place data</li>
* <li>How to choose bookies to do speculative reads</li>
- * </ul></p>
+ * </ul>
*
* <h3>Initialization and uninitialization</h3>
*
@@ -59,7 +58,7 @@ import org.apache.bookkeeper.stats.StatsLogger;
* <p>The {@link #initialize(ClientConfiguration, Optional, HashedWheelTimer,
FeatureProvider, StatsLogger)}
* method takes a few resources from bookkeeper for instantiating itself.
These resources include:
*
- * <p><ul>
+ * <ul>
* <li>`ClientConfiguration` : The client configuration that used for
constructing the bookkeeper client.
* The implementation of the placement policy
could obtain its settings from this
* configuration.
@@ -72,7 +71,7 @@ import org.apache.bookkeeper.stats.StatsLogger;
* features. For example, a {@link
RegionAwareEnsemblePlacementPolicy} could offer features
* to disable placing data to a specific region at
runtime.
* <li>`StatsLogger`: A {@link StatsLogger} for exposing stats.
- * </ul></p>
+ * </ul>
*
* <p>The ensemble placement policy is a single instance per bookkeeper
client. The instance will
* be {@link #uninitalize()} when closing the bookkeeper client. The
implementation of a placement policy should be
@@ -85,7 +84,9 @@ import org.apache.bookkeeper.stats.StatsLogger;
* bookie changes, the ensemble placement policy will be notified with new
list of bookies via
* {@link #onClusterChanged(Set, Set)}. The implementation of the ensemble
placement policy will react on those
* changes to build new network topology. Subsequent operations like {@link
#newEnsemble(int, int, int, Map, Set)} or
- * {@link #replaceBookie(int, int, int, Map, Collection, BookieSocketAddress,
Set)} hence can operate on the new
+ * {@link #replaceBookie(int, int, int, java.util.Map, java.util.Set,
+ * org.apache.bookkeeper.net.BookieSocketAddress, java.util.Set)}
+ * hence can operate on the new
* network topology.
*
* <p>Both {@link RackawareEnsemblePlacementPolicy} and {@link
RegionAwareEnsemblePlacementPolicy} are
@@ -158,12 +159,12 @@ import org.apache.bookkeeper.stats.StatsLogger;
*
* <p>For example, in {@link RackawareEnsemblePlacementPolicy}, the reads will
be attempted in following sequence:
*
- * <p><ul>
+ * <ul>
* <li>bookies are writable and didn't experience failures before
* <li>bookies are writable and experienced failures before
* <li>bookies are readonly
* <li>bookies already disappeared from network topology
- * </ul></p>
+ * </ul>
*
* <p>In {@link RegionAwareEnsemblePlacementPolicy}, the reads will be tried
in similar following sequence
* as `RackAware` placement policy. There is a slight different on trying
writable bookies: after trying every 2
@@ -224,7 +225,9 @@ public interface EnsemblePlacementPolicy {
*
* <p>The implementation should take actions when the cluster view is
changed. So subsequent
* {@link #newEnsemble(int, int, int, Map, Set)} and
- * {@link #replaceBookie(int, int, int, Map, Collection,
BookieSocketAddress, Set)} can choose proper bookies.
+ * {@link #replaceBookie(int, int, int, java.util.Map, java.util.Set,
+ * org.apache.bookkeeper.net.BookieSocketAddress, java.util.Set) }
+ * can choose proper bookies.
*
* @param writableBookies
* All the bookies in the cluster available for write/read.
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
index b3fcbf7..9f90c5a 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
@@ -1050,7 +1050,8 @@ public class LedgerHandle implements WriteHandle {
/**
* Add entry asynchronously to an open ledger, using an offset and range.
* This can be used only with {@link LedgerHandleAdv} returned through
- * ledgers created with {@link createLedgerAdv(int, int, int, DigestType,
byte[])}.
+ * ledgers created with
+ * {@link BookKeeper#createLedgerAdv(int, int, int,
org.apache.bookkeeper.client.BookKeeper.DigestType, byte[])}.
*
* @param entryId
* entryId of the entry to add.
@@ -1564,10 +1565,10 @@ public class LedgerHandle implements WriteHandle {
/**
* Obtains asynchronously the explicit last add confirmed from a quorum of
* bookies. This call obtains Explicit LAC value and piggy-backed LAC
value (just like
- * {@Link #asyncReadLastConfirmed(ReadLastConfirmedCallback, Object)})
from each
+ * {@link #asyncReadLastConfirmed(ReadLastConfirmedCallback, Object)})
from each
* bookie in the ensemble and returns the maximum.
* If in the write LedgerHandle, explicitLAC feature is not enabled then
this call behavior
- * will be similar to {@Link
#asyncReadLastConfirmed(ReadLastConfirmedCallback, Object)}.
+ * will be similar to {@link
#asyncReadLastConfirmed(ReadLastConfirmedCallback, Object)}.
* If the read explicit lastaddconfirmed is greater than
getLastAddConfirmed, then it updates the
* lastAddConfirmed of this ledgerhandle. If the ledger has been closed, it
* returns the value of the last add confirmed from the metadata.
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/UpdateLedgerOp.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/UpdateLedgerOp.java
index 23d6be2..e4b2357 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/UpdateLedgerOp.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/UpdateLedgerOp.java
@@ -77,8 +77,6 @@ public class UpdateLedgerOp {
* @throws IOException
* if there is an error when updating bookie id in ledger
* metadata
- * @throws InterruptedException
- * interrupted exception when update ledger meta
*/
public void updateBookieIdInLedgers(final BookieSocketAddress oldBookieId,
final BookieSocketAddress newBookieId,
final int rate, final int limit, final UpdateLedgerNotifier
progressable) throws IOException {
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/CreateBuilder.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/CreateBuilder.java
index a0b67e0..f02eb84 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/CreateBuilder.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/CreateBuilder.java
@@ -46,7 +46,8 @@ public interface CreateBuilder extends OpBuilder<WriteHandle>
{
CreateBuilder withEnsembleSize(int ensembleSize);
/**
- * Set the number of bookies which receive every single entry. In case of
ensembleSize > writeQuorumSize data will
+ * Set the number of bookies which receive every single entry.
+ * In case of ensembleSize > writeQuorumSize data will
* be striped across a number of ensembleSize bookies. It defaults to 2.
*
* @param writeQuorumSize the replication factor for each entry
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
index 9d6cb50..c813d5f 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/AbstractConfiguration.java
@@ -267,7 +267,6 @@ public abstract class AbstractConfiguration<T extends
AbstractConfiguration>
*
* @param serviceUri the metadata service uri.
* @return the configuration object.
- * @throws ConfigurationException
*/
public T setMetadataServiceUri(String serviceUri) {
setProperty(METADATA_SERVICE_URI, serviceUri);
@@ -342,7 +341,7 @@ public abstract class AbstractConfiguration<T extends
AbstractConfiguration>
* Get Ledger Manager Type.
*
* @return ledger manager type
- * @throws ConfigurationException
+ *
* @deprecated replaced by {@link #getLedgerManagerFactoryClass()}
*/
@Deprecated
@@ -713,7 +712,7 @@ public abstract class AbstractConfiguration<T extends
AbstractConfiguration>
/**
* Whether the client will send an TLS certificate on TLS-handshake.
*
- * @see #setTLSAuthentication(boolean)
+ * @see #setTLSClientAuthentication(boolean)
* @return whether TLS is enabled on the bookie or not.
*/
public boolean getTLSClientAuthentication() {
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java
index 7b64d1b..1630d1a 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java
@@ -21,9 +21,6 @@ import static com.google.common.base.Charsets.UTF_8;
import static
org.apache.bookkeeper.util.BookKeeperConstants.FEATURE_DISABLE_ENSEMBLE_CHANGE;
import io.netty.buffer.ByteBuf;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.apache.bookkeeper.client.BookKeeper.DigestType;
import org.apache.bookkeeper.client.EnsemblePlacementPolicy;
@@ -238,7 +235,7 @@ public class ClientConfiguration extends
AbstractConfiguration<ClientConfigurati
* Get autodetection of digest type.
*
* <p>Ignores provided digestType, if enabled and uses one from ledger
metadata instead.
- * Incompatible with ledger created by bookie versions < 4.2
+ * Incompatible with ledger created by bookie versions < 4.2
*
* <p>It is turned on by default since 4.7.
*
@@ -251,7 +248,7 @@ public class ClientConfiguration extends
AbstractConfiguration<ClientConfigurati
/**
* Enable autodetection of digest type.
* Ignores provided digestType, if enabled and uses one from ledger
metadata instead.
- * Incompatible with ledger created by bookie versions < 4.2
+ * Incompatible with ledger created by bookie versions < 4.2
*
* @return client configuration.
*/
@@ -738,11 +735,9 @@ public class ClientConfiguration extends
AbstractConfiguration<ClientConfigurati
/**
* Get the tick duration in milliseconds that used for the
- * {@link org.jboss.netty.util.HashedWheelTimer} that used by PCBC to
timeout
+ * HashedWheelTimer that used by PCBC to timeout
* requests.
*
- * @see org.jboss.netty.util.HashedWheelTimer
- *
* @return tick duration in milliseconds
*/
@Deprecated
@@ -752,8 +747,8 @@ public class ClientConfiguration extends
AbstractConfiguration<ClientConfigurati
/**
* Set the tick duration in milliseconds that used for
- * {@link org.jboss.netty.util.HashedWheelTimer} that used by PCBC to
timeout
- * requests. Be aware of {@link org.jboss.netty.util.HashedWheelTimer} if
you
+ * HashedWheelTimer that used by PCBC to timeout
+ * requests. Be aware of HashedWheelTimer if you
* are going to modify this setting.
*
* @see #getPCBCTimeoutTimerTickDurationMs()
@@ -770,11 +765,9 @@ public class ClientConfiguration extends
AbstractConfiguration<ClientConfigurati
/**
* Get number of ticks that used for
- * {@link org.jboss.netty.util.HashedWheelTimer} that used by PCBC to
timeout
+ * HashedWheelTimer that used by PCBC to timeout
* requests.
*
- * @see org.jboss.netty.util.HashedWheelTimer
- *
* @return number of ticks that used for timeout timer.
*/
@Deprecated
@@ -784,8 +777,8 @@ public class ClientConfiguration extends
AbstractConfiguration<ClientConfigurati
/**
* Set number of ticks that used for
- * {@link org.jboss.netty.util.HashedWheelTimer} that used by PCBC to
timeout request.
- * Be aware of {@link org.jboss.netty.util.HashedWheelTimer} if you are
going to modify
+ * HashedWheelTimer that used by PCBC to timeout request.
+ * Be aware of HashedWheelTimer if you are going to modify
* this setting.
*
* @see #getPCBCTimeoutTimerNumTicks()
@@ -1091,9 +1084,11 @@ public class ClientConfiguration extends
AbstractConfiguration<ClientConfigurati
* Enable/disable reordering read sequence on reading entries.
*
* <p>If this flag is enabled, the client will use
- * {@link EnsemblePlacementPolicy#reorderReadSequence(ArrayList, List,
Map)}
+ * {@link EnsemblePlacementPolicy#reorderReadSequence(java.util.ArrayList,
+ * org.apache.bookkeeper.client.BookiesHealthInfo,
org.apache.bookkeeper.client.DistributionSchedule.WriteSet)}
* to figure out a better read sequence to attempt reads from replicas and
use
- * {@link EnsemblePlacementPolicy#reorderReadLACSequence(ArrayList, List,
Map)}
+ * {@link
EnsemblePlacementPolicy#reorderReadLACSequence(java.util.ArrayList,
+ * org.apache.bookkeeper.client.BookiesHealthInfo,
org.apache.bookkeeper.client.DistributionSchedule.WriteSet)}
* to figure out a better read sequence to attempt long poll reads from
replicas.
*
* <p>The order of read sequence is determined by the placement policy
implementations.
@@ -1283,8 +1278,8 @@ public class ClientConfiguration extends
AbstractConfiguration<ClientConfigurati
* Note: Please {@link #enableBookieHealthCheck()} to use this
configuration.
* </p>
*
- * @param threshold
- * @param unit
+ * @param thresholdPerInterval
+ *
* @return client configuration
*/
public ClientConfiguration setBookieErrorThresholdPerInterval(long
thresholdPerInterval) {
@@ -1426,7 +1421,7 @@ public class ClientConfiguration extends
AbstractConfiguration<ClientConfigurati
/**
* Set the timeout value in secs for the GET_BOOKIE_INFO request.
*
- * @param timeout
+ * @param timeoutSecs
* @return client configuration
*/
public ClientConfiguration setGetBookieInfoTimeout(int timeoutSecs) {
@@ -1436,7 +1431,7 @@ public class ClientConfiguration extends
AbstractConfiguration<ClientConfigurati
/**
* Set the timeout value in secs for the START_TLS request.
- * @param timeout
+ * @param timeoutSecs
* @return client configuration
*/
public ClientConfiguration setStartTLSTimeout(int timeoutSecs) {
diff --git a/pom.xml b/pom.xml
index 7d457e4..bc9d352 100644
--- a/pom.xml
+++ b/pom.xml
@@ -136,7 +136,7 @@
<junit.version>4.12</junit.version>
<libthrift5.version>0.5.0-1</libthrift5.version>
<libthrift9.version>0.9.3</libthrift9.version>
- <lombok.version>1.16.20</lombok.version>
+ <lombok.version>1.16.22</lombok.version>
<lz4.version>1.3.0</lz4.version>
<mockito.version>2.13.0</mockito.version>
<netty.version>4.1.22.Final</netty.version>
@@ -172,10 +172,10 @@
<maven-deploy-plugin.version>2.7</maven-deploy-plugin.version>
<maven-install-plugin.version>2.5.1</maven-install-plugin.version>
<maven-jar-plugin.version>2.4</maven-jar-plugin.version>
- <maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
+ <maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
<maven-shade-plugin.version>3.1.0</maven-shade-plugin.version>
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
- <maven-surefire-plugin.version>2.20.1</maven-surefire-plugin.version>
+ <maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
<nar-maven-plugin.version>3.1.0</nar-maven-plugin.version>
<os-maven-plugin.version>1.4.1.Final</os-maven-plugin.version>
<protobuf-maven-plugin.version>0.5.0</protobuf-maven-plugin.version>
--
To stop receiving notification emails like this one, please contact
[email protected].