Attempting to call unbound fn: #'user/

2014-08-13 Thread sindhu hosamane
i get an error when i use this below function Attempting to call unbound function . Whats is wrong in below snippet? How do i fix it ? (defn convert-to-float [a] (try (if (not= a ) (read-string a)) (catch Exception e (do nil Thanks -- You received this message

How to return a value from catch block

2014-07-13 Thread sindhu hosamane
(defn convert-to-float [a] (try (if (not= a ) (read-string a)) (catch Exception e (str caught exception : (.getMessage e) After using the above convert-to-float function ,I get output like below when i have empty strings .

Invalid timestamp

2014-06-20 Thread sindhu hosamane
Hello, i am dealing with timestamp in my cascalog query . My code snippet looks like (def datefrom 2010:05:03 13:20:47) (def custom-formatter (f/formatter :MM:dd HH:mm:ss)) (def start-value (ct/to-long (f/parse custom-formatter datefrom))) (def dateto 2012:09:01 08:17:00)

Re: time expression of clojure produces different results on cascalog queries

2014-06-13 Thread sindhu hosamane
Thanks a ton for ur reply's Andy and Thomas . I used Criterium and got results like below : Evaluation count : 240 in 60 samples of 4 calls. Execution time mean : 265.359848 ms Execution time std-deviation : 25.544031 ms Execution time lower quantile : 229.851248 ms ( 2.5%)

time expression of clojure produces different results on cascalog queries

2014-06-11 Thread sindhu hosamane
I have set up a single node hadoop and running my cascalog queries on it . Good and i get results too . Now i am using clojure.core/time to evaluate how much time cascalog queries took for execution. Very Strange thing is: each time i run the cascalog query , i get different elapsed time

Re: time expression of clojure produces different results on cascalog queries

2014-06-11 Thread sindhu hosamane
Ya right .thanks for this info . If it is the case , how can one make performance tests ? I really have to make some performance comparisons on single node and multinode hadoop. Are there any other work arounds ? I want results to be atleast somewhat close to accurate. Or can u suggest me any

how to convert current time to format i need?

2014-04-29 Thread sindhu hosamane
How to convert the current date and time to the format i need ? for example i retrieve current time using (l/local-now) which outputs #DateTime 2014-04-29T11:16:02.420+02:00 i want the above output to be converted to format dd:MM: HH:mm:ss Should i define my own formatter like below

Re: how to convert current time to format i need?

2014-04-29 Thread sindhu hosamane
Ya i am using cji-time. Found a way . (def multi-parser (f/formatter (t/default-time-zone) dd:MM: HH:mm:ss -MM-dd HH:mm:ss)) (def currenttimestamp (f/unparse multi-parser (f/parse multi-parser (l/format-local-time ( l/local-now) :mysql))) ) (def custom-formatter

Re: Problem in loop (for loop) with Cascalog results

2014-04-26 Thread sindhu hosamane
Thanks a lot . i got it wrong in my cascalog query. Now it worked. -- 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

Re: clojure.lang.PersistentVector cannot be cast to java.lang.String

2014-04-24 Thread sindhu hosamane
I have the same error above clojure.lang.PersistentVector cannot be cast to java.lang.String . but when i use ByteArrayInputStream i have clojure.lang.PersistentList cannot be cast to java.lang.String . don't know how to fix it .I want to retrieve data between 2 timestamp values . i have some

Problem in loop (for loop) with Cascalog results

2014-04-23 Thread sindhu hosamane
Hello friends , i want to get results using cascalog queries .I need to get data between 2 timestamps datefrom and dateto as shown below in code . I have a problem in loop , where i cannot update the timestamp value . I am using clojure cli-time . (ns Recallnack.core (:use [cascalog.api]

Re: How to store the results in a vector ?

2013-12-05 Thread sindhu hosamane
Hi James , Yes . That works perfectly.. Thanks a lot.. Sorry for my late reply. Did not recognise that was a whitespace issue..!! On Sunday, November 17, 2013 10:05:50 PM UTC+1, sindhu hosamane wrote: Hello friends , (?- (stdout)[?category]((select-fields info-tap [?category]) ?category

Re: How to store the results in a vector ?

2013-12-05 Thread sindhu hosamane
Hi James , Yes . That works perfectly.. Thanks a lot.. Sorry for my late reply. Did not recognise that was a whitespace issue..!! Best Regards, Sindhu -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: How to store the results in a vector ?

2013-11-27 Thread sindhu hosamane
-fields info-tap [?category])?category ))] (if (= x Warning) println x ))) Please help .I am a newbie in clojure . On Sunday, November 17, 2013 10:05:50 PM UTC+1, sindhu hosamane wrote: Hello friends , (?- (stdout

How to store the results in a vector ?

2013-11-17 Thread sindhu hosamane
Hello friends , (?- (stdout)[?category]((select-fields info-tap [?category]) ?category)) Above is my Cascalog query which produces result like : Warning Start inhibit Stop Inhibit Warning Halt how to store the above result in a vector ? my way is (let [x (?-