Please help

77 views
Skip to first unread message

Edwin Alvarez

unread,
May 21, 2012, 11:07:39 PM5/21/12
to cascalog-user
scenario, I'm using emac, I create a test project to test out
cascalog. I executed this steps

lein new TstCascalog
Open the project and paste
:dependencies [[cascalog "1.8.7"]]
:dev-dependencies [[org.apache.hadoop/hadoop-core "0.20.2-dev"]]
lein deps

now i go to emacs and I type (use 'cascalog.playground) (bootstrap) at
this point no issue, I can type age, person or gender and the
information is displayed.

but if I try
(?<- (stdout) [?person] (age ?person 25))
this returns nil

i try this
(<- [?word]
(sentence ?sentence)
(split ?sentence :> ?word)
(c/count ?count)
(> ?count 5))

but i returns
{:type :generator, :id "98fde48b-bc57-4709-9f8f-56ec7de0b308", :join-
set-var nil, :ground? true, :sourcemap {"2f9d00fe-8563-4628-ae8b-
f476549483a6" #<MemorySourceTap cascalog.MemorySourceTap@3e0>}, :pipe
#<Each Each(27fde871-8db5-4e21-b23c-a6c0fa5b38ec)
[Identity[decl:ARGS]]>, :outfields ["?word"], :trapmap {}}

please help

Aaron Steele

unread,
May 22, 2012, 12:15:10 AM5/22/12
to cascal...@googlegroups.com
Hey Edwin,

Quick sanity check. Try this:

cd ~
git clone https://github.com/nathanmarz/cascalog.git
cd cascalog
git checkout develop
lein upgrade
lein repl
user=> (use 'cascalog.playground) (bootstrap)
user=> (?<- (stdout) [?person] (age ?person 25))

You should see this output:

RESULTS
-----------------------
nil
12/05/21 21:11:13 INFO hadoop.Hadoop18TapUtil: deleting temp path
/tmp/temp807571186323151685894706203306963/_temporary
12/05/21 21:11:13 INFO mapred.FileInputFormat: Total input paths to process : 1
david
emily
-----------------------

Success?

Cheers,
Aaron

Sam Ritchie

unread,
May 22, 2012, 12:24:29 PM5/22/12
to cascal...@googlegroups.com
Hey Edwin, if you do (bootstrap-emacs) you'll see output in your swank buffer; otherwise the output's routed to the shell you used to start swank. Check the terminal and you should be all set!

-- 
Sam Ritchie
Sent with Sparrow

Edwin Alvarez

unread,
May 22, 2012, 1:28:45 PM5/22/12
to cascal...@googlegroups.com
using the (bootstrap-emacs), returns the result, but it also adds a lot of logging.

do you know how can I turn it off?

INFO - using default application jar, may cause class not found exceptions on the cluster
INFO - using application jar: /home/mc8xx/course/TstCascalog/lib/cascading-core-1.2.4.jar
INFO - [] starting
INFO - []  source: cascalog.MemorySourceTap@3e0
INFO - []  sink: StdoutTap["SequenceFile[[UNKNOWN]->[ALL]]"]["/tmp/temp665342095304387647320235609731821"]"]
INFO - []  parallel execution is enabled: false
INFO - []  starting jobs: 1
INFO - []  allocating threads: 1
INFO - [] starting step: (1/1) ...nceFile[[UNKNOWN]->[ALL]]"]["/tmp/temp665342095304387647320235609731821"]"]
INFO - Cannot initialize JVM Metrics with processName=JobTracker, sessionId= - already initialized
INFO - numReduceTasks: 1
INFO - io.sort.mb = 1
INFO - data buffer = 796928/996160
INFO - record buffer = 2620/3276
INFO - Starting flush of map output
INFO - Finished spill 0
INFO - Task:attempt_local_0029_m_000000_0 is done. And is in the process of commiting
INFO -
INFO - Task 'attempt_local_0029_m_000000_0' done.
INFO -
INFO - Merging 1 sorted segments
INFO - Down to the last merge-pass, with 1 segments left of total size: 18 bytes
INFO -
INFO - Task:attempt_local_0029_r_000000_0 is done. And is in the process of commiting
INFO -
INFO - Task attempt_local_0029_r_000000_0 is allowed to commit now
INFO - Saved output of task 'attempt_local_0029_r_000000_0' to file:/tmp/temp665342095304387647320235609731821
INFO - reduce > reduce
INFO - Task 'attempt_local_0029_r_000000_0' done.
INFO - deleting temp path /tmp/temp665342095304387647320235609731821/_temporary
INFO - Total input paths to process : 1
--
Edwin Alvarez Mora
Costa Rica

Cell:  88-82-46-31
e-mail:  edwin....@gmail.com 
_______________________________________________________________
The only people who never fail are those who never try. (Ilka Chase)


Mayank Agarwal

unread,
May 22, 2012, 1:33:36 PM5/22/12
to cascal...@googlegroups.com, cascal...@googlegroups.com
Hi Edwin,

You can also execute the query in memory.

For ex:

(??- query)

This will give you the output as a collection.

Mayank



Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages