You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2019/03/13 19:26:52 UTC
[pulsar] branch master updated: Fix some minor typos (#3814)
This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 0158439 Fix some minor typos (#3814)
0158439 is described below
commit 0158439987fbb4d5d83307a61294e329892f9543
Author: Ezequiel Lovelle <ez...@gmail.com>
AuthorDate: Wed Mar 13 16:26:46 2019 -0300
Fix some minor typos (#3814)
Just fix some minor typos I've encountered so far.
---
.../pulsar/client/api/SimpleProducerConsumerTest.java | 4 ++--
.../apache/pulsar/client/impl/NegativeAcksTracker.java | 2 +-
.../impl/PersistentAcknowledgmentsGroupingTracker.java | 16 ++++++++--------
.../java/org/apache/pulsar/client/impl/ProducerImpl.java | 4 ++--
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
index 06dacd8..d51c686 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
@@ -1111,8 +1111,8 @@ public class SimpleProducerConsumerTest extends ProducerConsumerBase {
/**
* Verify: Consumer stops receiving msg when reach unack-msg limit and starts receiving once acks messages 1.
* Produce X (600) messages 2. Consumer has receive size (10) and receive message without acknowledging 3. Consumer
- * will stop receiving message after unAckThreshold = 500 4. Consumer acks messages and starts consuming remanining
- * messages This testcase enables checksum sending while producing message and broker verifies the checksum for the
+ * will stop receiving message after unAckThreshold = 500 4. Consumer acks messages and starts consuming remaining
+ * messages This test case enables checksum sending while producing message and broker verifies the checksum for the
* message.
*
* @throws Exception
diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/NegativeAcksTracker.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/NegativeAcksTracker.java
index 304546e..0c3ac67 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/NegativeAcksTracker.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/NegativeAcksTracker.java
@@ -86,7 +86,7 @@ class NegativeAcksTracker {
if (this.timeout == null) {
// Schedule a task and group all the redeliveries for same period. Leave a small buffer to allow for
- // nack immedietaly following the current one will be batched into the same redelivery request.
+ // nack immediately following the current one will be batched into the same redeliver request.
this.timeout = timer.newTimeout(this::triggerRedelivery, timerIntervalNanos, TimeUnit.NANOSECONDS);
}
}
diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java
index 457baf5..c79d24f 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java
@@ -39,7 +39,7 @@ import org.apache.pulsar.common.api.Commands;
import org.apache.pulsar.common.api.proto.PulsarApi.CommandAck.AckType;
/**
- * Group the acknowledgments for a certain time and then sends them out in a single protobuf command.
+ * Group the acknowledgements for a certain time and then sends them out in a single protobuf command.
*/
@Slf4j
public class PersistentAcknowledgmentsGroupingTracker implements AcknowledgmentsGroupingTracker {
@@ -57,7 +57,7 @@ public class PersistentAcknowledgmentsGroupingTracker implements Acknowledgments
* Latest cumulative ack sent to broker
*/
private volatile MessageIdImpl lastCumulativeAck = (MessageIdImpl) MessageId.earliest;
- private volatile boolean cumulativeAckFulshRequired = false;
+ private volatile boolean cumulativeAckFlushRequired = false;
private static final AtomicReferenceFieldUpdater<PersistentAcknowledgmentsGroupingTracker, MessageIdImpl> LAST_CUMULATIVE_ACK_UPDATER = AtomicReferenceFieldUpdater
.newUpdater(PersistentAcknowledgmentsGroupingTracker.class, MessageIdImpl.class, "lastCumulativeAck");
@@ -86,7 +86,7 @@ public class PersistentAcknowledgmentsGroupingTracker implements Acknowledgments
/**
* Since the ack are delayed, we need to do some best-effort duplicate check to discard messages that are being
- * resent after a disconnection and for which the user has already sent an acknowlowdgement.
+ * resent after a disconnection and for which the user has already sent an acknowledgement.
*/
public boolean isDuplicate(MessageId messageId) {
if (messageId.compareTo(lastCumulativeAck) <= 0) {
@@ -119,8 +119,8 @@ public class PersistentAcknowledgmentsGroupingTracker implements Acknowledgments
MessageIdImpl lastCumlativeAck = this.lastCumulativeAck;
if (msgId.compareTo(lastCumlativeAck) > 0) {
if (LAST_CUMULATIVE_ACK_UPDATER.compareAndSet(this, lastCumlativeAck, msgId)) {
- // Successfully updated the last cumlative ack. Next flush iteration will send this to broker.
- cumulativeAckFulshRequired = true;
+ // Successfully updated the last cumulative ack. Next flush iteration will send this to broker.
+ cumulativeAckFlushRequired = true;
return;
}
} else {
@@ -158,12 +158,12 @@ public class PersistentAcknowledgmentsGroupingTracker implements Acknowledgments
}
boolean shouldFlush = false;
- if (cumulativeAckFulshRequired) {
+ if (cumulativeAckFlushRequired) {
ByteBuf cmd = Commands.newAck(consumer.consumerId, lastCumulativeAck.ledgerId, lastCumulativeAck.entryId,
AckType.Cumulative, null, Collections.emptyMap());
cnx.ctx().write(cmd, cnx.ctx().voidPromise());
shouldFlush=true;
- cumulativeAckFulshRequired = false;
+ cumulativeAckFlushRequired = false;
}
// Flush all individual acks
@@ -184,7 +184,7 @@ public class PersistentAcknowledgmentsGroupingTracker implements Acknowledgments
cnx.ctx().voidPromise());
shouldFlush = true;
} else {
- // When talking to older brokers, send the acknowledgments individually
+ // When talking to older brokers, send the acknowledgements individually
while (true) {
MessageIdImpl msgId = pendingIndividualAcks.pollFirst();
if (msgId == null) {
diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
index 4c941e2..a393b48 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
@@ -451,7 +451,7 @@ public class ProducerImpl<T> extends ProducerBase<T> implements TimerTask, Conne
private void doBatchSendAndAdd(MessageImpl<T> msg, SendCallback callback, ByteBuf payload) {
if (log.isDebugEnabled()) {
- log.debug("[{}] [{}] Closing out batch to accomodate large message with size {}", topic, producerName,
+ log.debug("[{}] [{}] Closing out batch to accommodate large message with size {}", topic, producerName,
msg.getDataBuffer().readableBytes());
}
batchMessageAndSend();
@@ -670,7 +670,7 @@ public class ProducerImpl<T> extends ProducerBase<T> implements TimerTask, Conne
if (sequenceId > expectedSequenceId) {
log.warn("[{}] [{}] Got ack for msg. expecting: {} - got: {} - queue-size: {}", topic, producerName,
expectedSequenceId, sequenceId, pendingMessages.size());
- // Force connection closing so that messages can be retransmitted in a new connection
+ // Force connection closing so that messages can be re-transmitted in a new connection
cnx.channel().close();
} else if (sequenceId < expectedSequenceId) {
// Ignoring the ack since it's referring to a message that has already timed out.