Created
September 29, 2020 02:08
-
-
Save WillisN/17b39a9c9363e592dc093a883cc63f32 to your computer and use it in GitHub Desktop.
main
This file contains 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
def main(): | |
TCP_IP = "localhost" | |
TCP_PORT = 9009 | |
conn = None | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.bind((TCP_IP, TCP_PORT)) | |
s.listen(1) | |
print("Waiting for TCP connection...") | |
conn, addr = s.accept() | |
print("Connected... Starting getting tweets.") | |
resp = get_tweets() | |
send_tweets_to_spark(resp, conn) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment