Skip to content

Commit

Permalink
Merge pull request #1559 from antonioalf/fix_examples
Browse files Browse the repository at this point in the history
fix examples for manager installation
  • Loading branch information
aalfonso-stratio committed Apr 6, 2016
2 parents 66fea96 + 534c74c commit edc686f
Show file tree
Hide file tree
Showing 4 changed files with 288 additions and 119 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.9.2 (April 2016)

- Bugfix: Fixed examples

## 0.9.1 (April 2016)

- Bugfix: Fixed documentation links
Expand Down
119 changes: 83 additions & 36 deletions examples/policies/fragments/IWebSocket-OCassandra.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,23 @@
{
"storageLevel": "MEMORY_AND_DISK_SER",
"name": "Policy-WebSocket-Cassandra",
"description": "Input WebSocket, output Cassandra",
"sparkStreamingWindow": 2000,
"sparkStreamingWindow": "2s",
"checkpointPath": "checkpoint",
"rawData": {
"enabled": "false",
"path": "myTestParquetPath"
},
"checkpointPath": "checkpoint",
"fragments": [
{
"id": "_input_id_",
"name": "websocket",
"fragmentType": "input",
"description": "description",
"shortDescription": "shortDescription",
"icon": "icon",
"element": null
},
{
"id": "_output_id_",
"name": "Cassandra",
"fragmentType": "output",
"description": "description",
"shortDescription": "shortDescription",
"icon": "icon",
"element": null
}
],
"transformations": [
{
"name": "morphline",
"type": "Morphlines",
"order": 0,
"inputField": "_attachment_body",
"outputFields": [
{"name":"response"}
{
"name": "response",
"type": "string"
}
],
"configuration": {
"morphline": {
Expand All @@ -57,43 +41,106 @@
}
},
{
"name": "timestamp",
"order": 1,
"type": "DateTime",
"order": 1,
"inputField": "_attachment_body",
"outputFields": [
{"name":"timestamp"}
{
"name": "timestamp",
"type": "datetime"
}
],
"configuration": {
"inputFormat": "autoGenerated"
}
}
],
"streamTriggers": [],
"cubes": [
{
"name": "testCube",
"writer": {
"outputs" : ["Cassandra"]
},
"dimensions": [
{
"name": "response",
"field": "response",
"name": "response"
"precision": "identity",
"type": "Default"
},
{
"name": "minute",
"field": "timestamp",
"precision": "1m",
"type": "DateTime",
"precision": "minute",
"computeLast": "10m"
}
],
"operators": [
{
"name": "countoperator",
"type": "Count",
"name": "count1",
"configuration": {}
}
]
],
"writer": {
"outputs": [
"cassandra"
],
"dateType": "timestamp",
"isAutoCalculatedId": false
},
"triggers": []
}
]
}
],
"input": {
"name": "websocket",
"type": "WebSocket",
"configuration": {
"url": "ws://stream.meetup.com/2/rsvps"
}
},
"outputs": [
{
"name": "cassandra",
"type": "Cassandra",
"configuration": {
"connectionHost": "ip-172-31-17-8.eu-west-1.compute.internal",
"cluster": "Stratio Cluster",
"keyspace": "sparta"
}
}
],
"fragments": [
{
"id": "_input_id_",
"fragmentType": "input",
"name": "websocket",
"description": "websocket input",
"shortDescription": "websocket input",
"element": {
"name": "in-websocket",
"type": "WebSocket",
"configuration": {
"url": "ws://stream.meetup.com/2/rsvps"
}
}
},
{
"id": "_output_id_",
"fragmentType": "output",
"name": "cassandra",
"description": "Cassandra output",
"shortDescription": "Cassandra output",
"element": {
"name": "out-cassandra",
"type": "Cassandra",
"configuration": {
"connectionHost": "ip-172-31-17-8.eu-west-1.compute.internal",
"cluster": "Stratio Cluster",
"keyspace": "sparta"
}
}
}
],
"userPluginsJars": []
}

142 changes: 100 additions & 42 deletions examples/policies/fragments/IWebSocket-OElasticsearch.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,23 @@
{
"name": "Policy-WebSocket-ElasticSearch",
"storageLevel": "MEMORY_AND_DISK_SER",
"name": "policy-websocket-elasticsearch",
"description": "Input WebSocket, output ElasticSearch",
"sparkStreamingWindow": 2000,
"sparkStreamingWindow": "2s",
"checkpointPath": "/tmp/checkpoint",
"rawData": {
"enabled": "false",
"path": "myTestParquetPath"
"path": "default"
},
"checkpointPath": "checkpoint",
"fragments": [
{
"id": "_input_id_",
"name": "WebSocket",
"fragmentType": "input",
"description": "description",
"shortDescription": "shortDescription",
"icon": "icon",
"element": null
},
{
"id": "_output_id_",
"name": "Elasticsearch",
"fragmentType": "output",
"description": "description",
"shortDescription": "shortDescription",
"icon": "icon",
"element": null
}
],

"transformations": [
{
"name": "morphline",
"type": "Morphlines",
"order": 0,
"inputField": "_attachment_body",
"outputFields": [
{"name":"response"}
{
"name": "response",
"type": "string"
}
],
"configuration": {
"morphline": {
Expand All @@ -58,45 +41,120 @@
}
},
{
"name": "timestamp",
"order": 1,
"type": "DateTime",
"order": 1,
"inputField": "_attachment_body",
"outputFields": [
{"name":"timestamp"}
{
"name": "timestamp",
"type": "datetime"
}
],
"configuration": {
"inputFormat": "autoGenerated"
}
}
],
"streamTriggers": [],
"cubes": [
{
"name": "testCube",
"writer": {
"outputs" : ["Elasticsearch"],
"dateType": "long",
"isAutoCalculatedId": true
},
"name": "cube1",
"dimensions": [
{
"name": "response",
"field": "response",
"name": "response"
"precision": "identity",
"type": "Default"
},
{
"name": "minute",
"field": "timestamp",
"precision": "1m",
"type": "DateTime",
"precision": "minute",
"computeLast": "10m"
}
],
"operators": [
{
"name": "countoperator",
"type": "Count",
"name": "count1",
"configuration": {}
}
]
],
"writer": {
"outputs": [
"elasticsearch"
],
"dateType": "timestamp",
"isAutoCalculatedId": false
},
"triggers": []
}
],
"input": {
"name": "websocket",
"type": "WebSocket",
"configuration": {
"url": "ws://stream.meetup.com/2/rsvps"
}
},
"outputs": [
{
"name": "elasticsearch",
"type": "ElasticSearch",
"configuration": {
"nodes": [
{
"node": "localhost",
"tcpPort": "9300",
"httpPort": "9200"
}
],
"clusterName": "elasticsearch",
"idField": "",
"indexMapping": "sparta"
}
}
],
"fragments": [
{
"id": "_input_id_",
"fragmentType": "input",
"name": "websocket",
"description": "websocket input",
"shortDescription": "websocket input",
"element": {
"name": "in-websocket",
"type": "WebSocket",
"configuration": {
"url": "ws://stream.meetup.com/2/rsvps"
}
}
},
{
"id": "_output_id_",
"fragmentType": "output",
"name": "elasticsearch",
"description": "Elasticsearch is a search server based on Lucene. It provides a distributed, multitenant-capable full-text search engine with a RESTful web interface and schema-free JSON documents.",
"shortDescription": "The Elasticsearch output uses the generic implementation with DataFrames.",
"element": {
"name": "in-ElasticSearch",
"type": "ElasticSearch",
"configuration": {
"nodes": [
{
"node": "localhost",
"tcpPort": "9300",
"httpPort": "9200"
}
],
"clusterName": "elasticsearch",
"idField": "",
"indexMapping": "sparta"
}
}
}
]
}
],
"userPluginsJars": []
}

Loading

0 comments on commit edc686f

Please sign in to comment.