Skip to content

Commit 7b7cf27

Browse files
committed
NUTCH-3064 Upgrade com.maxmind.geoip2:geoip2 dependency in geoip-index
1 parent a5c1867 commit 7b7cf27

8 files changed

Lines changed: 639 additions & 323 deletions

File tree

‎conf/nutch-default.xml‎

Lines changed: 60 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2231,43 +2231,87 @@ CAUTION: Set the parser.timeout to -1 or a bigger value than 30, when using this
22312231
</property>
22322232

22332233
<!-- index-geoip plugin properties -->
2234+
<!--
2235+
To use the index-geoip plugin, you must set 'store.ip.address' to true.
2236+
2237+
Configure one or more GeoIP databases by setting the corresponding property below.
2238+
Each database type can be enabled independently - set any combination you need.
2239+
Database files must be in MMDB format and available on the Hadoop classpath
2240+
(e.g., place them in $NUTCH_HOME/conf).
2241+
2242+
More information: https://support.maxmind.com/knowledge-base/articles/maxmind-database-formats
2243+
-->
2244+
2245+
<property>
2246+
<name>index.geoip.db.anonymous</name>
2247+
<value></value>
2248+
<description>
2249+
GeoIP2 Anonymous IP database file (MMDB format).
2250+
Identifies anonymous proxies, VPNs, Tor exit nodes, and hosting providers.
2251+
</description>
2252+
</property>
2253+
2254+
<property>
2255+
<name>index.geoip.db.asn</name>
2256+
<value></value>
2257+
<description>
2258+
GeoIP2/GeoLite2 ASN database file (MMDB format).
2259+
Provides autonomous system number and organization information.
2260+
</description>
2261+
</property>
2262+
2263+
<property>
2264+
<name>index.geoip.db.city</name>
2265+
<value></value>
2266+
<description>
2267+
GeoIP2/GeoLite2 City database file (MMDB format).
2268+
Provides city, subdivision, country, continent, and location data.
2269+
</description>
2270+
</property>
2271+
2272+
<property>
2273+
<name>index.geoip.db.connection</name>
2274+
<value></value>
2275+
<description>
2276+
GeoIP2 Connection Type database file (MMDB format).
2277+
Identifies connection type: Cable/DSL, Cellular, Corporate, or Satellite.
2278+
</description>
2279+
</property>
2280+
22342281
<property>
2235-
<name>index.geoip.usage</name>
2282+
<name>index.geoip.db.domain</name>
22362283
<value></value>
22372284
<description>
2238-
To use the geoip-plugin you must set 'store.ip.address' to true.
2239-
A string representing the information source to be used for GeoIP information
2240-
lookup. Options are 'anonymous', 'asn', 'city', 'connection', 'domain',
2241-
'insights' or 'isp'.
2242-
If you wish to use any one of the Database options, you should make the relevant
2243-
*.mmdb file(s) available on the Hadoop classpath and available at runtime.
2244-
This can be achieved by adding it to `$NUTCH_HOME/conf`.
2285+
GeoIP2 Domain database file (MMDB format).
2286+
Provides the second-level domain associated with the IP address.
22452287
</description>
22462288
</property>
22472289

22482290
<property>
2249-
<name>index.geoip.db.file</name>
2291+
<name>index.geoip.db.isp</name>
22502292
<value></value>
22512293
<description>
2252-
The GeoIP2 or GeoLite2 database file in the MMDB format. More information available at
2253-
https://support.maxmind.com/hc/en-us/articles/4408216157723-Database-Formats
2254-
This file must be available on the Hadoop classpath.
2294+
GeoIP2 ISP database file (MMDB format).
2295+
Provides ISP, organization, and autonomous system information.
22552296
</description>
22562297
</property>
22572298

2299+
<!-- MaxMind Insights Web Service (alternative to local databases) -->
22582300
<property>
2259-
<name>index.geoip.userid</name>
2301+
<name>index.geoip.insights.userid</name>
22602302
<value></value>
22612303
<description>
2262-
The userId associated with the GeoIP2 Precision Services account.
2304+
The userId for the MaxMind GeoIP2 Precision Insights web service.
2305+
If set along with licensekey, the Insights service will be queried in addition
2306+
to any configured local databases.
22632307
</description>
22642308
</property>
22652309

22662310
<property>
2267-
<name>index.geoip.licensekey</name>
2311+
<name>index.geoip.insights.licensekey</name>
22682312
<value></value>
22692313
<description>
2270-
The license key associated with the GeoIP2 Precision Services account.
2314+
The license key for the MaxMind GeoIP2 Precision Insights web service.
22712315
</description>
22722316
</property>
22732317

‎src/plugin/index-geoip/build.xml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,9 @@
2323
<copy todir="${build.classes}">
2424
<fileset dir="${src.dir}" includes="**/*.mmdb" />
2525
</copy>
26+
<!-- Copy sample mmdb files for testing -->
27+
<copy todir="${build.classes}">
28+
<fileset dir="${root}/sample" includes="**/*.mmdb" erroronmissingdir="false"/>
29+
</copy>
2630
</target>
2731
</project>

‎src/plugin/index-geoip/ivy.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</publications>
3838

3939
<dependencies>
40-
<dependency org="com.maxmind.geoip2" name="geoip2" rev="4.2.0">
40+
<dependency org="com.maxmind.geoip2" name="geoip2" rev="5.0.2">
4141
<!-- Exlude libs provided in Nutch core -->
4242
<exclude org="com.fasterxml.jackson.core" name="jackson-annotations" />
4343
<exclude org="com.fasterxml.jackson.core" name="jackson-databind" />

‎src/plugin/index-geoip/plugin.xml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
<library name="index-geoip.jar">
2727
<export name="*"/>
2828
</library>
29-
<library name="geoip2-4.2.0.jar"/>
30-
<library name="maxmind-db-3.1.0.jar"/>
29+
<library name="geoip2-5.0.2.jar"/>
30+
<library name="jackson-datatype-jsr310-2.20.1.jar"/>
31+
<library name="maxmind-db-4.0.2.jar"/>
3132
</runtime>
3233

3334
<requires>

0 commit comments

Comments
 (0)