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
fccb3d72
Commit
fccb3d72
authored
Oct 18, 2018
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add hive support
parent
d6967541
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
GmeiConfig.scala
eda/feededa/src/main/scala/com/gmei/GmeiConfig.scala
+1
-0
WeafareStat.scala
eda/feededa/src/main/scala/com/gmei/WeafareStat.scala
+6
-2
No files found.
eda/feededa/src/main/scala/com/gmei/GmeiConfig.scala
View file @
fccb3d72
...
@@ -48,6 +48,7 @@ object GmeiConfig extends Serializable {
...
@@ -48,6 +48,7 @@ object GmeiConfig extends Serializable {
.
builder
()
.
builder
()
.
config
(
sparkConf
)
.
config
(
sparkConf
)
.
appName
(
"feededa"
)
.
appName
(
"feededa"
)
.
enableHiveSupport
()
.
getOrCreate
()
.
getOrCreate
()
val
context
=
SparkContext
.
getOrCreate
(
sparkConf
)
val
context
=
SparkContext
.
getOrCreate
(
sparkConf
)
...
...
eda/feededa/src/main/scala/com/gmei/WeafareStat.scala
View file @
fccb3d72
...
@@ -81,7 +81,9 @@ object WeafareStat {
...
@@ -81,7 +81,9 @@ object WeafareStat {
)
)
video_count
.
show
()
video_count
.
show
()
val
output1
=
"./test_vd_cids.csv"
val
output1
=
"./test_vd_cids.csv"
video_count
.
repartition
(
1
).
write
.
format
(
"com.databricks.spark.csv"
).
option
(
"header"
,
"true"
).
save
(
output1
)
video_count
.
repartition
(
1
)
.
write
.
format
(
"com.databricks.spark.csv"
)
.
option
(
"header"
,
"true"
).
save
(
output1
)
val
txt_count
=
sc
.
sql
(
val
txt_count
=
sc
.
sql
(
s
"""
s
"""
...
@@ -95,7 +97,9 @@ object WeafareStat {
...
@@ -95,7 +97,9 @@ object WeafareStat {
)
)
txt_count
.
show
()
txt_count
.
show
()
val
output2
=
"./test_txt_cids.csv"
val
output2
=
"./test_txt_cids.csv"
txt_count
.
repartition
(
1
).
write
.
format
(
"com.databricks.spark.csv"
).
option
(
"header"
,
"true"
).
save
(
output2
)
txt_count
.
repartition
(
1
)
.
write
.
format
(
"com.databricks.spark.csv"
)
.
option
(
"header"
,
"true"
).
save
(
output2
)
sc
.
stop
()
sc
.
stop
()
...
...
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