# RegionalParse **Repository Path**: ggtool/RegionalParse ## Basic Information - **Project Name**: RegionalParse - **Description**: Hive中自定义Udf解析IP地址为对应的省份、城市、区域,支持中英文 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 8 - **Forks**: 3 - **Created**: 2018-11-16 - **Last Updated**: 2023-03-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # RegionalParse #### 项目介绍 Hive中自定义Udf解析IP地址为对应的省份、城市、区域,支持中英文 #### 测试 需要将geo2db的数据库放到resource文件夹中测试 #### UDF配置 ip的自定义包,需要添加到hive udf中 需要添加的函数如下 add jar /usr/local/hive/external_lib/regionalParse-0.0.1-SNAPSHOT.jar; create temporary function ll2province AS 'com.gw.udf.LL2Province'; create temporary function ll2provinceen AS 'com.gw.udf.LL2ProvinceEN'; create temporary function indexof AS 'com.gw.udf.IndexOf'; create temporary function ip2region AS 'com.gw.udf.IP2Region'; create temporary function ip2regionen AS 'com.gw.udf.IP2RegionEN';