Author: cutting Date: Fri Jan 5 11:17:04 2007 New Revision: 493146 URL: http://svn.apache.org/viewvc?view=rev&rev=493146 Log: HADOOP-700. Change bin/hadoop to only include core jar file on classpath. Contributed by Nigel.
Modified: lucene/hadoop/trunk/CHANGES.txt lucene/hadoop/trunk/bin/hadoop lucene/hadoop/trunk/bin/rcc lucene/hadoop/trunk/build.xml lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/TestMapRed.java lucene/hadoop/trunk/src/test/org/apache/hadoop/record/test/TestMapRed.java Modified: lucene/hadoop/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=493146&r1=493145&r2=493146 ============================================================================== --- lucene/hadoop/trunk/CHANGES.txt (original) +++ lucene/hadoop/trunk/CHANGES.txt Fri Jan 5 11:17:04 2007 @@ -195,6 +195,11 @@ 55. HADOOP-470. In HDFS web ui, list the datanodes containing each copy of a block. (Hairong Kuang via cutting) +56. HADOOP-700. Change bin/hadoop to only include core jar file on + classpath, not example, test, etc. Also rename core jar to + hadoop-${version}-core.jar so that it can be more easily + identified. (Nigel Daley via cutting) + Release 0.9.2 - 2006-12-15 Modified: lucene/hadoop/trunk/bin/hadoop URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/hadoop?view=diff&rev=493146&r1=493145&r2=493146 ============================================================================== --- lucene/hadoop/trunk/bin/hadoop (original) +++ lucene/hadoop/trunk/bin/hadoop Fri Jan 5 11:17:04 2007 @@ -90,11 +90,11 @@ # so that filenames w/ spaces are handled correctly in loops below IFS= -# for releases, add hadoop jars & webapps to CLASSPATH +# for releases, add core hadoop jar & webapps to CLASSPATH if [ -d "$HADOOP_HOME/webapps" ]; then CLASSPATH=${CLASSPATH}:$HADOOP_HOME fi -for f in $HADOOP_HOME/hadoop-*.jar; do +for f in $HADOOP_HOME/hadoop-*-core.jar; do CLASSPATH=${CLASSPATH}:$f; done Modified: lucene/hadoop/trunk/bin/rcc URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/rcc?view=diff&rev=493146&r1=493145&r2=493146 ============================================================================== --- lucene/hadoop/trunk/bin/rcc (original) +++ lucene/hadoop/trunk/bin/rcc Fri Jan 5 11:17:04 2007 @@ -52,11 +52,11 @@ # so that filenames w/ spaces are handled correctly in loops below IFS= -# for releases, add hadoop jars & webapps to CLASSPATH +# for releases, add core hadoop jar & webapps to CLASSPATH if [ -d "$HADOOP_HOME/webapps" ]; then CLASSPATH=${CLASSPATH}:$HADOOP_HOME fi -for f in $HADOOP_HOME/hadoop-*.jar; do +for f in $HADOOP_HOME/hadoop-*-core.jar; do CLASSPATH=${CLASSPATH}:$f; done Modified: lucene/hadoop/trunk/build.xml URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/build.xml?view=diff&rev=493146&r1=493145&r2=493146 ============================================================================== --- lucene/hadoop/trunk/build.xml (original) +++ lucene/hadoop/trunk/build.xml Fri Jan 5 11:17:04 2007 @@ -262,7 +262,7 @@ <tar compression="gzip" destfile="${build.classes}/bin.tgz"> <tarfileset dir="bin" mode="755"/> </tar> - <jar jarfile="${build.dir}/${final.name}.jar" + <jar jarfile="${build.dir}/${final.name}-core.jar" basedir="${build.classes}"> <manifest> <section name="org/apache/hadoop"> @@ -488,7 +488,7 @@ <fileset dir="${build.webapps}"/> </copy> - <copy file="${build.dir}/${final.name}.jar" todir="${dist.dir}"/> + <copy file="${build.dir}/${final.name}-core.jar" todir="${dist.dir}"/> <copy file="${build.dir}/${final.name}-examples.jar" todir="${dist.dir}"/> Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java?view=diff&rev=493146&r1=493145&r2=493146 ============================================================================== --- lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java (original) +++ lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestFileSystem.java Fri Jan 5 11:17:04 2007 @@ -182,7 +182,7 @@ fs.delete(DATA_DIR); fs.delete(WRITE_DIR); - JobConf job = new JobConf(conf); + JobConf job = new JobConf(conf, TestFileSystem.class); job.setBoolean("fs.test.fastCheck", fastCheck); job.setInputPath(CONTROL_DIR); @@ -277,7 +277,7 @@ fs.delete(READ_DIR); - JobConf job = new JobConf(conf); + JobConf job = new JobConf(conf, TestFileSystem.class); job.setBoolean("fs.test.fastCheck", fastCheck); @@ -373,7 +373,7 @@ fs.delete(READ_DIR); - JobConf job = new JobConf(conf); + JobConf job = new JobConf(conf, TestFileSystem.class); job.setBoolean("fs.test.fastCheck", fastCheck); job.setInputPath(CONTROL_DIR); Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/TestMapRed.java URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/TestMapRed.java?view=diff&rev=493146&r1=493145&r2=493146 ============================================================================== --- lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/TestMapRed.java (original) +++ lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/TestMapRed.java Fri Jan 5 11:17:04 2007 @@ -272,7 +272,7 @@ boolean compressReduceOutput, boolean includeCombine ) throws Exception { - JobConf conf = new JobConf(); + JobConf conf = new JobConf(TestMapRed.class); Path testdir = new Path("build/test/test.mapred.compress"); Path inDir = new Path(testdir, "in"); Path outDir = new Path(testdir, "out"); @@ -341,7 +341,7 @@ // // Generate distribution of ints. This is the answer key. // - JobConf conf = new JobConf(); + JobConf conf = new JobConf(TestMapRed.class); int countsToGo = counts; int dist[] = new int[range]; for (int i = 0; i < range; i++) { @@ -402,7 +402,7 @@ fs.delete(randomOuts); - JobConf genJob = new JobConf(conf); + JobConf genJob = new JobConf(conf,TestMapRed.class); genJob.setInputPath(randomIns); genJob.setInputFormat(SequenceFileInputFormat.class); genJob.setMapperClass(RandomGenMapper.class); @@ -447,7 +447,7 @@ int intermediateReduces = 10; Path intermediateOuts = new Path(testdir, "intermediateouts"); fs.delete(intermediateOuts); - JobConf checkJob = new JobConf(conf); + JobConf checkJob = new JobConf(conf,TestMapRed.class); checkJob.setInputPath(randomOuts); checkJob.setInputFormat(TextInputFormat.class); checkJob.setMapperClass(RandomCheckMapper.class); @@ -470,7 +470,7 @@ // Path finalOuts = new Path(testdir, "finalouts"); fs.delete(finalOuts); - JobConf mergeJob = new JobConf(conf); + JobConf mergeJob = new JobConf(conf,TestMapRed.class); mergeJob.setInputPath(intermediateOuts); mergeJob.setInputFormat(SequenceFileInputFormat.class); mergeJob.setMapperClass(MergeMapper.class); Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/record/test/TestMapRed.java URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/record/test/TestMapRed.java?view=diff&rev=493146&r1=493145&r2=493146 ============================================================================== --- lucene/hadoop/trunk/src/test/org/apache/hadoop/record/test/TestMapRed.java (original) +++ lucene/hadoop/trunk/src/test/org/apache/hadoop/record/test/TestMapRed.java Fri Jan 5 11:17:04 2007 @@ -295,7 +295,7 @@ fs.delete(randomOuts); - JobConf genJob = new JobConf(conf); + JobConf genJob = new JobConf(conf,TestMapRed.class); genJob.setInputPath(randomIns); genJob.setInputKeyClass(RecInt.class); genJob.setInputValueClass(RecInt.class); @@ -342,7 +342,7 @@ int intermediateReduces = 10; Path intermediateOuts = new Path(testdir, "intermediateouts"); fs.delete(intermediateOuts); - JobConf checkJob = new JobConf(conf); + JobConf checkJob = new JobConf(conf,TestMapRed.class); checkJob.setInputPath(randomOuts); checkJob.setInputKeyClass(RecInt.class); checkJob.setInputValueClass(RecString.class); @@ -367,7 +367,7 @@ // Path finalOuts = new Path(testdir, "finalouts"); fs.delete(finalOuts); - JobConf mergeJob = new JobConf(conf); + JobConf mergeJob = new JobConf(conf,TestMapRed.class); mergeJob.setInputPath(intermediateOuts); mergeJob.setInputKeyClass(RecInt.class); mergeJob.setInputValueClass(RecString.class);