Fix several minor typos detected by github.com/client9/misspell
Closes #456
diff --git a/core/src/main/scala/org/apache/predictionio/controller/Engine.scala b/core/src/main/scala/org/apache/predictionio/controller/Engine.scala
index 1f9d0ab..3b5f363 100644
--- a/core/src/main/scala/org/apache/predictionio/controller/Engine.scala
+++ b/core/src/main/scala/org/apache/predictionio/controller/Engine.scala
@@ -268,7 +268,7 @@
/** Extract model for persistent layer.
*
- * PredictionIO presist models for future use. It allows custom
+ * PredictionIO persists models for future use. It allows custom
* implementation for persisting models. You need to implement the
* [[org.apache.predictionio.controller.PersistentModel]] interface. This method
* traverses all models in the workflow. If the model is a
@@ -642,7 +642,7 @@
dataSource.readTrainingBase(sc)
} catch {
case e: StorageClientException =>
- logger.error(s"Error occured reading from data source. (Reason: " +
+ logger.error(s"Error occurred reading from data source. (Reason: " +
e.getMessage + ") Please see the log for debugging details.", e)
sys.exit(1)
}
diff --git a/core/src/main/scala/org/apache/predictionio/core/AbstractDoer.scala b/core/src/main/scala/org/apache/predictionio/core/AbstractDoer.scala
index 5da48ce..04d781f 100644
--- a/core/src/main/scala/org/apache/predictionio/core/AbstractDoer.scala
+++ b/core/src/main/scala/org/apache/predictionio/core/AbstractDoer.scala
@@ -48,7 +48,7 @@
// Subclasses only allows two kind of constructors.
// 1. Constructor with P <: Params.
- // 2. Emtpy constructor.
+ // 2. Empty constructor.
// First try (1), if failed, try (2).
try {
val constr = cls.getConstructor(params.getClass)
diff --git a/core/src/main/scala/org/apache/predictionio/core/SelfCleaningDataSource.scala b/core/src/main/scala/org/apache/predictionio/core/SelfCleaningDataSource.scala
index cadf6b8..be3fe05 100644
--- a/core/src/main/scala/org/apache/predictionio/core/SelfCleaningDataSource.scala
+++ b/core/src/main/scala/org/apache/predictionio/core/SelfCleaningDataSource.scala
@@ -69,7 +69,7 @@
/** :: DeveloperApi ::
*
- * Returns RDD of events happend after duration in event window params.
+ * Returns RDD of events happened after duration in event window params.
*
* @return RDD[Event] most recent PEvents.
*/
@@ -87,7 +87,7 @@
/** :: DeveloperApi ::
*
- * Returns Iterator of events happend after duration in event window params.
+ * Returns Iterator of events happened after duration in event window params.
*
* @return Iterator[Event] most recent LEvents.
*/
diff --git a/core/src/main/scala/org/apache/predictionio/workflow/FakeWorkflow.scala b/core/src/main/scala/org/apache/predictionio/workflow/FakeWorkflow.scala
index c9b1d23..8e4db51 100644
--- a/core/src/main/scala/org/apache/predictionio/workflow/FakeWorkflow.scala
+++ b/core/src/main/scala/org/apache/predictionio/workflow/FakeWorkflow.scala
@@ -72,7 +72,7 @@
override val noSave: Boolean = true
}
-/** FakeRun allows user to implement custom function under the exact enviroment
+/** FakeRun allows user to implement custom function under the exact environment
* as other PredictionIO workflow.
*
* Useful for developing new features. Only need to extend this trait and
diff --git a/data/src/test/scala/org/apache/predictionio/data/webhooks/mailchimp/MailChimpConnectorSpec.scala b/data/src/test/scala/org/apache/predictionio/data/webhooks/mailchimp/MailChimpConnectorSpec.scala
index add9c6f..9bb1847 100644
--- a/data/src/test/scala/org/apache/predictionio/data/webhooks/mailchimp/MailChimpConnectorSpec.scala
+++ b/data/src/test/scala/org/apache/predictionio/data/webhooks/mailchimp/MailChimpConnectorSpec.scala
@@ -24,7 +24,7 @@
class MailChimpConnectorSpec extends Specification with ConnectorTestUtil {
- // TOOD: test other events
+ // TODO: test other events
// TODO: test different optional fields
"MailChimpConnector" should {
@@ -87,7 +87,7 @@
"data[merges][EMAIL]" -> "api+unsub@mailchimp.com",
"data[merges][FNAME]" -> "MailChimp",
"data[merges][LNAME]" -> "API",
- "data[merges][INTERESTS]" -> "Group1,Group2", //optional
+ "data[merges][INTERESTS]" -> "Group1,Group2", //optional
"data[ip_opt]" -> "10.20.10.30",
"data[campaign_id]" -> "cb398d21d2"
)
@@ -120,7 +120,7 @@
check(MailChimpConnector, unsubscribe, expected)
}
- //check profile update to event Json
+ //check profile update to event Json
"convert profile update to event JSON" in {
val profileUpdate = Map(
@@ -162,7 +162,7 @@
check(MailChimpConnector, profileUpdate, expected)
}
- //check email update to event Json
+ //check email update to event Json
"convert email update to event JSON" in {
val emailUpdate = Map(
@@ -192,7 +192,7 @@
check(MailChimpConnector, emailUpdate, expected)
}
- //check cleaned email to event Json
+ //check cleaned email to event Json
"convert cleaned email to event JSON" in {
val cleanedEmail = Map(
@@ -221,7 +221,7 @@
check(MailChimpConnector, cleanedEmail, expected)
}
- //check campaign sending status to event Json
+ //check campaign sending status to event Json
"convert campaign sending status to event JSON" in {
val campaign = Map(
diff --git a/data/test.sh b/data/test.sh
index be0eb07..8481f47 100755
--- a/data/test.sh
+++ b/data/test.sh
@@ -481,7 +481,7 @@
checkPOST "/batch/events.json?accessKey=$accessKey" "$testdata" 200
# request with a malformed event (2nd event)
-# the response code is succesful but the error for individual event is reflected in the response's body.
+# the response code is successful but the error for individual event is reflected in the response's body.
testdata='[{
"event" : "my_event_1",
"entityType" : "user",
diff --git a/storage/hbase/src/main/scala/org/apache/predictionio/data/storage/hbase/HBEventsUtil.scala b/storage/hbase/src/main/scala/org/apache/predictionio/data/storage/hbase/HBEventsUtil.scala
index 64487fb..4b0ad9a 100644
--- a/storage/hbase/src/main/scala/org/apache/predictionio/data/storage/hbase/HBEventsUtil.scala
+++ b/storage/hbase/src/main/scala/org/apache/predictionio/data/storage/hbase/HBEventsUtil.scala
@@ -148,7 +148,7 @@
val rowKey = event.eventId.map { id =>
RowKey(id) // create rowKey from eventId
}.getOrElse {
- // TOOD: use real UUID. not pseudo random
+ // TODO: use real UUID. not pseudo random
val uuidLow: Long = UUID.randomUUID().getLeastSignificantBits
RowKey(
entityType = event.entityType,
diff --git a/tests/pio_tests/README.md b/tests/pio_tests/README.md
index 070ac8b..cb426da 100644
--- a/tests/pio_tests/README.md
+++ b/tests/pio_tests/README.md
@@ -33,14 +33,14 @@
You can pass it arguments to:
* suppress the output of executed shell commands within the tests
* enable logging
-* specify which tests should be exectued (by names)
+* specify which tests should be executed (by names)
For more information run:
```shell
python3 tests.py -h
```
-As soon as the tests are finishied an XML file with JUnit-like test reports
+As soon as the tests are finished an XML file with JUnit-like test reports
is created in the directory of execution.
### Adding new tests
diff --git a/tests/pio_tests/utils.py b/tests/pio_tests/utils.py
index 4659e54..6eecf89 100644
--- a/tests/pio_tests/utils.py
+++ b/tests/pio_tests/utils.py
@@ -55,7 +55,7 @@
def obtain_template(engine_dir, template):
"""Given a directory with engines and a template downloads an engine
- if neccessary
+ if necessary
Args:
engine_dir (str): directory where engines are stored
template (str): either the name of an engine from the engines directory
diff --git a/tools/src/main/scala/org/apache/predictionio/tools/commands/App.scala b/tools/src/main/scala/org/apache/predictionio/tools/commands/App.scala
index 5884ebd..06c1641 100644
--- a/tools/src/main/scala/org/apache/predictionio/tools/commands/App.scala
+++ b/tools/src/main/scala/org/apache/predictionio/tools/commands/App.scala
@@ -298,7 +298,7 @@
Right(channel.copy(id = chanId))
} else {
errStr = s"""Unable to create new channel.
- |Failed to initalize Event Store.""".stripMargin
+ |Failed to initialize Event Store.""".stripMargin
error(errStr)
// reverted back the meta data
try {