Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
run 'aws config' instead of 'inv create_profile'
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Ohprecio committed Jun 10, 2015
1 parent 1e212c5 commit 7fb8f71
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ Follow along in this [blog post] (http://snowplowanalytics.com/blog/2015/06/09/s


```bash
$ inv create_profile my-profile
$ aws configure
AWS Access Key ID [None]: ...
AWS Secret Access Key [None]: ...
Default region name [None]: us-east-1
Default output format [None]:
Default output format [None]: json
```

```bash
$ inv create_kinesis_stream my-profile my-stream
$ inv create_kinesis_stream default my-stream
```

Wait a minute and then:

```bash
$ inv describe_kinesis_stream my-profile my-stream
$ inv describe_kinesis_stream default my-stream
{
"StreamDescription": {
"StreamStatus": "ACTIVE",
Expand All @@ -83,13 +83,13 @@ $ inv describe_kinesis_stream my-profile my-stream


```bash
$ inv create_dynamodb_table my-profile us-east-1 my-table
$ inv create_dynamodb_table default us-east-1 my-table
```

Now start sending events to the stream:

```bash
$ inv generate_events my-profile us-east-1 my-stream
$ inv generate_events default us-east-1 my-stream
Event sent to Kinesis: {"timestamp": "2015-06-05T12:54:43.064528", "type": "Green", "id": "4ec80fb1-0963-4e35-8f54-ce760499d974"}
Event sent to Kinesis: {"timestamp": "2015-06-05T12:54:43.757797", "type": "Red", "id": "eb84b0d1-f793-4213-8a65-2fb09eab8c5c"}
Event sent to Kinesis: {"timestamp": "2015-06-05T12:54:44.295972", "type": "Yellow", "id": "4654bdc8-86d4-44a3-9920-fee7939e2582"}
Expand Down
2 changes: 1 addition & 1 deletion config/config.hocon.sample
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ dynamodb {

aws {

awsProfile: "my-profile"
awsProfile: "default"

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@ import kinesis.{KinesisUtils => KU}
*/
object StreamingCounts {

private val AppName = "StreamingCountsApp"

/**
* Private function to set up Spark Streaming
*
* @param config The configuration for our job using StreamingCountsConfig.scala
*/
private def setupSparkContext(config: StreamingCountsConfig): StreamingContext = {
val streamingSparkContext = {
val sparkConf = new SparkConf().setAppName(AppName).setMaster(config.master)
val sparkConf = new SparkConf().setAppName(config.appName).setMaster(config.master)
new StreamingContext(sparkConf, config.batchInterval)
}
streamingSparkContext
Expand Down

0 comments on commit 7fb8f71

Please sign in to comment.