Commit 729d20a3 by 魏建枢

文件路径修改

parent 63bf39b8
......@@ -64,10 +64,7 @@ public class IpToConvert extends GenericUDTF{
if(args[0] != null) {
id = args[0].toString();
}
String ip = null;
if(args[1] != null) {
ip = args[1].toString();
}
String ip = args[1].toString();
String cid = null;
if(args[2] != null) {
cid = args[2].toString();
......@@ -86,9 +83,7 @@ public class IpToConvert extends GenericUDTF{
}
String area_name = null;
try {
if(StringUtils.isNotEmpty(ip)) {
area_name = SearcherUtil.getCityInfoByFile(ip);
}
} catch (Exception e) {
System.out.println("ip:"+ip+"e:"+e.toString());
}
......
......@@ -15,8 +15,8 @@ public class SearcherUtil {
public static String getCityInfoByFile(String ip) {
System.out.println("SearcherUtil start! ip:"+ip);
// 1、创建 searcher 对象
String dbPath = "D:\\gitEagleEye\\eagleEye-service\\src\\main\\resources\\ip2region.xdb";
// String dbPath = "/home/opc/ip2region.xdb";
// String dbPath = "D:\\gitEagleEye\\eagleEye-service\\src\\main\\resources\\ip2region.xdb";
String dbPath = "/home/opc/ip2region.xdb";
Searcher searcher;
try {
System.out.println("dbPath:"+dbPath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment