Comments (11)
I'd look into the first error first "syntax error near unexpected token". I'd love to know how this file name was created
/mnt/data/mapred/local/taskTracker/musigma/jobcache/job_201303201047_0032/attempt_201303201047_0032_m_000000_0/work/tmp/RtmpF1qXQp/file708455830e3d c(" new/output/alltags-v33_1/AtRisk/part-00001", " new/output/alltags-v33_1/AtRisk/part-00002")ʼ
After that rmr is probably processing an empty input and the recycling error is more than understandable.
Since it's a hadoop dfs -put
call that's failing, unless you deliberately called this external program, what is failing is a to.dfs
. Look at its first argument, kv.
from rmr2.
I had a to.dfs
in the code and I removed it and I got the same 0-length argument error, without the dfs -put
error. I understand what you're talking about when you say that rmr might be processing an empty input, but the 2 if conditions make sure that we don't reach the keyval
if the input to it is empty, and we are confused as to why this would happen.
from rmr2.
That is progress towards a simple, self contained example that would allow
me to reproduce the problem and fix it. It would be nice if we could fix
programs looking at the error logs without access to the source code, but
that's not how it works. I need to have the source code and I need to run
it. If it is long and proprietary you need it to narrow it down to
something I can understand within time and legal bounds. Selected snippets
are seldom helpful. The two conditions guarantee absolutely nothing as
#some processing is omitted. You need to move the conditions right before
the keyval call. You can also add an rmr.str statement as follows
kv = keyval("constant_key",processed_input_data")
rmr.str(kv)
kv
You can also apply other steps described here
https://github.com/RevolutionAnalytics/RHadoop/wiki/Debugging-rmr-programs
The ability to debug your own programs even if they run on top of Hadoop is
invaluable -- even if the bug is in the library, you'll be able to narrow
it down and report with a much higher degree of confidence.
Antonio
On Thu, Mar 21, 2013 at 1:23 PM, Prateek Kulkarni
[email protected]:
I had a to.dfs in the code and I removed it and I got the same 0-length
argument error, without the dfs -put error. I understand what you're
talking about when you say that rmr might be processing an empty input, but
the 2 if conditions make sure that we don't reach the keyval if the input
to it is empty, and we are confused as to why this would happen.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-15263076
.
from rmr2.
Hi,
So we tried adding the rmr.str(kv) as you had suggested,
The output if it was as follows
Length of Keys = 1
Length of Values = 3
Error in rmr.recycle(k, v) : Canʼt recycle 0-length argument
Calls: ... keyval.writer -> format -> recycle.keyval -> keyval -> rmr.recycle
Execution halted
I also checked the code for rmr.recycle and it did not make much sense for that error to crop up. Could you please help us out with this.
from rmr2.
That is not the output of rmr.str. It prints the stack where the call
happened and then the expression passed to it, then its value.
Antonio
On Fri, Mar 22, 2013 at 1:39 AM, mayankbansal89 [email protected]:
Hi,
So we tried adding the rmr.str(kv) as you had suggested,
The output if it was as follows
Length of Keys = 1
Length of Values = 3
Error in rmr.recycle(k, v) : Canʼt recycle 0-length argument
Calls: ... keyval.writer -> format -> recycle.keyval -> keyval ->
rmr.recycle
Execution haltedI also checked the code for rmr.recycle and it did not make much sense for
that error to crop up. Could you help us out with this.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-15286129
.
from rmr2.
It should be in the stderr logs ?
If yes, I can't find it. Please let me know if I am looking at the right place.
from rmr2.
You are correct. This is puzzling.
from rmr2.
Found it, sorry my bad and I had written rmr.str after the return(kv) statement.
It is actually zero, the earlier lengths were part of my cat statement and I was doing a cat of nrow of the object before placing them inside a keyval object.
The output that I get now is
Length of Keys = 1
Length of Values = 3
Dotted pair list of 6
$ : language (function() { load("./rmr-local-env5fe53103ae8e") ...
$ : language rmr2:::map.loop(map = map, keyval.reader = input.reader(), keyval.writer = if (is.null(reduce)) { output.writer() ...
$ : language as.keyval(map(keys(kv), values(kv)))
$ : language is.keyval(x)
$ : language map(keys(kv), values(kv))
$ : language rmr.str(kv)
kv
List of 2
$ key: chr "AR"
$ val:ʼdata.frameʼ: 0 obs. of 3 variables:
..$ i_dmid : num(0)
..$ prob : num(0)
..$ prob_ds: num(0)
Error in rmr.recycle(k, v) : Canʼt recycle 0-length argument
Calls: ... split.keyval -> recycle.keyval -> keyval -> rmr.recycle
The length of keys and length of values is part of my cat statements to the stderr log.
and below it is the rmr.str call.
from rmr2.
So you see that the value part of the key-value pair has 0 rows and the key
has 1 element. So that is currently not allowed. I can extend the semantics
to accept this case if we find a reasonably general definition, but right
now the acceptable cases are described
herehttps://github.com/RevolutionAnalytics/RHadoop/wiki/Keyval-types-and-combinations.
For now you can either change your program so that this doesn't happen,
thinking it's a bug, or just special case it like if(! nrow(values(kv)) == 0) kv
. Does this get you going?
On Fri, Mar 22, 2013 at 9:13 AM, mayankbansal89 [email protected]:
Found it, sorry my bad and I had written rmr.str after the return(kv)
statement.
It is actually zero, the earlier lengths were part of my cat statement and
I was doing a cat of nrow of the object before placing them inside a keyval
object.
The output that I get now is
Length of Keys = 1
Length of Values = 3
Dotted pair list of 6
$ : language (function() { load("./rmr-local-env5fe53103ae8e") ...
$ : language rmr2:::map.loop(map = map, keyval.reader = input.reader(),
keyval.writer = if (is.null(reduce)) { output.writer() ...
$ : language as.keyval(map(keys(kv), values(kv)))
$ : language is.keyval(x)
$ : language map(keys(kv), values(kv))
$ : language rmr.str(kv)
kv
List of 2
$ key: chr "AR"
$ val:ʼdata.frameʼ: 0 obs. of 3 variables:
..$ i_dmid : num(0)
..$ prob : num(0)
..$ prob_ds: num(0)Error in rmr.recycle(k, v) : Canʼt recycle 0-length argument
Calls: ... split.keyval -> recycle.keyval -> keyval -> rmr.recycleThe length of keys and length of values is part of my cat statements to
the stderr log.
and below it is the rmr.str call.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-15305784
.
from rmr2.
It looks like a coding issue only, which I was missing out on.
Sorry for using up your time on this.
Adding your if(!nrow(values(kv))) statement gets me going properly.
Thank you !! :)
from rmr2.
No problem!
from rmr2.
Related Issues (20)
- rmr.normalize.path wrong on "/"
- The system cannot find the path specified. HOT 9
- Hadoop job log4j:WARN Please initialize the log4j system properly HOT 5
- Mapreduce warning: namespace 'rmr2' is not available and has been replaced HOT 1
- Question with regards to lzo-ubuntu.sh
- HADOOP_CMD getting lost... HOT 2
- from.dfs() has Error in RStudio, but runs well in R console
- how can i find "kv.cmp = rmr2:::kv.cmp" in "pkg / tests / mapreduce.R"
- Changing number of mapper/ reducer HOT 2
- parsing XML douments in rhadoop
- what's the meaning of "in.memory.combine"
- rmr2 mapreduce does not produce any output HOT 6
- RMR2 Installaction question
- Recommended version of rmr2 for hadoop 2.7 and R 3.3.1
- Have some tutorials or references here about rmr2? HOT 1
- Reduce task fails with org.apache.hadoop.streaming.PipeMapRed: PipeMapRed failed! HOT 2
- rhadoop giving null key value output HOT 2
- path and to.dfs with R launched from two different directories
- from.dfs returns nothing
- output NULL of key and val
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rmr2.