This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | SELECT | |
| room, | |
| TUMBLE_END(rowtime, INTERVAL ‘10’ SECOND), | |
| AVG(temperature) AS avgTemp | |
| FROM sensors | |
| GROUP BY | |
| TUMBLE(rowtime, INTERVAL ‘10’ SECOND), | |
| room | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import org.apache.flink.api.common.functions.MapFunction; | |
| import org.apache.flink.api.java.tuple.Tuple3; | |
| import org.apache.flink.streaming.api.TimeCharacteristic; | |
| import org.apache.flink.streaming.api.datastream.DataStream; | |
| import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; | |
| import org.apache.flink.streaming.api.functions.timestamps.AscendingTimestampExtractor; | |
| import org.apache.flink.table.api.Table; | |
| import org.apache.flink.table.api.TableEnvironment; | |
| import org.apache.flink.table.api.java.StreamTableEnvironment; | |
| import org.apache.flink.types.Row; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | docker network create -d overlay mynet | |
| docker run --name iperf_overlay -d -ti --net mynet \ | |
| --env="constraint:node==mhs-demo0-do" \ | |
| mustafaakin/alpine-iperf iperf -s | |
| # Wait a little | |
| sleep 1 | |
| IP=$(docker inspect -f "{ { .NetworkSettings.Networks.mynet.IPAddress }}" iperf_overlay) | |
| for run in {1..5}; do | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | docker run --name iperf_host -d -ti --net host \ | |
| --env="constraint:node==mhs-demo0-do" \ | |
| mustafaakin/alpine-iperf iperf -s | |
| # Wait a little | |
| sleep 1 | |
| for run in {1..5}; do | |
| docker run --net host --env="constraint:node==mhs-demo1-do" -ti \ | |
| mustafaakin/alpine-iperf \ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $ eval $(docker-machine env --swarm mhs-demo0-do) | |
| $ docker info | |
| Containers: 3 | |
| Images: 2 | |
| Role: primary | |
| Strategy: spread | |
| Filters: health, port, dependency, affinity, constraint | |
| Nodes: 2 | |
| mhs-demo0-do: 188.166.113.176:2376 | |
| └ Containers: 2 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $ eval $(docker-machine env --swarm mhs-demo0-vb) | |
| $ docker info | |
| Containers: 60 | |
| Images: 7 | |
| Role: primary | |
| Strategy: spread | |
| Filters: health, port, dependency, affinity, constraint | |
| Nodes: 2 | |
| mhs-demo0-vb: 192.168.99.101:2376 | |
| └ Containers: 16 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // replace it with your own token | |
| TOKEN=aaa12a00f2f264727a4c5436c070d58477cd6d5f13a0379955901c4a962e9ee2 | |
| # Create Key Store Node | |
| docker-machine create --driver digitalocean \ | |
| --digitalocean-access-token=$TOKEN \ | |
| --digitalocean-region=ams3 mh-keystore-do | |
| docker $(docker-machine config mh-keystore-do) run -d \ | |
| -p "8500:8500" \ | |
| -h "consul" \ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Create Key Store Node | |
| docker-machine create -d virtualbox mh-keystore-vb | |
| docker $(docker-machine config mh-keystore-vb) run -d \ | |
| -p "8500:8500" \ | |
| -h "consul" \ | |
| progrium/consul -server -bootstrap | |
| # Create Primary Node | |
| docker-machine create \ | |
| -d virtualbox \ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | version: '2' | |
| services: | |
| redis: | |
| image: redis:3 | |
| mongo: | |
| image: mongo:2.6 | |
| restart: always | |
| volumes: | |
| - "./data/mongo:/data/db" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function perform() { | |
| console.log("Finding button") | |
| $($("._4xev")[1]).click(); | |
| setTimeout(function() { | |
| $(".uiContextualLayer").each(function() { | |
| var b = $(this).is(':visible'); | |
| if (b) { | |
| var t = $(this).find("._54nh"); | |
| var a = {}; | |
| t.each(function() { |