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
(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 .
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)
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%)
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
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 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
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
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
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
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]
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
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
-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
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 (?-
15 matches
Mail list logo