Re: Implementing top() using treeReduce()

2015-06-17 Thread DB Tsai
t;> >>> >>> Sincerely, >>> >>> DB Tsai >>> -- >>> Blog: https://www.dbtsai.com >>> PGP Key ID: 0xAF08DF8D >>> >>> On Tue, Jun 9, 2015 at 10:09 AM, raggy wrote: >

Re: Implementing top() using treeReduce()

2015-06-17 Thread Raghav Shankar
t; PGP Key ID: 0xAF08DF8D >> >> On Tue, Jun 9, 2015 at 10:09 AM, raggy wrote: >>> >>> I am trying to implement top-k in scala within apache spark. I am aware >>> that >>> spark has a top action. But, top() uses reduce(). Instead, I wou

Re: Implementing top() using treeReduce()

2015-06-17 Thread DB Tsai
which are >> used in the top() action within my Spark application. >> >> val queue = new BoundedPriorityQueue[T](num)(ord.reverse) >> queue ++= util.collection.Utils.takeOrdered(items, num)(ord) >> >> How can I

Re: Implementing top() using treeReduce()

2015-06-17 Thread Raghav Shankar
> > The main issue I have is that I cannot use these 2 lines of code which are > used in the top() action within my Spark application. > > val queue = new BoundedPriorityQueue[T](num)(ord.reverse) > queue ++= util.collection.Utils.takeOrdered(items, num)(ord) > > How can

Re: Implementing top() using treeReduce()

2015-06-09 Thread DB Tsai
++= util.collection.Utils.takeOrdered(items, num)(ord) > > How can I go about implementing top() using treeReduce()? > > > > -- > View this message in context: > http://apache-spark-user-list.1001560.n3.nabble.com/Implementing-top-using-treeReduce-tp23227.h

Implementing top() using treeReduce()

2015-06-09 Thread raggy
of code which are used in the top() action within my Spark application. val queue = new BoundedPriorityQueue[T](num)(ord.reverse) queue ++= util.collection.Utils.takeOrdered(items, num)(ord) How can I go about implementing top() using treeReduce()? -- View this message in context: http://apache