Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
eagleEye
/
eagleEye-udf
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
729d20a3
authored
Mar 12, 2025
by
魏建枢
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
文件路径修改
parent
63bf39b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
eagleEye-udf/src/main/java/com/cloud/udf/IpToConvert.java
eagleEye-udf/src/main/java/com/cloud/udf/util/SearcherUtil.java
eagleEye-udf/src/main/java/com/cloud/udf/IpToConvert.java
View file @
729d20a3
...
...
@@ -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
());
}
...
...
eagleEye-udf/src/main/java/com/cloud/udf/util/SearcherUtil.java
View file @
729d20a3
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment