mirror of
https://github.com/20kaushik02/real-time-traffic-analysis-clickhouse.git
synced 2026-01-25 08:04:04 +00:00
cc map, full scale data testing
This commit is contained in:
@@ -56,8 +56,10 @@ services:
|
||||
aliases:
|
||||
- data-streamer
|
||||
volumes:
|
||||
- "../preprocessing/10k_sample_2023_10_01-2023_10_31.csv:/data/csv/main.csv:ro"
|
||||
command: "sh -c 'sleep 30 && python /app/pcap_processor.py -c /data/csv/main.csv -l 0.1'"
|
||||
# - "../preprocessing/10k_sample_2023_10_01-2023_10_31.csv:/data/csv/main.csv:ro"
|
||||
- "../preprocessing/1M_sample_2023_10_01-2023_10_31.csv:/data/csv/main.csv:ro"
|
||||
command: "sh -c 'sleep 30 && python /app/pcap_processor.py -c /data/csv/main.csv'"
|
||||
# command: "sh -c 'sleep 30 && python /app/pcap_processor.py -c /data/csv/main.csv -l 0.1'"
|
||||
deploy:
|
||||
replicas: 1
|
||||
# placement:
|
||||
|
||||
@@ -14,7 +14,7 @@ def int_to_ipv4(num: int) -> str:
|
||||
|
||||
# with open("IP2LOCATION-LITE-DB3.csv", "r") as input_file, open(
|
||||
with open("IP2LOCATION-LITE-DB1.csv", "r") as input_file, open(
|
||||
"geoip.csv", "w", newline=""
|
||||
"geoip_cc.csv", "w", newline=""
|
||||
) as output_file:
|
||||
reader = csv.reader(input_file)
|
||||
writer = csv.writer(output_file)
|
||||
@@ -24,6 +24,7 @@ with open("IP2LOCATION-LITE-DB1.csv", "r") as input_file, open(
|
||||
[
|
||||
"ip_range_start",
|
||||
"ip_range_end",
|
||||
"country_code",
|
||||
"country",
|
||||
# "region",
|
||||
# "city",
|
||||
@@ -35,6 +36,7 @@ with open("IP2LOCATION-LITE-DB1.csv", "r") as input_file, open(
|
||||
new_record = [
|
||||
int_to_ipv4(int(record[0])),
|
||||
int_to_ipv4(int(record[1])),
|
||||
record[2],
|
||||
record[3],
|
||||
# record[4],
|
||||
# record[5],
|
||||
|
||||
Reference in New Issue
Block a user