Commit be899400e6f8ddc754fad030d811c10470e07e75

Authored by Joanne ago
1 parent 0ae4b22e94
Exists in master

insert with each uuid

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

app/com/piki_ds/ver1/InsertCidList.scala View file @ be89940
... ... @@ -41,9 +41,9 @@
41 41 val doi = "20160508"
42 42 val getMax30 = sc.objectFile[(Int, String)](s"/user/joanne/clols/$doi/$model")
43 43  
44   - getMax30.collect().groupBy(x=>x._1%5000).foreach(x=>{
  44 + getMax30.collect().foreach(x=>{
45 45 val tableName = s"uuid-cidlist_$model"
46   - val insertArray = x._2.map(a=>(a._1.toString,a._2))
  46 + val insertArray = Array((x._1.toString, x._2))
47 47 val test = new HbaseInserter(tableName)
48 48 test.insert(insertArray)
49 49 Thread.sleep(1000+x._1)