> On March 5, 2013, 8:43 a.m., Benjamin Hindman wrote:
> > hadoop/TUTORIAL.sh, line 39
> > <https://reviews.apache.org/r/9174/diff/9/?file=264055#file264055line39>
> >
> >     What is 'cmd'?

ty


> On March 5, 2013, 8:43 a.m., Benjamin Hindman wrote:
> > hadoop/TUTORIAL.sh, line 31
> > <https://reviews.apache.org/r/9174/diff/9/?file=264055#file264055line31>
> >
> >     Okay, the original semantics are "kind of" perserved here. In many 
> > cases we still ask "Hit enter to continue." we just don't show exactly what 
> > we'll be running until AFTER that person hits enter. The weird thing about 
> > that is that once you hit enter some stuff might fly by on the screen and 
> > it's possible you never actually see the command(s) that got ran to get 
> > that output. You might feel compelled to scroll up and try and figure out 
> > what the commands actually were but you'll probably just feel overwhelmed. 
> > As a teaching aid I'd prefer if we showed the commands BEFORE the user hits 
> > enter. I don't see any issues with doing this technically, so rather than 
> > push back again I'll just suggest some code here:
> >     
> >     ===========================================
> >     
> >     # A helper function to run one or more commands, aborting the tutorial
> >     # if any of the commands fail.
> >     function run() {
> >       for command in "${@}"; do
> >         eval ${command}
> >     
> >         if test "${?}" != 0; then
> >           cat <<__EOF__                                                     
> >                                                                             
> >         
> >                                                                             
> >                                                                             
> >         
> >     ${RED}Oh no! We failed to run '${command}'. If you need help try 
> > emailing:                                                                   
> >                
> >                                                                             
> >                                                                             
> >         
> >        [email protected]                                       
> >                                                                             
> >         
> >                                                                             
> >                                                                             
> >         
> >     __EOF__                                                                 
> >                                                                             
> >         
> >           exit 1
> >         fi
> >       done
> >     }
> >     
> >     summary="" # Enables users to reproduce the steps/commands of the 
> > tutorial.
> >     
> >     # A helper function to perform a step of the tutorial (i.e., one or 
> > more 
> >     # commands). Prints the command(s) out before they are run and waits
> >     # for the user to confirm. In addition, the commands are appended to
> >     # the summary.
> >     function perform() {
> >       echo
> >       for command in "${@}"; do
> >         echo "  $ ${command}"
> >       done
> >       echo
> >     
> >       read -e -p "${BRIGHT}Hit enter to continue.${NORMAL} "
> >       echo
> >     
> >       for command in "${@}"; do
> >         run "${command}"
> >     
> >         # Append to the summary.                                            
> >                                                                             
> >         
> >         summary="${summary}                                                 
> >                                                                             
> >         
> >     $ ${command}"
> >       done
> >     }
> >     
> >     perform "echo some command" \
> >                   "echo another command"
> >     
> >     perform "echo a later command"
> >     
> >     run "echo a command that a user doesn't need to run later to 
> > \"reproduce\" the tutorial"
> >     
> >     ===========================================
> >     
> >     You'd then go and kill all of the
> >     
> >       read -e -p "${BRIGHT}Hit enter to continue.${NORMAL} "
> >       echo
> >     
> >     blocks and replace with invocations of perform.

thanks! as discussed offline, s/perform/execute/


> On March 5, 2013, 8:43 a.m., Benjamin Hindman wrote:
> > hadoop/TUTORIAL.sh, line 353
> > <https://reviews.apache.org/r/9174/diff/9/?file=264055#file264055line353>
> >
> >     This is weird ... you're printing out things and including them in the 
> > summary that are not really part of the tutorial. This really begs for a 
> > separate helper.

run() now doesn't print summary.


- Vinod


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9174/#review17362
-----------------------------------------------------------


On March 5, 2013, 10:39 p.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9174/
> -----------------------------------------------------------
> 
> (Updated March 5, 2013, 10:39 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Description
> -------
> 
> See Summary.
> 
> Also, we only run 'ant' once instead of twice.
> 
> 
> This addresses bug MESOS-352.
>     https://issues.apache.org/jira/browse/MESOS-352
> 
> 
> Diffs
> -----
> 
>   hadoop/Makefile.am d1aa75535ab617f9e4a0b8a0db84d77f1916acc4 
>   hadoop/TUTORIAL.sh 5670d6afa96f858d437f26885e862712bbf72b71 
>   hadoop/hadoop-2.0.0-mr1-cdh4.1.2_hadoop-env.sh.patch PRE-CREATION 
>   hadoop/hadoop-2.0.0-mr1-cdh4.1.2_mesos.patch PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/9174/diff/
> 
> 
> Testing
> -------
> 
> make hadoop-2.0.0-mr1-cdh4.1.2
> make hadoop-0.20.2-cdh3u3
> make hadoop-0.20.205.0
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>

Reply via email to