Showing posts with label Hadoop. Show all posts
Showing posts with label Hadoop. Show all posts
Sunday, October 6, 2013
Hadoop java.lang.ClassNotFoundException
Today I ran into some weird Hadoop error. It could not find my mapper class. It turns that I had defined HADOOP_CLASSPATH as only my current directory (where my classes were) and it lacked the generic Mapper class (org.apache.hadoop.mapreduce.Mapper), but instead of Hadoop reporting this later class was missing, it did so with my own class, which was clearly accessible.
So this blog entry is for those who run into this problem too, because there is no help from Stackoverflow regarding this issue.
This is the message you get:
java.lang.RuntimeException: java.lang.ClassNotFoundException: ProcessMapper
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:857)
at org.apache.hadoop.mapreduce.JobContext.getMapperClass(JobContext.java:199)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:718)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:364)
at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
Monday, July 29, 2013
Mathematical analysis of MapReduce
Everybody is talking about MapReduce. They talk a lot about it even though they barely know what it is. I guess they talk about it because of all Google hype.
To put it simply, MapReduce is
$$\left. F (f_y) \right|_{y=k}$$
where the function $f$ is the map, $ F $ is the reduce and $k$ is the key. In the special case the reduce just adds the values, the above becomes
$$\left. \int f_y (x) dx \right|_{y=k}$$
where $x$ are the values and $F$ is a linear functional (i.e., an element of the algebraic dual of the space where $f_y$, for all $y$ -the keys-, live.
The prominent example of computing the maximum temperatures from "Hadoop: The definitive guide" is the operation
$$\left. \| f_y \|_{\infty} \right|_{y=k}$$
It is "just" an abstraction of a basic operation found ubiquitously.
To put it simply, MapReduce is
$$\left. F (f_y) \right|_{y=k}$$
where the function $f$ is the map, $ F $ is the reduce and $k$ is the key. In the special case the reduce just adds the values, the above becomes
$$\left. \int f_y (x) dx \right|_{y=k}$$
where $x$ are the values and $F$ is a linear functional (i.e., an element of the algebraic dual of the space where $f_y$, for all $y$ -the keys-, live.
The prominent example of computing the maximum temperatures from "Hadoop: The definitive guide" is the operation
$$\left. \| f_y \|_{\infty} \right|_{y=k}$$
It is "just" an abstraction of a basic operation found ubiquitously.
Tuesday, April 30, 2013
Hadoop "Incompatible namespaceIDs" error
This is an error that I faced a while ago and I made a blog entry to be publised some day, so here it goes.
When setting up an installation and if not everything goes well, we might face the situation of datanode/namenode desyncrhonization. You should immediately refer to the logs. There you can see the following message:
I had not been able to repair the filesystem with any other way.
When setting up an installation and if not everything goes well, we might face the situation of datanode/namenode desyncrhonization. You should immediately refer to the logs. There you can see the following message:
... ERROR org.apache.hadoop.dfs.DataNode: java.io.IOException: Incompatible namespaceIDs in /app/hadoop/tmp/dfs/data: namenode namespaceID = 308967713; datanode namespaceID = 113030094 at org.apache.hadoop.dfs.DataStorage.doTransition(DataStorage.java:281) at org.apache.hadoop.dfs.DataStorage.recoverTransitionRead(DataStorage.java:121)
- Go to you namenode's directory (dfs.name.dir) and get the namespaceID value from current/VERSION.
- Go to your data node's storage directory (dfs.data.dir) and edit current/VERSION.
- Change the value to the datanode's value for the namenode's value.
I had not been able to repair the filesystem with any other way.
Subscribe to:
Posts (Atom)