Commit e34ddac2d104bb5c1ff524218165abe648a9dc8a

Authored by Joanne ago
1 parent 0e839bb26a
Exists in master

tempor

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

app/com/piki_ds/ver1/QualityScore.scala View file @ e34ddac
... ... @@ -66,7 +66,7 @@
66 66  
67 67 def main(args: Array[String]) {
68 68 val nowTS: Long = System.currentTimeMillis
69   - val doi = getDateKey(nowTS)
  69 + /*val doi = getDateKey(nowTS)
70 70  
71 71 val content: RDD[(Int, Int)] = scoreLoad(sc,doi,"content","all")
72 72 val comment: RDD[(Int, Int)] = scoreLoad(sc,doi,"comment","").groupByKey().map(x=>(x._1,0))
... ... @@ -76,6 +76,8 @@
76 76  
77 77 val finalScore: RDD[(Int, Long)] = combineScores(content,comment,editor,param).map(x=>(x._1.toInt,x._2.toLong)).filter(_._1 != 0)
78 78 scoreSave(doi,"quality","",finalScore.map(x=>(x._1.toString,x._2)),1)
  79 + */
  80 + val finalScore= scoreLoad(sc,"20160516","content","all")
79 81 val insertArray = finalScore.map(x=>(x._1.toString, x._2.toString)).collect()
80 82 val test = new HbaseInserter("cid_quality")
81 83 test.insert(insertArray)