yes you can install both the version on the same machine but make sure to install the configuration directories somewhere in the /etc/hadoop/conf_1.0.0 or /etc/hadoop/conf_2.0.x and setup HADOOP_CONF_DIR env variable to point to the correct installation.
Apart from it HDFS implementation is different for both the version so make a different directories for both the installation. :::::::::::::::::::::::::::::::::::::::: Raj K Singh http://in.linkedin.com/in/rajkrrsingh http://www.rajkrrsingh.blogspot.com Mobile Tel: +91 (0)9899821370 On Tue, May 6, 2014 at 9:15 AM, Stanley Shi <[email protected]> wrote: > Please be sure to use different HADOOP_CONF_DIR for the two version; and > also in the configuration, be sure to use different folder to store the > HDFS related files; > > Regards, > *Stanley Shi,* > > > > On Tue, May 6, 2014 at 8:41 AM, Shengjun Xin <[email protected]> wrote: > >> According to your description, I think it is still a configuration >> problem. Before you run hadoop command, did you check the hadoop version >> and hadoop environment variables ? Are they what you want? >> >> >> On Mon, May 5, 2014 at 11:42 PM, chandra kant < >> [email protected]> wrote: >> >>> I mean , I tried that already. In my .bash_profile , I set up >>> HADOOP_HOME, HADOOP_MAPRED_HOME, HADOOP_COMMON_HOME, HADOOP_HDFS_HOME, >>> HADOOP_YARN_HOME, HADOOP_CONF_DIR to point to hadoop2 directory. And >>> similarly I have HADOOP_PREFIX and HADOOP_HOME for hadoop-1. >>> So , i comment out hadoop-2 specific conf lines in .bash_profile while >>> running hadoop-1 and vice-versa. >>> And here the problem comes, that when trying to run hadoop-2 , it asks >>> to format the hadoop.tmp.dir set up by hadoop-1. >>> >>> Just for context- I have done fair amount of work on hadoop-1 and this >>> is my first attempt at hadoop-2. >>> >>> -- >>> Chandra >>> >>> >>> On Mon, May 5, 2014 at 11:31 AM, chandra kant < >>> [email protected]> wrote: >>> >>>> Thanks.. >>>> I set it accordingly.. >>>> >>>> >>>> On Monday, 5 May 2014, Shengjun Xin <[email protected]> wrote: >>>> >>>>> I think you need to set two different environment variables for >>>>> hadoop1 and hadoop2, such as HADOOP_HOME, HADOOP_CONF_DIR and before you >>>>> run hadoop command, you need to make sure the correct environment >>>>> variables >>>>> are enable. >>>>> >>>>> >>>>> On Mon, May 5, 2014 at 12:36 PM, chandra kant < >>>>> [email protected]> wrote: >>>>> >>>>>> >>>>>> Hi, >>>>>> Is it possible to install both hadoop1 and hadoop2 side by side on >>>>>> single node for development purpose so that I can choose any one of them >>>>>> by >>>>>> just shutting down one and starting another? >>>>>> I installed hadoop 1.2.1 and ran air successfully. >>>>>> Next, when I try to do "hdfs namenode - format " from hadoop2.2.0 , >>>>>> it tries to format the hadoop.tmp.dir set up by hadoop1.2.1 , which is >>>>>> clearly not desirable. I set up "dfs.namenode.name.dir" and >>>>>> "dfs.datanode.data.dir" in "hdfs-site.xml" to different >>>>>> locations. >>>>>> But again the same problem... >>>>>> Any suggestions.... >>>>>> >>>>>> -- >>>>>> Chandra >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Regards >>>>> Shengjun >>>>> >>>> >>> >> >> >> -- >> Regards >> Shengjun >> > >
