Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit da4c9d6

Browse files
seratchtakezoe
authored andcommitted
Fix several minor typos detected by github.com/client9/misspell
Closes #456
1 parent f19d015 commit da4c9d6

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed

core/src/main/scala/org/apache/predictionio/controller/Engine.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class Engine[TD, EI, PD, Q, P, A](
268268

269269
/** Extract model for persistent layer.
270270
*
271-
* PredictionIO presist models for future use. It allows custom
271+
* PredictionIO persists models for future use. It allows custom
272272
* implementation for persisting models. You need to implement the
273273
* [[org.apache.predictionio.controller.PersistentModel]] interface. This method
274274
* traverses all models in the workflow. If the model is a
@@ -642,7 +642,7 @@ object Engine {
642642
dataSource.readTrainingBase(sc)
643643
} catch {
644644
case e: StorageClientException =>
645-
logger.error(s"Error occured reading from data source. (Reason: " +
645+
logger.error(s"Error occurred reading from data source. (Reason: " +
646646
e.getMessage + ") Please see the log for debugging details.", e)
647647
sys.exit(1)
648648
}

core/src/main/scala/org/apache/predictionio/core/AbstractDoer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ object Doer extends Logging {
4848

4949
// Subclasses only allows two kind of constructors.
5050
// 1. Constructor with P <: Params.
51-
// 2. Emtpy constructor.
51+
// 2. Empty constructor.
5252
// First try (1), if failed, try (2).
5353
try {
5454
val constr = cls.getConstructor(params.getClass)

core/src/main/scala/org/apache/predictionio/core/SelfCleaningDataSource.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ trait SelfCleaningDataSource {
6969

7070
/** :: DeveloperApi ::
7171
*
72-
* Returns RDD of events happend after duration in event window params.
72+
* Returns RDD of events happened after duration in event window params.
7373
*
7474
* @return RDD[Event] most recent PEvents.
7575
*/
@@ -87,7 +87,7 @@ trait SelfCleaningDataSource {
8787

8888
/** :: DeveloperApi ::
8989
*
90-
* Returns Iterator of events happend after duration in event window params.
90+
* Returns Iterator of events happened after duration in event window params.
9191
*
9292
* @return Iterator[Event] most recent LEvents.
9393
*/

core/src/main/scala/org/apache/predictionio/workflow/FakeWorkflow.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private[predictionio] case class FakeEvalResult() extends BaseEvaluatorResult {
7272
override val noSave: Boolean = true
7373
}
7474

75-
/** FakeRun allows user to implement custom function under the exact enviroment
75+
/** FakeRun allows user to implement custom function under the exact environment
7676
* as other PredictionIO workflow.
7777
*
7878
* Useful for developing new features. Only need to extend this trait and

data/src/test/scala/org/apache/predictionio/data/webhooks/mailchimp/MailChimpConnectorSpec.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import org.specs2.mutable._
2424

2525
class MailChimpConnectorSpec extends Specification with ConnectorTestUtil {
2626

27-
// TOOD: test other events
27+
// TODO: test other events
2828
// TODO: test different optional fields
2929

3030
"MailChimpConnector" should {
@@ -87,7 +87,7 @@ class MailChimpConnectorSpec extends Specification with ConnectorTestUtil {
8787
"data[merges][EMAIL]" -> "[email protected]",
8888
"data[merges][FNAME]" -> "MailChimp",
8989
"data[merges][LNAME]" -> "API",
90-
"data[merges][INTERESTS]" -> "Group1,Group2", //optional
90+
"data[merges][INTERESTS]" -> "Group1,Group2", //optional
9191
"data[ip_opt]" -> "10.20.10.30",
9292
"data[campaign_id]" -> "cb398d21d2"
9393
)
@@ -120,7 +120,7 @@ class MailChimpConnectorSpec extends Specification with ConnectorTestUtil {
120120
check(MailChimpConnector, unsubscribe, expected)
121121
}
122122

123-
//check profile update to event Json
123+
//check profile update to event Json
124124
"convert profile update to event JSON" in {
125125

126126
val profileUpdate = Map(
@@ -162,7 +162,7 @@ class MailChimpConnectorSpec extends Specification with ConnectorTestUtil {
162162
check(MailChimpConnector, profileUpdate, expected)
163163
}
164164

165-
//check email update to event Json
165+
//check email update to event Json
166166
"convert email update to event JSON" in {
167167

168168
val emailUpdate = Map(
@@ -192,7 +192,7 @@ class MailChimpConnectorSpec extends Specification with ConnectorTestUtil {
192192
check(MailChimpConnector, emailUpdate, expected)
193193
}
194194

195-
//check cleaned email to event Json
195+
//check cleaned email to event Json
196196
"convert cleaned email to event JSON" in {
197197

198198
val cleanedEmail = Map(
@@ -221,7 +221,7 @@ class MailChimpConnectorSpec extends Specification with ConnectorTestUtil {
221221
check(MailChimpConnector, cleanedEmail, expected)
222222
}
223223

224-
//check campaign sending status to event Json
224+
//check campaign sending status to event Json
225225
"convert campaign sending status to event JSON" in {
226226

227227
val campaign = Map(

data/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ testdata='[{
481481
checkPOST "/batch/events.json?accessKey=$accessKey" "$testdata" 200
482482

483483
# request with a malformed event (2nd event)
484-
# the response code is succesful but the error for individual event is reflected in the response's body.
484+
# the response code is successful but the error for individual event is reflected in the response's body.
485485
testdata='[{
486486
"event" : "my_event_1",
487487
"entityType" : "user",

storage/hbase/src/main/scala/org/apache/predictionio/data/storage/hbase/HBEventsUtil.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ object HBEventsUtil {
148148
val rowKey = event.eventId.map { id =>
149149
RowKey(id) // create rowKey from eventId
150150
}.getOrElse {
151-
// TOOD: use real UUID. not pseudo random
151+
// TODO: use real UUID. not pseudo random
152152
val uuidLow: Long = UUID.randomUUID().getLeastSignificantBits
153153
RowKey(
154154
entityType = event.entityType,

tests/pio_tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ has to download the following python-3 packages:
3333
You can pass it arguments to:
3434
* suppress the output of executed shell commands within the tests
3535
* enable logging
36-
* specify which tests should be exectued (by names)
36+
* specify which tests should be executed (by names)
3737

3838
For more information run:
3939
```shell
4040
python3 tests.py -h
4141
```
4242

43-
As soon as the tests are finishied an XML file with JUnit-like test reports
43+
As soon as the tests are finished an XML file with JUnit-like test reports
4444
is created in the directory of execution.
4545

4646
### Adding new tests

tests/pio_tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def repository_dirname(template):
5555

5656
def obtain_template(engine_dir, template):
5757
"""Given a directory with engines and a template downloads an engine
58-
if neccessary
58+
if necessary
5959
Args:
6060
engine_dir (str): directory where engines are stored
6161
template (str): either the name of an engine from the engines directory

tools/src/main/scala/org/apache/predictionio/tools/commands/App.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ object App extends EitherLogging {
298298
Right(channel.copy(id = chanId))
299299
} else {
300300
errStr = s"""Unable to create new channel.
301-
|Failed to initalize Event Store.""".stripMargin
301+
|Failed to initialize Event Store.""".stripMargin
302302
error(errStr)
303303
// reverted back the meta data
304304
try {

0 commit comments

Comments
 (0)