Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
c00f3e16
Commit
c00f3e16
authored
Nov 12, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监控
parent
f8ce940e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
spark_streaming_monitor.py
eda/smart_rank/spark_streaming_monitor.py
+5
-3
No files found.
eda/smart_rank/spark_streaming_monitor.py
View file @
c00f3e16
import
requests
from
datetime
import
date
time
from
datetime
import
date
result
=
requests
.
get
(
'http://192.144.193.19:4042/api/v1/applications/app-20191112140630-0664/streaming/batches'
)
...
...
@@ -7,8 +7,9 @@ batchs_info = result.json()
# batchTime = '2019-11-12T07:53:44.000GMT'
log_path
=
"/Users/apple/Desktop/"
log_path
=
"/Users/apple/Desktop/
spark_streaming_log/
"
with
open
(
log_path
+
"user_portrait_tag_name_increment_update.log"
,
"a"
)
as
f
:
today
=
date
.
today
()
.
strftime
(
'
%
Y
%
m
%
d'
)
with
open
(
log_path
+
"user_portrait_tag_name_increment_update_"
+
today
+
".log"
,
"a"
)
as
f
:
for
batch
in
batchs_info
:
f
.
write
(
'
%
s
\n
'
%
batch
)
\ No newline at end of file
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