Re: [ANN] Sparkling, a Clojure-API to Apache Spark.

2015-05-18 Thread Tilak Thapa
Oh yes. Thanks Dmitriy.

On Monday, May 18, 2015 at 4:13:09 AM UTC-5, Dmitriy Morozov wrote:


 Hi Tilak!

 You are trying to call groupByKey on instance of JavaRDD which doesn't 
 have this method. You need JavaPairRDD which you can create with 
 spark/map-to-pair.

 Good luck!

 On Wednesday, January 7, 2015 at 2:23:42 PM UTC+2, chris_betz wrote:

 Hi,


 we just released Sparkling (https://gorillalabs.github.io/sparkling/), 
 our take on an API to Apache Spark.



 With an eye on speed for very large amounts of data we improved clj-spark 
 and flambo to get us the speed we need for our production environment.


 See https://gorillalabs.github.io/sparkling/articles/getting_started.html 
 for a quickstart or dive directly into our playground project by 
 git clone 
 https://github.com/gorillalabs/sparkling-getting-started.git



 Happy hacking

 Chris
 (@gorillalabs_de https://twitter.com/gorillalabs_de)



-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Sparkling, a Clojure-API to Apache Spark.

2015-05-17 Thread Tilak Thapa
Hi,
could anybody please help me to figure out following error with 
group-by-key fn?

(defn sorted-tuple [p f]
  (if ( (.compareTo p f) 0)
(spark/tuple p f)
(spark/tuple f p)))

(defn tuples-list [[p  frens]]
  (map #(spark/tuple (sorted-tuple p %) frens) frens))


(- (spark/parallelize sc [100 200 300 400 500 600, 200 100 300 400, 300 
100 200 400 500, 400 100 200 300, 500 100 300, 600 100])
 (spark/map #(split-at-space %))
 (spark/flat-map #(tuples-list %))
 (spark/group-by-key))


CompilerException java.lang.IllegalArgumentException: No matching field found: 
groupByKey for class org.apache.spark.api.java.JavaRDD, compiling:


I'm trying hard to figure out but could not. It works if I replace 
'group-by-key' with 

(spark/group-by #(._1 %))

but that's not what I want.


Anybody please?



thanks

-tilak



On Wednesday, January 7, 2015 at 6:23:42 AM UTC-6, chris_betz wrote:

 Hi,


 we just released Sparkling (https://gorillalabs.github.io/sparkling/), 
 our take on an API to Apache Spark.



 With an eye on speed for very large amounts of data we improved clj-spark 
 and flambo to get us the speed we need for our production environment.


 See https://gorillalabs.github.io/sparkling/articles/getting_started.html 
 for a quickstart or dive directly into our playground project by 
 git clone https://github.com/gorillalabs/sparkling-getting-started.git



 Happy hacking

 Chris
 (@gorillalabs_de https://twitter.com/gorillalabs_de)


-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Reactive Programming in Clojure

2013-11-10 Thread Tilak Thapa
+1

On Sunday, November 10, 2013 3:13:17 AM UTC+5:45, Marco Manzi wrote:

 Hi all, I'm a young clojure developer. I work as Java developer, but I've 
 falled in love with this fantastic language and I would like to help in 
 some way.
 Actually I'm following Principles of Reactive 
 Programminghttps://www.coursera.org/course/reactive on 
 Coursera. It is all written in Scala, but I'm not that proficent on Scala, 
 so I'm following it in Clojure, I'm writing some posts on how I'll 
 following it.
 If anyone has the same need can follow me at 
 http://reactiveclojure.blogspot.it, there is also a github repository 
 where I'm posting the code to make the same assigment as in the coursera. 
 I appreciate any hint you can give.
 See you :)


-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Any interest in Compojure/Ring screencasts?

2013-10-31 Thread Tilak Thapa
+1, @James, i'm in.

On Wednesday, October 30, 2013 4:32:18 AM UTC+5:45, Russell Whitaker wrote:

 I, for one, would happily pay (my employer's) money for such a thing. 

 R 

 On Tue, Oct 29, 2013 at 3:39 PM, James Reeves 
 ja...@booleanknot.comjavascript: 
 wrote: 
  I'm considering putting together a screencast, or a series of 
 screencasts, 
  based on my Functional Web Architecture talk. The base presentation 
 would be 
  improved, and I'd probably wind up going into more detail on certain 
 topics. 
  I'll probably charge a small fee (perhaps $10 or so) to cover costs. 
  
  Would there be any interest in this? 
  
  - James 

 -- 
 Russell Whitaker 
 http://twitter.com/OrthoNormalRuss 


-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


filter with a sequence of maps not working

2013-08-07 Thread Tilak Thapa
I'm new to clojure. I've return an utility function to filter a sequence of 
map by some key but it's not working. Here is the sample code - 

(def data [{:id 1 :b 2}
{:id 3 :b 4}
{:id 5 :b 6}
{:id 7 :b 8}])
In real app this is a sequence of maps read from csv file.

(defn get-data 
  [ attrs]
  (let [grps data]
(if (empty? attrs)
  grps
  (map #(select-keys % attrs) grps

(filter #(= (% :id) 7) (get-data :id :b))

Why above expression works but same expression wrapped as function (below) 
does not work?

(defn get-data-by-id [id  attrs]
  always pass :id attribute
(filter #(= (:id %) id) (get-data attrs)))

(get-data-by-id 3) ;; returns () this is probably ok (?) since :id key is 
not available
(get-data-by-id 3 :id :b) ;; returns () but why this does not work?

Pleas help me to figure this out.

thanks  cheers!
-tilak



-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.