Commit 9777b48db5aa77ba1ce530eefff7db37c9426103
1 parent
911ca92ac2
Exists in
master
hbase url send
Showing 1 changed file with 5 additions and 4 deletions Side-by-side Diff
app/com/piki_ds/ver1/EditorScore.scala
View file @
9777b48
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | import com.piki_ds.utils.TempScoreSaveLoad |
14 | 14 | import com.piki_ds.utils.GeneralTransformers.{make_0to1_2Key,make_0to1} |
15 | 15 | import com.piki_ds.ver1.DashRelatedScore.previousDash |
16 | -import com.piki_ds.utils.hbase.HbaseInserter | |
16 | +//import com.piki_ds.utils.hbase.HbaseInserter | |
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Created by jungwon on 5/2/16. |
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 | val user_info: RDD[(String, String)] = user_tableGet.map(x=>(x.getAs[Long]("uid").toString, x.getAs[String]("name"))) |
68 | 68 | |
69 | 69 | // DB에서 FOLLOW table 파싱해오기, 팔로워 수 가져오기 |
70 | - val follow_info: RDD[(String, Long)] = followGetter(sQLContext, dateKey) | |
70 | + val follow_info: RDD[(String, Long)] = followGetter(sQLContext, dateKey,false) | |
71 | 71 | |
72 | 72 | val joinedFollowInfo: RDD[(String, (String, Long))] = user_info.leftOuterJoin(follow_info).map(x=>(x._1,(x._2._1,x._2._2.getOrElse(10L)))) |
73 | 73 | |
74 | 74 | |
... | ... | @@ -165,11 +165,12 @@ |
165 | 165 | val formatOutput: RDD[(String, Long)] = finalScore.map(x=>(x._1,(x._2*1000).toLong)) |
166 | 166 | |
167 | 167 | TempScoreSaveLoad.scoreSave(dateKey,"editor","",formatOutput,1) |
168 | - | |
168 | + scala.io.Source.fromURL(s"http://hbase.api.piki.work:9081/insert?table=editor_score&path=hdfs://pikinn/preprocess/timelineScore/editor/$dateKey") | |
169 | + /* | |
169 | 170 | val insertArray: Array[(String, String)] = finalScore.map(x=>(x._1.toString, (x._2*1000).toLong.toString)).collect |
170 | 171 | val test = new HbaseInserter("editor_score") |
171 | 172 | test.insert(insertArray) |
172 | - | |
173 | +*/ | |
173 | 174 | } |
174 | 175 | |
175 | 176 | } |