Toggle navigation
Toggle navigation
This project
Loading...
Sign in
신은섭(Shin Eun Seop)
/
Detecting_fraud_clicks
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
2
Merge Requests
0
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
신은섭(Shin Eun Seop)
2018-06-05 13:51:13 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
033b9164947ccaf5e7e79bdc386608c6e296c003
033b9164
1 parent
c5923b5e
delete unusing show()
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
src/main/java/detact/Aggregation.java
src/main/java/detact/Utill.java
src/main/java/detact/Aggregation.java
View file @
033b916
...
...
@@ -37,7 +37,7 @@ public class Aggregation {
dataset
=
agg
.
countClickInTenMinutes
(
dataset
);
// test
dataset
.
where
(
"ip == '5348' and app == '19'"
).
show
(
10
);
//
dataset.where("ip == '5348' and app == '19'").show(10);
// Save to scv
Utill
.
saveCSVDataSet
(
dataset
,
result_path
);
...
...
src/main/java/detact/Utill.java
View file @
033b916
...
...
@@ -16,8 +16,7 @@ public class Utill {
public
static
void
saveCSVDataSet
(
Dataset
<
Row
>
dataset
,
String
path
){
// Read SCV to DataSet
dataset
.
repartition
(
1
)
.
write
().
format
(
"com.databricks.spark.csv"
)
dataset
.
write
().
format
(
"com.databricks.spark.csv"
)
.
option
(
"inferSchema"
,
"true"
)
.
option
(
"header"
,
"true"
)
.
save
(
path
);
...
...
Please
register
or
login
to post a comment