Skip to content

Commit 368dd80

Browse files
authored
Fix spelling (#5516)
1 parent a4508ba commit 368dd80

15 files changed

Lines changed: 83 additions & 83 deletions

File tree

common/scala/src/main/scala/org/apache/openwhisk/core/ack/Ack.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
package org.apache.openwhisk.core.ack
1919
import org.apache.openwhisk.common.{TransactionId, UserEvents}
20-
import org.apache.openwhisk.core.connector.{AcknowledegmentMessage, EventMessage, MessageProducer}
20+
import org.apache.openwhisk.core.connector.{AcknowledgementMessage, EventMessage, MessageProducer}
2121
import org.apache.openwhisk.core.entity.{ControllerInstanceId, UUID, WhiskActivation}
2222

2323
import scala.concurrent.Future
@@ -27,23 +27,23 @@ import scala.concurrent.Future
2727
* are either completion messages for an activation to indicate a resource slot is free, or result-forwarding
2828
* messages for continuations (e.g., sequences and conductor actions).
2929
*
30-
* The activation result is always provided because some acknowledegment messages may not carry the result of
30+
* The activation result is always provided because some acknowledgement messages may not carry the result of
3131
* the activation and this is needed for sending user events.
3232
*
3333
* @param tid the transaction id for the activation
3434
* @param activationResult is the activation result
3535
* @param blockingInvoke is true iff the activation was a blocking request
3636
* @param controllerInstance the originating controller/loadbalancer id
3737
* @param userId is the UUID for the namespace owning the activation
38-
* @param acknowledegment the acknowledgement message to send
38+
* @param acknowledgement the acknowledgement message to send
3939
*/
4040
trait ActiveAck {
4141
def apply(tid: TransactionId,
4242
activationResult: WhiskActivation,
4343
blockingInvoke: Boolean,
4444
controllerInstance: ControllerInstanceId,
4545
userId: UUID,
46-
acknowledegment: AcknowledegmentMessage): Future[Any]
46+
acknowledgement: AcknowledgementMessage): Future[Any]
4747
}
4848

4949
trait EventSender {

common/scala/src/main/scala/org/apache/openwhisk/core/ack/HealthActionAck.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
package org.apache.openwhisk.core.ack
1919

2020
import org.apache.openwhisk.common.{Logging, TransactionId}
21-
import org.apache.openwhisk.core.connector.{AcknowledegmentMessage, MessageProducer}
21+
import org.apache.openwhisk.core.connector.{AcknowledgementMessage, MessageProducer}
2222
import org.apache.openwhisk.core.entity.{ControllerInstanceId, UUID, WhiskActivation}
2323
import spray.json.DefaultJsonProtocol._
2424

@@ -30,7 +30,7 @@ class HealthActionAck(producer: MessageProducer)(implicit logging: Logging, ec:
3030
blockingInvoke: Boolean,
3131
controllerInstance: ControllerInstanceId,
3232
userId: UUID,
33-
acknowledegment: AcknowledegmentMessage): Future[Any] = {
33+
acknowledgement: AcknowledgementMessage): Future[Any] = {
3434
implicit val transid: TransactionId = tid
3535

3636
logging.debug(this, s"health action was successfully invoked")

common/scala/src/main/scala/org/apache/openwhisk/core/ack/MessagingActiveAck.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ package org.apache.openwhisk.core.ack
2020
import org.apache.kafka.common.errors.RecordTooLargeException
2121
import org.apache.openwhisk.common.{Logging, TransactionId}
2222
import org.apache.openwhisk.core.ConfigKeys
23-
import org.apache.openwhisk.core.connector.{AcknowledegmentMessage, EventMessage, MessageProducer}
23+
import org.apache.openwhisk.core.connector.{AcknowledgementMessage, EventMessage, MessageProducer}
2424
import org.apache.openwhisk.core.entity._
2525
import pureconfig._
2626
import scala.concurrent.{ExecutionContext, Future}
@@ -38,19 +38,19 @@ class MessagingActiveAck(producer: MessageProducer, instance: InstanceId, eventS
3838
blockingInvoke: Boolean,
3939
controllerInstance: ControllerInstanceId,
4040
userId: UUID,
41-
acknowledegment: AcknowledegmentMessage): Future[Any] = {
41+
acknowledgement: AcknowledgementMessage): Future[Any] = {
4242
implicit val transid: TransactionId = tid
4343

44-
def send(msg: AcknowledegmentMessage, recovery: Boolean = false) = {
44+
def send(msg: AcknowledgementMessage, recovery: Boolean = false) = {
4545
producer.send(topic = topicPrefix + "completed" + controllerInstance.asString, msg).andThen {
4646
case Success(_) =>
4747
val info = if (recovery) s"recovery ${msg.messageType}" else msg.messageType
48-
logging.info(this, s"posted $info of activation ${acknowledegment.activationId}")
48+
logging.info(this, s"posted $info of activation ${acknowledgement.activationId}")
4949
}
5050
}
5151

5252
// UserMetrics are sent, when the slot is free again. This ensures, that all metrics are sent.
53-
if (acknowledegment.isSlotFree.nonEmpty) {
53+
if (acknowledgement.isSlotFree.nonEmpty) {
5454
eventSender.foreach { s =>
5555
EventMessage.from(activationResult, instance.source, userId) match {
5656
case Success(msg) => s.send(msg)
@@ -62,10 +62,10 @@ class MessagingActiveAck(producer: MessageProducer, instance: InstanceId, eventS
6262
// An acknowledgement containing the result is only needed for blocking invokes in order to further the
6363
// continuation. A result message for a non-blocking activation is not actually registered in the load balancer
6464
// and the container proxy should not send such an acknowlegement unless it's a blocking request. Here the code
65-
// is defensive and will shrink all non-blocking acknowledegments.
66-
send(if (blockingInvoke) acknowledegment else acknowledegment.shrink).recoverWith {
65+
// is defensive and will shrink all non-blocking acknowledgements.
66+
send(if (blockingInvoke) acknowledgement else acknowledgement.shrink).recoverWith {
6767
case t if t.getCause.isInstanceOf[RecordTooLargeException] =>
68-
send(acknowledegment.shrink, recovery = true)
68+
send(acknowledgement.shrink, recovery = true)
6969
}
7070
}
7171
}

common/scala/src/main/scala/org/apache/openwhisk/core/connector/Message.scala

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ case class ActivationMessage(override val transid: TransactionId,
7878
* Message that is sent from the invoker to the controller after action is completed or after slot is free again for
7979
* new actions.
8080
*/
81-
abstract class AcknowledegmentMessage(private val tid: TransactionId) extends Message {
81+
abstract class AcknowledgementMessage(private val tid: TransactionId) extends Message {
8282
override val transid: TransactionId = tid
8383

84-
override def serialize: String = AcknowledegmentMessage.serdes.write(this).compactPrint
84+
override def serialize: String = AcknowledgementMessage.serdes.write(this).compactPrint
8585

8686
/** Pithy descriptor for logging. */
8787
def messageType: String
@@ -106,7 +106,7 @@ abstract class AcknowledegmentMessage(private val tid: TransactionId) extends Me
106106
/**
107107
* Converts the message to a more compact form if it cannot cross the message bus as is or some of its details are not necessary.
108108
*/
109-
def shrink: AcknowledegmentMessage
109+
def shrink: AcknowledgementMessage
110110
}
111111

112112
/**
@@ -122,7 +122,7 @@ case class CombinedCompletionAndResultMessage private (override val transid: Tra
122122
response: Either[ActivationId, WhiskActivation],
123123
override val isSystemError: Option[Boolean],
124124
instance: InstanceId)
125-
extends AcknowledegmentMessage(transid) {
125+
extends AcknowledgementMessage(transid) {
126126
override def messageType = "combined"
127127

128128
override def result = Some(response)
@@ -148,7 +148,7 @@ case class CompletionMessage private (override val transid: TransactionId,
148148
override val activationId: ActivationId,
149149
override val isSystemError: Option[Boolean],
150150
instance: InstanceId)
151-
extends AcknowledegmentMessage(transid) {
151+
extends AcknowledgementMessage(transid) {
152152
override def messageType = "completion"
153153

154154
override def result = None
@@ -171,7 +171,7 @@ case class CompletionMessage private (override val transid: TransactionId,
171171
* Right when this message is created.
172172
*/
173173
case class ResultMessage private (override val transid: TransactionId, response: Either[ActivationId, WhiskActivation])
174-
extends AcknowledegmentMessage(transid) {
174+
extends AcknowledgementMessage(transid) {
175175
override def messageType = "result"
176176

177177
override def result = Some(response)
@@ -209,7 +209,7 @@ object CombinedCompletionAndResultMessage extends DefaultJsonProtocol {
209209
instance: InstanceId): CombinedCompletionAndResultMessage =
210210
new CombinedCompletionAndResultMessage(transid, Right(activation), Some(activation.response.isWhiskError), instance)
211211

212-
implicit private val eitherSerdes = AcknowledegmentMessage.eitherResponse
212+
implicit private val eitherSerdes = AcknowledgementMessage.eitherResponse
213213
implicit val serdes = jsonFormat4(
214214
CombinedCompletionAndResultMessage
215215
.apply(_: TransactionId, _: Either[ActivationId, WhiskActivation], _: Option[Boolean], _: InstanceId))
@@ -239,12 +239,12 @@ object ResultMessage extends DefaultJsonProtocol {
239239
def apply(transid: TransactionId, activation: WhiskActivation): ResultMessage =
240240
new ResultMessage(transid, Right(activation))
241241

242-
implicit private val eitherSerdes = AcknowledegmentMessage.eitherResponse
242+
implicit private val eitherSerdes = AcknowledgementMessage.eitherResponse
243243
implicit val serdes = jsonFormat2(ResultMessage.apply(_: TransactionId, _: Either[ActivationId, WhiskActivation]))
244244
}
245245

246-
object AcknowledegmentMessage extends DefaultJsonProtocol {
247-
def parse(msg: String): Try[AcknowledegmentMessage] = Try(serdes.read(msg.parseJson))
246+
object AcknowledgementMessage extends DefaultJsonProtocol {
247+
def parse(msg: String): Try[AcknowledgementMessage] = Try(serdes.read(msg.parseJson))
248248

249249
protected[connector] val eitherResponse = new JsonFormat[Either[ActivationId, WhiskActivation]] {
250250
def write(either: Either[ActivationId, WhiskActivation]) = either.fold(_.toJson, _.toJson)
@@ -259,13 +259,13 @@ object AcknowledegmentMessage extends DefaultJsonProtocol {
259259
}
260260
}
261261

262-
implicit val serdes = new RootJsonFormat[AcknowledegmentMessage] {
263-
override def write(m: AcknowledegmentMessage): JsValue = m.toJson
262+
implicit val serdes = new RootJsonFormat[AcknowledgementMessage] {
263+
override def write(m: AcknowledgementMessage): JsValue = m.toJson
264264

265265
// The field invoker is only part of CombinedCompletionAndResultMessage and CompletionMessage.
266266
// If this field is part of the JSON, we try to deserialize into one of these two types,
267267
// and otherwise to a ResultMessage. If all conversions fail, an error will be thrown that needs to be handled.
268-
override def read(json: JsValue): AcknowledegmentMessage = {
268+
override def read(json: JsValue): AcknowledgementMessage = {
269269
val JsObject(fields) = json
270270
val completion = fields.contains("instance")
271271
val result = fields.contains("response")

common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskEntity.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ abstract class WhiskEntity protected[entity] (en: EntityName, val entityType: St
8484

8585
/**
8686
* A JSON view of the entity, that should match the result returned in a list operation.
87-
* This should be synchronized with the views computed in the databse.
87+
* This should be synchronized with the views computed in the database.
8888
* Strictly used in view testing to enforce alignment.
8989
*/
9090
def summaryAsJson: JsObject = {

core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/CommonLoadBalancer.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -219,19 +219,19 @@ abstract class CommonLoadBalancer(config: WhiskConfig,
219219
/** 4. Get the ack message and parse it */
220220
protected[loadBalancer] def processAcknowledgement(bytes: Array[Byte]): Future[Unit] = Future {
221221
val raw = new String(bytes, StandardCharsets.UTF_8)
222-
AcknowledegmentMessage.parse(raw) match {
223-
case Success(acknowledegment) =>
224-
acknowledegment.isSlotFree.foreach { instance =>
222+
AcknowledgementMessage.parse(raw) match {
223+
case Success(acknowledgement) =>
224+
acknowledgement.isSlotFree.foreach { instance =>
225225
processCompletion(
226-
acknowledegment.activationId,
227-
acknowledegment.transid,
226+
acknowledgement.activationId,
227+
acknowledgement.transid,
228228
forced = false,
229-
isSystemError = acknowledegment.isSystemError.getOrElse(false),
229+
isSystemError = acknowledgement.isSystemError.getOrElse(false),
230230
instance)
231231
}
232232

233-
acknowledegment.result.foreach { response =>
234-
processResult(acknowledegment.activationId, acknowledegment.transid, response)
233+
acknowledgement.result.foreach { response =>
234+
processResult(acknowledgement.activationId, acknowledgement.transid, response)
235235
}
236236

237237
activationFeed ! MessageFeed.Processed
@@ -242,7 +242,7 @@ abstract class CommonLoadBalancer(config: WhiskConfig,
242242

243243
case _ =>
244244
activationFeed ! MessageFeed.Processed
245-
logging.error(this, s"Unexpected Acknowledgment message received by loadbalancer: $raw")
245+
logging.error(this, s"Unexpected Acknowledgement message received by loadbalancer: $raw")
246246
}
247247
}
248248

core/controller/src/main/scala/org/apache/openwhisk/core/loadBalancer/FPCPoolBalancer.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -295,18 +295,18 @@ class FPCPoolBalancer(config: WhiskConfig,
295295
/** 4. Get the active-ack message and parse it */
296296
protected[loadBalancer] def processAcknowledgement(bytes: Array[Byte]): Future[Unit] = Future {
297297
val raw = new String(bytes, StandardCharsets.UTF_8)
298-
AcknowledegmentMessage.parse(raw) match {
299-
case Success(acknowledegment) =>
300-
acknowledegment.isSlotFree.foreach { invoker =>
298+
AcknowledgementMessage.parse(raw) match {
299+
case Success(acknowledgement) =>
300+
acknowledgement.isSlotFree.foreach { invoker =>
301301
processCompletion(
302-
acknowledegment.activationId,
303-
acknowledegment.transid,
302+
acknowledgement.activationId,
303+
acknowledgement.transid,
304304
forced = false,
305-
isSystemError = acknowledegment.isSystemError.getOrElse(false))
305+
isSystemError = acknowledgement.isSystemError.getOrElse(false))
306306
}
307307

308-
acknowledegment.result.foreach { response =>
309-
processResult(acknowledegment.activationId, acknowledegment.transid, response)
308+
acknowledgement.result.foreach { response =>
309+
processResult(acknowledgement.activationId, acknowledgement.transid, response)
310310
}
311311

312312
activationFeed ! MessageFeed.Processed
@@ -316,7 +316,7 @@ class FPCPoolBalancer(config: WhiskConfig,
316316

317317
case _ =>
318318
activationFeed ! MessageFeed.Processed
319-
logging.warn(this, s"Unexpected Acknowledgment message received by loadbalancer: $raw")
319+
logging.warn(this, s"Unexpected Acknowledgement message received by loadbalancer: $raw")
320320
}
321321
}
322322

tests/performance/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Next, the action will be invoked 100 times blocking and one after each other. Be
9393
`PAUSE_BETWEEN_INVOKES` milliseconds. The last step is to delete the action.
9494

9595
Once one language is finished, the next kind will be taken. They are not running in parallel. There are never more than
96-
1 activations in the system, as we only want to meassure latency of warm activations.
96+
1 activations in the system, as we only want to measure latency of warm activations.
9797
As all actions are invoked blocking and only one action is in the system, it doesn't matter how many controllers
9898
and invokers are deployed. If several controllers or invokers are deployed, all controllers send the activation
9999
always to the same invoker.

tests/performance/gatling_tests/src/gatling/scala/org/apache/openwhisk/ColdBlockingInvokeSimulation.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class ColdBlockingInvokeSimulation extends Simulation {
7171
// Execute all actions for the given amount of time.
7272
.during(seconds) {
7373
// Cycle through the actions of this user, to not invoke the same action directly one after each other.
74-
// Otherwise there is the possiblity, that it is warm.
74+
// Otherwise there is the possibility, that it is warm.
7575
repeat(actionsPerUser, "i") {
7676
exec(openWhisk("Invoke action").authenticate(uuid, key).action(actionName).invoke())
7777
}

tests/src/test/scala/org/apache/openwhisk/core/connector/tests/AcknowledgementMessageTests.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import org.scalatest.junit.JUnitRunner
2323
import spray.json._
2424
import org.apache.openwhisk.common.{TransactionId, WhiskInstants}
2525
import org.apache.openwhisk.core.connector.{
26-
AcknowledegmentMessage,
26+
AcknowledgementMessage,
2727
CombinedCompletionAndResultMessage,
2828
CompletionMessage,
2929
ResultMessage
@@ -60,15 +60,15 @@ class AcknowledgementMessageTests extends FlatSpec with Matchers with WhiskInsta
6060
m.isSlotFree shouldBe empty
6161
m.serialize shouldBe JsObject("transid" -> m.transid.toJson, "response" -> m.response.left.get.toJson).compactPrint
6262
m.serialize shouldBe m.toJson.compactPrint
63-
AcknowledegmentMessage.parse(m.serialize) shouldBe Success(m)
63+
AcknowledgementMessage.parse(m.serialize) shouldBe Success(m)
6464
}
6565

6666
it should "serialize and deserialize a Result message with Right result" in {
6767
val m = ResultMessage(TransactionId.testing, activation)
6868
m.response shouldBe 'right
6969
m.isSlotFree shouldBe empty
7070
m.serialize shouldBe JsObject("transid" -> m.transid.toJson, "response" -> m.response.right.get.toJson).compactPrint
71-
AcknowledegmentMessage.parse(m.serialize) shouldBe Success(m)
71+
AcknowledgementMessage.parse(m.serialize) shouldBe Success(m)
7272
}
7373

7474
it should "serialize and deserialize a Completion message" in {
@@ -79,7 +79,7 @@ class AcknowledgementMessageTests extends FlatSpec with Matchers with WhiskInsta
7979
InvokerInstanceId(0, userMemory = defaultUserMemory))
8080
m.isSlotFree should not be empty
8181
m.serialize shouldBe m.toJson.compactPrint
82-
AcknowledegmentMessage.parse(m.serialize) shouldBe Success(m)
82+
AcknowledgementMessage.parse(m.serialize) shouldBe Success(m)
8383
}
8484

8585
it should "serialize and deserialize a CombinedCompletionAndResultMessage" in {
@@ -92,7 +92,7 @@ class AcknowledgementMessageTests extends FlatSpec with Matchers with WhiskInsta
9292
c.isSlotFree should not be empty
9393
c.isSystemError shouldBe Some(false)
9494
c.serialize shouldBe c.toJson.compactPrint
95-
AcknowledegmentMessage.parse(c.serialize) shouldBe Success(c)
95+
AcknowledgementMessage.parse(c.serialize) shouldBe Success(c)
9696
}
9797

9898
withClue("system error true and right") {
@@ -106,7 +106,7 @@ class AcknowledgementMessageTests extends FlatSpec with Matchers with WhiskInsta
106106
c.isSlotFree should not be empty
107107
c.isSystemError shouldBe Some(true)
108108
c.serialize shouldBe c.toJson.compactPrint
109-
AcknowledegmentMessage.parse(c.serialize) shouldBe Success(c)
109+
AcknowledgementMessage.parse(c.serialize) shouldBe Success(c)
110110
}
111111

112112
withClue("system error false and left") {
@@ -118,7 +118,7 @@ class AcknowledgementMessageTests extends FlatSpec with Matchers with WhiskInsta
118118
c.isSlotFree should not be empty
119119
c.isSystemError shouldBe Some(false)
120120
c.serialize shouldBe c.toJson.compactPrint
121-
AcknowledegmentMessage.parse(c.serialize) shouldBe Success(c)
121+
AcknowledgementMessage.parse(c.serialize) shouldBe Success(c)
122122
}
123123

124124
withClue("system error true and left") {
@@ -132,7 +132,7 @@ class AcknowledgementMessageTests extends FlatSpec with Matchers with WhiskInsta
132132
c.isSlotFree should not be empty
133133
c.isSystemError shouldBe Some(true)
134134
c.serialize shouldBe c.toJson.compactPrint
135-
AcknowledegmentMessage.parse(c.serialize) shouldBe Success(c)
135+
AcknowledgementMessage.parse(c.serialize) shouldBe Success(c)
136136
}
137137
}
138138
}

0 commit comments

Comments
 (0)