This very simple Big Data with Apache Spark.
This code finds the name of the country from the domain up and counts how many IPs each country has.
first you need download bin file ip2location.
second if you need add more data in ip range.
third you need fix all path files.
for download bin file see this link.
For run scala :
sbt compile sbt run
Note: you can add your master server for clustering(in python code we do this).
For python:
pip install -r req.txt py main.py
And output can be like This (you can see export file in folder out and out.cvs):
+---+-----+
|col|count|
+---+-----+
| SX| 60|
| NF| 60|
| MS| 60|
| NU| 60|
| TK| 60|
+---+-----+