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
| ansible-playbook -i <inventory-file> deploy_authorized_keys.yml --ask-become-pass --ask-pass --extra-vars='pubkey="<pubkey-for-super-user>”’ |
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
| [defaults] | |
| host_key_checking = False |
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
| ansible-playbook -i <inventory-file> deploy_authorized_keys.yml --ask-pass --extra-vars='pubkey="<pubkey>"' |
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.restartstrategy.RestartStrategies; | |
| import org.apache.flink.api.java.utils.ParameterTool; | |
| import org.apache.flink.streaming.api.CheckpointingMode; | |
| import org.apache.flink.streaming.api.datastream.DataStream; | |
| import org.apache.flink.streaming.api.environment.CheckpointConfig; | |
| import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; | |
| import org.apache.flink.streaming.connectors.fs.bucketing.BucketingSink; | |
| import org.apache.flink.streaming.connectors.fs.bucketing.DateTimeBucketer; | |
| import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer08; | |
| import org.apache.flink.streaming.util.serialization.SimpleStringSchema; |
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 { | |
| kafka { | |
| group_id => "flink-test" | |
| topics => ["flink-test"] | |
| bootstrap_servers => "localhost:9092" | |
| } | |
| } | |
| output { | |
| stdout {} | |
| } |
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
| from kafka import KafkaProducer | |
| from kafka.errors import KafkaError | |
| import json | |
| import time | |
| producer = KafkaProducer(bootstrap_servers=['localhost:9092'], value_serializer=lambda m: json.dumps(m).encode('ascii')) | |
| # Asynchronous by default | |
| future = producer.send('flink-test', b'raw_bytes') | |
| # Block for 'synchronous' sends |
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
| it("should render a text box with no string inside if search string is not provided by store", () => { | |
| const testState = { | |
| showBox: { | |
| search: "" | |
| } | |
| }; | |
| const store = createMockStore(testState) | |
| const component = shallowWithStore(<ConnectedShowBox />, store); | |
| expect(component).to.be.a('object'); | |
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
| describe('ConnectedShowBox', () => { | |
| it("should render a text box with empty string inside if string is not provided by store", () => { | |
| const testState = { | |
| searchBox: {} | |
| }; | |
| const store = createMockStore(testState) | |
| const component = shallowWithStore(<ConnectedShowBox />, store); | |
| expect(component).to.be.a('object'); | |
| expect(component.dive().find("").prop("value")).to.equal("") | |
| }); |