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
| cassandra: | |
| image: cassandra:latest | |
| environment: ['rpc_address=172.22.1.31', 'cassandra_listen_address=172.22.1.31'] | |
| ports: | |
| - "9042:9042" | |
| - "9160:9160" |
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
| input { | |
| beats { | |
| port => 5044 | |
| type => "nginx" | |
| } | |
| jdbc { | |
| jdbc_connection_string => "jdbc:postgresql://postgres:5432/postgres" | |
| jdbc_driver_library => "/usr/share/logstash/jdbc/postgresql-42.1.4.jre6.jar" | |
| jdbc_user => "postgres" | |
| jdbc_password => "postgres" |
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 random | |
| import string | |
| import pandas as pd | |
| def generate_grid(n): | |
| grid = {} | |
| i = 0 | |
| while(i <= n): | |
| grid.update({'{}'.format(i) : { '{}'.format(i) : random.choice(string.ascii_letters)}}) | |
| i+=1 |
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 json | |
| import os, shutil | |
| path = "/mnt/volume-nyc3-01/imagens/" | |
| with open('JSON/destaque_empresarial.json', encoding='utf-8') as json_file: | |
| dados = json.load(json_file) | |
| for p in dados: | |
| dst_pasta = "/mnt/volume-nyc3-01/ROVIVOPortal/website/media/fotos_legado" | |
| for file in os.listdir(path): |
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 json | |
| import os, shutil | |
| def trata_data(d): | |
| data = d | |
| if '//' in d: | |
| data = d.replace('//', '/') | |
| elif '/0/00/2008' in d: | |
| data = '03/05/2008' |
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
| name=sink-elastic-twitter-distributed | |
| connector.class=io.confluent.connect.elasticsearch.ElasticsearchSinkConnector | |
| tasks.max=3 | |
| topics=twitter-demo | |
| key.converter=org.apache.kafka.connect.json.JsonConverter | |
| key.converter.schemas.enable=true | |
| value.converter=org.apache.kafka.connect.json.JsonConverter | |
| value.converter.schemas.enable=true | |
| connection.url=http://elasticsearch:9200 | |
| type.name=genres |
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: | |
| kafka-cluster: | |
| image: landoop/fast-data-dev:latest | |
| environment: | |
| ADV_HOST: 172.22.1.56 # Change to 192.168.99.100 if using Docker Toolbox | |
| RUNTESTS: 0 # Disable Running tests so the cluster starts faster | |
| ports: | |
| - 2181:2181 # Zookeeper |
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
| name=source-twitter-distributed | |
| connector.class=com.eneco.trading.kafka.connect.twitter.TwitterSourceConnector | |
| tasks.max=1 | |
| topic=demo-3-twitter | |
| key.converter=org.apache.kafka.connect.json.JsonConverter | |
| key.converter.schemas.enable=true | |
| value.converter=org.apache.kafka.connect.json.JsonConverter | |
| value.converter.schemas.enable=true | |
| twitter.consumerkey= |
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: | |
| # this is our kafka cluster. | |
| kafka-cluster: | |
| image: landoop/fast-data-dev:latest | |
| environment: | |
| ADV_HOST: 127.0.0.1 # Change to 192.168.99.100 if using Docker Toolbox | |
| RUNTESTS: 0 # Disable Running tests so the cluster starts faster | |
| ports: |
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
| package com.ipva.service; | |
| import com.ipva.model.Veiculos; | |
| import com.ipva.repository.VeiculosRepository; | |
| import java.util.Collections; | |
| import java.util.Properties; | |
| import javax.annotation.PostConstruct; | |
| import org.apache.kafka.clients.consumer.Consumer; | |
| import org.apache.kafka.clients.consumer.ConsumerRecord; | |
| import org.apache.kafka.clients.consumer.ConsumerRecords; |