You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by to...@apache.org on 2008/12/04 11:21:22 UTC
svn commit: r723276 - in /hadoop/core/trunk: CHANGES.txt build.xml
src/core/org/apache/hadoop/fs/FileSystem.java
Author: tomwhite
Date: Thu Dec 4 02:21:18 2008
New Revision: 723276
URL: http://svn.apache.org/viewvc?rev=723276&view=rev
Log:
HADOOP-3750. Fix and enforce module dependencies. Contributed by Sharad Agarwal.
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/build.xml
hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java
Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=723276&r1=723275&r2=723276&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Dec 4 02:21:18 2008
@@ -167,6 +167,9 @@
HADOOP-4690. fuse-dfs - create source file/function + utils + config +
main source files. (pete wyckoff via mahadev)
+ HADOOP-3750. Fix and enforce module dependencies. (Sharad Agarwal via
+ tomwhite)
+
OPTIMIZATIONS
HADOOP-3293. Fixes FileInputFormat to do provide locations for splits
Modified: hadoop/core/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/build.xml?rev=723276&r1=723275&r2=723276&view=diff
==============================================================================
--- hadoop/core/trunk/build.xml (original)
+++ hadoop/core/trunk/build.xml Thu Dec 4 02:21:18 2008
@@ -289,6 +289,28 @@
<target name="compile-core-classes" depends="init, compile-rcc-compiler">
+ <!-- Compile Java files (excluding JSPs) checking warnings -->
+ <javac
+ encoding="${build.encoding}"
+ srcdir="${core.src.dir}"
+ includes="org/apache/hadoop/**/*.java"
+ destdir="${build.classes}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ target="${javac.version}"
+ source="${javac.version}"
+ deprecation="${javac.deprecation}">
+ <compilerarg line="${javac.args} ${javac.args.warnings}" />
+ <classpath refid="classpath"/>
+ </javac>
+
+ <copy todir="${build.classes}">
+ <fileset dir="${core.src.dir}" includes="**/*.properties"/>
+ </copy>
+
+ </target>
+
+ <target name="compile-mapred-classes" depends="compile-core-classes">
<jsp-compile
uriroot="${src.webapps}/task"
outputdir="${build.src}"
@@ -303,6 +325,27 @@
webxml="${build.webapps}/job/WEB-INF/web.xml">
</jsp-compile>
+ <!-- Compile Java files (excluding JSPs) checking warnings -->
+ <javac
+ encoding="${build.encoding}"
+ srcdir="${mapred.src.dir};${build.src}"
+ includes="org/apache/hadoop/**/*.java"
+ destdir="${build.classes}"
+ debug="${javac.debug}"
+ optimize="${javac.optimize}"
+ target="${javac.version}"
+ source="${javac.version}"
+ deprecation="${javac.deprecation}">
+ <compilerarg line="${javac.args} ${javac.args.warnings}" />
+ <classpath refid="classpath"/>
+ </javac>
+
+ <copy todir="${build.classes}">
+ <fileset dir="${mapred.src.dir}" includes="**/*.properties"/>
+ </copy>
+ </target>
+
+ <target name="compile-hdfs-classes" depends="compile-core-classes">
<jsp-compile
uriroot="${src.webapps}/hdfs"
outputdir="${build.src}"
@@ -320,7 +363,7 @@
<!-- Compile Java files (excluding JSPs) checking warnings -->
<javac
encoding="${build.encoding}"
- srcdir="${core.src.dir};${mapred.src.dir};${hdfs.src.dir};${build.src}"
+ srcdir="${hdfs.src.dir};${build.src}"
includes="org/apache/hadoop/**/*.java"
destdir="${build.classes}"
debug="${javac.debug}"
@@ -331,15 +374,11 @@
<compilerarg line="${javac.args} ${javac.args.warnings}" />
<classpath refid="classpath"/>
</javac>
-
+
<copy todir="${build.classes}">
- <fileset dir="${core.src.dir}" includes="**/*.properties"/>
- <fileset dir="${mapred.src.dir}" includes="**/*.properties"/>
- <fileset dir="${hdfs.src.dir}" includes="**/*.properties"/>
+ <fileset dir="${hdfs.src.dir}" includes="**/*.properties"/>
</copy>
-
-
- </target>
+ </target>
<target name="compile-tools" depends="init">
<javac
@@ -419,7 +458,9 @@
</target>
<target name="compile-core"
- depends="clover,compile-core-classes,compile-core-native,compile-c++" description="Compile core only">
+ depends="clover,compile-core-classes,compile-mapred-classes,
+ compile-hdfs-classes,compile-core-native,compile-c++"
+ description="Compile core only">
</target>
<target name="compile-contrib" depends="compile-core,compile-libhdfs">
Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java?rev=723276&r1=723275&r2=723276&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java Thu Dec 4 02:21:18 2008
@@ -31,7 +31,6 @@
import org.apache.hadoop.net.NetUtils;
import org.apache.hadoop.util.*;
import org.apache.hadoop.fs.permission.FsPermission;
-import org.apache.hadoop.hdfs.DistributedFileSystem;
import org.apache.hadoop.io.MultipleIOException;
import org.apache.hadoop.security.UserGroupInformation;
@@ -83,41 +82,6 @@
* or the JVM is exited.
*/
private Set<Path> deleteOnExit = new TreeSet<Path>();
-
- /**
- * Parse the cmd-line args, starting at i. Remove consumed args
- * from array. We expect param in the form:
- * '-local | -dfs <namenode:port>'
- * @deprecated Consider using {@link GenericOptionsParser} instead.
- */
- @Deprecated
- public static FileSystem parseArgs(String argv[], int i, Configuration conf) throws IOException {
- /**
- if (argv.length - i < 1) {
- throw new IOException("Must indicate filesystem type for DFS");
- }
- */
- int orig = i;
- FileSystem fs = null;
- String cmd = argv[i];
- if ("-dfs".equals(cmd)) {
- i++;
- InetSocketAddress addr = NetUtils.createSocketAddr(argv[i++]);
- fs = new DistributedFileSystem(addr, conf);
- } else if ("-local".equals(cmd)) {
- i++;
- fs = FileSystem.getLocal(conf);
- } else {
- fs = get(conf); // using default
- LOG.info("No FS indicated, using default:"+fs.getName());
-
- }
- System.arraycopy(argv, i, argv, orig, argv.length - i);
- for (int j = argv.length - i; j < argv.length; j++) {
- argv[j] = null;
- }
- return fs;
- }
/** Returns the configured filesystem implementation.*/
public static FileSystem get(Configuration conf) throws IOException {