You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-dev@hadoop.apache.org by Samaneh Shokuhi <sa...@gmail.com> on 2013/04/28 20:45:45 UTC
problem in switching to branch-2
Hi All,
i ve got a clone of hadoop and tried to switch to branch-2 but ,it is not
working ,while switching to other branches like branch-1.2 is possible. Any
idea why cant switch to branch-2 ?
That’s what i ve done :
$ git clone git://github.com/apache/hadoop-common.git hadoop-1
$ cd hadoop-1
$ git checkout remotes/origin/branch-2
Samaneh
Re: problem in switching to branch-2
Posted by Samaneh Shokuhi <sa...@gmail.com>.
Hi Vinod ,
I want to run WordCount example with branch-2 and what i need to do that is
hadoop-core-x.x.x-SNAPSHOT .
in branch-1 ,we have build.xml which i can generate hadoop-core jar file by
executing "ant jar" ,but here in branch-2 i don’t know how to generate
hadoop-core jar file. And also i may need to modify hadoop source code and
test it with WordCount example .
Could you please tell me how to generate hadoop-core jar file in branch-2
,it was straight forward in branch-1 by executing ant on build.xml .
Samaneh
On Mon, Apr 29, 2013 at 7:11 PM, Vinod Kumar Vavilapalli <
vinodkv@hortonworks.com> wrote:
>
> branch-1.2 has lib/conf/logs etc.
>
> branch-2's directory structure and the content is similar to trunk, so you
> may already be seeing correct code.
>
> See pom.xml and look for the first occurrence of <version>, you should see
> 3.0.0-SNAPSHOT for trunk and 2.0.5-SNAPSHOT for branch-2.
>
> Thanks,
> +Vinod
>
> On Apr 29, 2013, at 3:55 AM, Samaneh Shokuhi wrote:
>
> > Hi Vinod,
> > I did what you said but the thing is my working directory still contains
> > trunk branch !! what i see for example as branch-1.2 is different from
> > branch-2 . I switch to branch-1.2 like "git checkout
> > remotes/origin/branch-1.2" and it contains for example build ,bin ,conf,
> > lib, source ,logs directories .. but when i switched to branch-2 it
> still
> > shows trunk . I tried with what you suggested "git checkout -b branch-2
> > origin/branch-2" .a new branch called branch-2 is added but still
> contains
> > trunk !!!!
> >
> > I am wondering why "git checkout remotes/origin/branch-1.2" switched to
> > branch-1.2 but "git checkout remotes/origin/branch-2" not switching to
> > branch-2 !!!!
> >
> > If you try with "git checkout -b branch-2 origin/branch-2" , do you see
> > branch-2 contents in your working directory ?
> >
> > Samaneh
> >
> >
> > On Mon, Apr 29, 2013 at 2:10 AM, Vinod Kumar Vavilapalli <
> > vinodkv@hortonworks.com> wrote:
> >
> >>
> >> Right, you have to do "git checkout -b branch-2 origin/branch-2". You
> get
> >> the trunk branch by default, for all other remote branches, you have to
> >> create local branches like that.
> >>
> >> HTH
> >>
> >> Thanks,
> >> +Vinod Kumar Vavilapalli
> >> Hortonworks Inc.
> >> http://hortonworks.com/
> >>
> >>
> >> On Apr 28, 2013, at 12:42 PM, Samaneh Shokuhi wrote:
> >>
> >>> Hi Vinod,
> >>> i tried with the path you sent but no success .I mean is it not really
> >>> switched to branch-2 ,and calling the "git branch -a" displays "no
> >> branch"
> >>> .Working directory still contains trunk not branch-2 contents. what i
> >> get
> >>> in console is :
> >>>
> >>> You are in 'detached HEAD' state. You can look around, make
> experimental
> >>> changes and commit them, and you can discard any commits you make in
> this
> >>> state without impacting any branches by performing another checkout.
> >>>
> >>> If you want to create a new branch to retain commits you create, you
> may
> >>> do so (now or later) by using -b with the checkout command again.
> >> Example:
> >>>
> >>> git checkout -b new_branch_name
> >>>
> >>> HEAD is now at 72713e0... HDFS-4748. Merge r1476587 from trunk.
> >>>
> >>>
> >>>
> >>> On Sun, Apr 28, 2013 at 9:20 PM, Vinod Kumar Vavilapalli <
> >>> vinodkv@hortonworks.com> wrote:
> >>>
> >>>>
> >>>> Not sure about how updated the repo at github is, I use git://
> >>>> git.apache.org/hadoop-common.git
> >>>>
> >>>> Also what do you mean by branch switch is not working?
> >>>>
> >>>> Thanks,
> >>>> +Vinod
> >>>>
> >>>> On Apr 28, 2013, at 11:45 AM, Samaneh Shokuhi wrote:
> >>>>
> >>>>> Hi All,
> >>>>> i ve got a clone of hadoop and tried to switch to branch-2 but ,it is
> >> not
> >>>>> working ,while switching to other branches like branch-1.2 is
> possible.
> >>>> Any
> >>>>> idea why cant switch to branch-2 ?
> >>>>>
> >>>>> That’s what i ve done :
> >>>>>
> >>>>> $ git clone git://github.com/apache/hadoop-common.git hadoop-1
> >>>>> $ cd hadoop-1
> >>>>> $ git checkout remotes/origin/branch-2
> >>>>>
> >>>>>
> >>>>> Samaneh
> >>>>
> >>>>
> >>
> >>
>
>
Re: problem in switching to branch-2
Posted by Vinod Kumar Vavilapalli <vi...@hortonworks.com>.
branch-1.2 has lib/conf/logs etc.
branch-2's directory structure and the content is similar to trunk, so you may already be seeing correct code.
See pom.xml and look for the first occurrence of <version>, you should see 3.0.0-SNAPSHOT for trunk and 2.0.5-SNAPSHOT for branch-2.
Thanks,
+Vinod
On Apr 29, 2013, at 3:55 AM, Samaneh Shokuhi wrote:
> Hi Vinod,
> I did what you said but the thing is my working directory still contains
> trunk branch !! what i see for example as branch-1.2 is different from
> branch-2 . I switch to branch-1.2 like "git checkout
> remotes/origin/branch-1.2" and it contains for example build ,bin ,conf,
> lib, source ,logs directories .. but when i switched to branch-2 it still
> shows trunk . I tried with what you suggested "git checkout -b branch-2
> origin/branch-2" .a new branch called branch-2 is added but still contains
> trunk !!!!
>
> I am wondering why "git checkout remotes/origin/branch-1.2" switched to
> branch-1.2 but "git checkout remotes/origin/branch-2" not switching to
> branch-2 !!!!
>
> If you try with "git checkout -b branch-2 origin/branch-2" , do you see
> branch-2 contents in your working directory ?
>
> Samaneh
>
>
> On Mon, Apr 29, 2013 at 2:10 AM, Vinod Kumar Vavilapalli <
> vinodkv@hortonworks.com> wrote:
>
>>
>> Right, you have to do "git checkout -b branch-2 origin/branch-2". You get
>> the trunk branch by default, for all other remote branches, you have to
>> create local branches like that.
>>
>> HTH
>>
>> Thanks,
>> +Vinod Kumar Vavilapalli
>> Hortonworks Inc.
>> http://hortonworks.com/
>>
>>
>> On Apr 28, 2013, at 12:42 PM, Samaneh Shokuhi wrote:
>>
>>> Hi Vinod,
>>> i tried with the path you sent but no success .I mean is it not really
>>> switched to branch-2 ,and calling the "git branch -a" displays "no
>> branch"
>>> .Working directory still contains trunk not branch-2 contents. what i
>> get
>>> in console is :
>>>
>>> You are in 'detached HEAD' state. You can look around, make experimental
>>> changes and commit them, and you can discard any commits you make in this
>>> state without impacting any branches by performing another checkout.
>>>
>>> If you want to create a new branch to retain commits you create, you may
>>> do so (now or later) by using -b with the checkout command again.
>> Example:
>>>
>>> git checkout -b new_branch_name
>>>
>>> HEAD is now at 72713e0... HDFS-4748. Merge r1476587 from trunk.
>>>
>>>
>>>
>>> On Sun, Apr 28, 2013 at 9:20 PM, Vinod Kumar Vavilapalli <
>>> vinodkv@hortonworks.com> wrote:
>>>
>>>>
>>>> Not sure about how updated the repo at github is, I use git://
>>>> git.apache.org/hadoop-common.git
>>>>
>>>> Also what do you mean by branch switch is not working?
>>>>
>>>> Thanks,
>>>> +Vinod
>>>>
>>>> On Apr 28, 2013, at 11:45 AM, Samaneh Shokuhi wrote:
>>>>
>>>>> Hi All,
>>>>> i ve got a clone of hadoop and tried to switch to branch-2 but ,it is
>> not
>>>>> working ,while switching to other branches like branch-1.2 is possible.
>>>> Any
>>>>> idea why cant switch to branch-2 ?
>>>>>
>>>>> That’s what i ve done :
>>>>>
>>>>> $ git clone git://github.com/apache/hadoop-common.git hadoop-1
>>>>> $ cd hadoop-1
>>>>> $ git checkout remotes/origin/branch-2
>>>>>
>>>>>
>>>>> Samaneh
>>>>
>>>>
>>
>>
Re: problem in switching to branch-2
Posted by Samaneh Shokuhi <sa...@gmail.com>.
Hi Vinod,
I did what you said but the thing is my working directory still contains
trunk branch !! what i see for example as branch-1.2 is different from
branch-2 . I switch to branch-1.2 like "git checkout
remotes/origin/branch-1.2" and it contains for example build ,bin ,conf,
lib, source ,logs directories .. but when i switched to branch-2 it still
shows trunk . I tried with what you suggested "git checkout -b branch-2
origin/branch-2" .a new branch called branch-2 is added but still contains
trunk !!!!
I am wondering why "git checkout remotes/origin/branch-1.2" switched to
branch-1.2 but "git checkout remotes/origin/branch-2" not switching to
branch-2 !!!!
If you try with "git checkout -b branch-2 origin/branch-2" , do you see
branch-2 contents in your working directory ?
Samaneh
On Mon, Apr 29, 2013 at 2:10 AM, Vinod Kumar Vavilapalli <
vinodkv@hortonworks.com> wrote:
>
> Right, you have to do "git checkout -b branch-2 origin/branch-2". You get
> the trunk branch by default, for all other remote branches, you have to
> create local branches like that.
>
> HTH
>
> Thanks,
> +Vinod Kumar Vavilapalli
> Hortonworks Inc.
> http://hortonworks.com/
>
>
> On Apr 28, 2013, at 12:42 PM, Samaneh Shokuhi wrote:
>
> > Hi Vinod,
> > i tried with the path you sent but no success .I mean is it not really
> > switched to branch-2 ,and calling the "git branch -a" displays "no
> branch"
> > .Working directory still contains trunk not branch-2 contents. what i
> get
> > in console is :
> >
> > You are in 'detached HEAD' state. You can look around, make experimental
> > changes and commit them, and you can discard any commits you make in this
> > state without impacting any branches by performing another checkout.
> >
> > If you want to create a new branch to retain commits you create, you may
> > do so (now or later) by using -b with the checkout command again.
> Example:
> >
> > git checkout -b new_branch_name
> >
> > HEAD is now at 72713e0... HDFS-4748. Merge r1476587 from trunk.
> >
> >
> >
> > On Sun, Apr 28, 2013 at 9:20 PM, Vinod Kumar Vavilapalli <
> > vinodkv@hortonworks.com> wrote:
> >
> >>
> >> Not sure about how updated the repo at github is, I use git://
> >> git.apache.org/hadoop-common.git
> >>
> >> Also what do you mean by branch switch is not working?
> >>
> >> Thanks,
> >> +Vinod
> >>
> >> On Apr 28, 2013, at 11:45 AM, Samaneh Shokuhi wrote:
> >>
> >>> Hi All,
> >>> i ve got a clone of hadoop and tried to switch to branch-2 but ,it is
> not
> >>> working ,while switching to other branches like branch-1.2 is possible.
> >> Any
> >>> idea why cant switch to branch-2 ?
> >>>
> >>> That’s what i ve done :
> >>>
> >>> $ git clone git://github.com/apache/hadoop-common.git hadoop-1
> >>> $ cd hadoop-1
> >>> $ git checkout remotes/origin/branch-2
> >>>
> >>>
> >>> Samaneh
> >>
> >>
>
>
Re: problem in switching to branch-2
Posted by Vinod Kumar Vavilapalli <vi...@hortonworks.com>.
Right, you have to do "git checkout -b branch-2 origin/branch-2". You get the trunk branch by default, for all other remote branches, you have to create local branches like that.
HTH
Thanks,
+Vinod Kumar Vavilapalli
Hortonworks Inc.
http://hortonworks.com/
On Apr 28, 2013, at 12:42 PM, Samaneh Shokuhi wrote:
> Hi Vinod,
> i tried with the path you sent but no success .I mean is it not really
> switched to branch-2 ,and calling the "git branch -a" displays "no branch"
> .Working directory still contains trunk not branch-2 contents. what i get
> in console is :
>
> You are in 'detached HEAD' state. You can look around, make experimental
> changes and commit them, and you can discard any commits you make in this
> state without impacting any branches by performing another checkout.
>
> If you want to create a new branch to retain commits you create, you may
> do so (now or later) by using -b with the checkout command again. Example:
>
> git checkout -b new_branch_name
>
> HEAD is now at 72713e0... HDFS-4748. Merge r1476587 from trunk.
>
>
>
> On Sun, Apr 28, 2013 at 9:20 PM, Vinod Kumar Vavilapalli <
> vinodkv@hortonworks.com> wrote:
>
>>
>> Not sure about how updated the repo at github is, I use git://
>> git.apache.org/hadoop-common.git
>>
>> Also what do you mean by branch switch is not working?
>>
>> Thanks,
>> +Vinod
>>
>> On Apr 28, 2013, at 11:45 AM, Samaneh Shokuhi wrote:
>>
>>> Hi All,
>>> i ve got a clone of hadoop and tried to switch to branch-2 but ,it is not
>>> working ,while switching to other branches like branch-1.2 is possible.
>> Any
>>> idea why cant switch to branch-2 ?
>>>
>>> That’s what i ve done :
>>>
>>> $ git clone git://github.com/apache/hadoop-common.git hadoop-1
>>> $ cd hadoop-1
>>> $ git checkout remotes/origin/branch-2
>>>
>>>
>>> Samaneh
>>
>>
Re: problem in switching to branch-2
Posted by Samaneh Shokuhi <sa...@gmail.com>.
Hi Vinod,
i tried with the path you sent but no success .I mean is it not really
switched to branch-2 ,and calling the "git branch -a" displays "no branch"
.Working directory still contains trunk not branch-2 contents. what i get
in console is :
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at 72713e0... HDFS-4748. Merge r1476587 from trunk.
On Sun, Apr 28, 2013 at 9:20 PM, Vinod Kumar Vavilapalli <
vinodkv@hortonworks.com> wrote:
>
> Not sure about how updated the repo at github is, I use git://
> git.apache.org/hadoop-common.git
>
> Also what do you mean by branch switch is not working?
>
> Thanks,
> +Vinod
>
> On Apr 28, 2013, at 11:45 AM, Samaneh Shokuhi wrote:
>
> > Hi All,
> > i ve got a clone of hadoop and tried to switch to branch-2 but ,it is not
> > working ,while switching to other branches like branch-1.2 is possible.
> Any
> > idea why cant switch to branch-2 ?
> >
> > That’s what i ve done :
> >
> > $ git clone git://github.com/apache/hadoop-common.git hadoop-1
> > $ cd hadoop-1
> > $ git checkout remotes/origin/branch-2
> >
> >
> > Samaneh
>
>
Re: problem in switching to branch-2
Posted by Vinod Kumar Vavilapalli <vi...@hortonworks.com>.
Not sure about how updated the repo at github is, I use git://git.apache.org/hadoop-common.git
Also what do you mean by branch switch is not working?
Thanks,
+Vinod
On Apr 28, 2013, at 11:45 AM, Samaneh Shokuhi wrote:
> Hi All,
> i ve got a clone of hadoop and tried to switch to branch-2 but ,it is not
> working ,while switching to other branches like branch-1.2 is possible. Any
> idea why cant switch to branch-2 ?
>
> That’s what i ve done :
>
> $ git clone git://github.com/apache/hadoop-common.git hadoop-1
> $ cd hadoop-1
> $ git checkout remotes/origin/branch-2
>
>
> Samaneh