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 cu...@apache.org on 2007/01/16 20:13:02 UTC
svn commit: r496823 - in /lucene/hadoop/trunk: ./
src/java/org/apache/hadoop/fs/ src/java/org/apache/hadoop/io/
src/java/org/apache/hadoop/mapred/ src/test/org/apache/hadoop/io/
src/webapps/job/
Author: cutting
Date: Tue Jan 16 11:13:01 2007
New Revision: 496823
URL: http://svn.apache.org/viewvc?view=rev&rev=496823
Log:
HADOOP-781. Remove methods deprecated in 0.10 that are no longer widely used. (cutting)
Modified:
lucene/hadoop/trunk/CHANGES.txt
lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java
lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/LocalFileSystem.java
lucene/hadoop/trunk/src/java/org/apache/hadoop/io/MapFile.java
lucene/hadoop/trunk/src/java/org/apache/hadoop/io/SetFile.java
lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/PhasedFileSystem.java
lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTrackerStatus.java
lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestArrayFile.java
lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java
lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSetFile.java
lucene/hadoop/trunk/src/webapps/job/machines.jsp
Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=496823&r1=496822&r2=496823
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue Jan 16 11:13:01 2007
@@ -1,6 +1,12 @@
Hadoop Change Log
+Trunk (unreleased changes)
+
+ 1. HADOOP-781. Remove methods deprecated in 0.10 that are no longer
+ widely used. (cutting)
+
+
Release 0.10.1 - 2007-01-10
1. HADOOP-857. Fix S3 FileSystem implementation to permit its use
Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java?view=diff&rev=496823&r1=496822&r2=496823
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java Tue Jan 16 11:13:01 2007
@@ -73,7 +73,7 @@
fs = new DistributedFileSystem(addr, conf);
} else if ("-local".equals(cmd)) {
i++;
- fs = new LocalFileSystem(conf);
+ fs = FileSystem.getLocal(conf);
} else {
fs = get(conf); // using default
LOG.info("No FS indicated, using default:"+fs.getName());
@@ -209,11 +209,6 @@
///////////////////////////////////////////////////////////////
// FileSystem
///////////////////////////////////////////////////////////////
-
- /** @deprecated */
- protected FileSystem(Configuration conf) {
- super(conf);
- }
protected FileSystem() {
super(null);
Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/LocalFileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/LocalFileSystem.java?view=diff&rev=496823&r1=496822&r2=496823
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/LocalFileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/LocalFileSystem.java Tue Jan 16 11:13:01 2007
@@ -44,11 +44,6 @@
public LocalFileSystem() {}
- /** @deprecated */
- public LocalFileSystem(Configuration conf) throws IOException {
- initialize(NAME, conf);
- }
-
/**
* Return 1x1 'localhost' cell if the file exists.
* Return null if otherwise.
Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/io/MapFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/io/MapFile.java?view=diff&rev=496823&r1=496822&r2=496823
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/io/MapFile.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/io/MapFile.java Tue Jan 16 11:13:01 2007
@@ -67,16 +67,6 @@
private WritableComparable lastKey;
- /** Create the named map for keys of the named class.
- * @deprecated
- */
- public Writer(FileSystem fs, String dirName,
- Class keyClass, Class valClass)
- throws IOException {
- this(new Configuration(), fs, dirName,
- WritableComparator.get(keyClass), valClass);
- }
-
/** Create the named map for keys of the named class. */
public Writer(Configuration conf, FileSystem fs, String dirName,
Class keyClass, Class valClass)
@@ -508,7 +498,7 @@
Configuration conf = new Configuration();
int ioFileBufferSize = conf.getInt("io.file.buffer.size", 4096);
- FileSystem fs = new LocalFileSystem(conf);
+ FileSystem fs = FileSystem.getLocal(conf);
MapFile.Reader reader = new MapFile.Reader(fs, in, conf);
MapFile.Writer writer =
new MapFile.Writer(conf, fs, out, reader.getKeyClass(), reader.getValueClass());
Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/io/SetFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/io/SetFile.java?view=diff&rev=496823&r1=496822&r2=496823
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/io/SetFile.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/io/SetFile.java Tue Jan 16 11:13:01 2007
@@ -29,20 +29,14 @@
protected SetFile() {} // no public ctor
- /** Write a new set file. */
+ /** Write a new set file.
+ * @deprecated pass a Configuration too
+ */
public static class Writer extends MapFile.Writer {
/** Create the named set for keys of the named class. */
public Writer(FileSystem fs, String dirName, Class keyClass) throws IOException {
- super(fs, dirName, keyClass, NullWritable.class);
- }
-
- /** Create the named set using the named key comparator.
- * @deprecated
- */
- public Writer(FileSystem fs, String dirName, WritableComparator comparator)
- throws IOException {
- super(new Configuration(), fs, dirName, comparator, NullWritable.class);
+ super(new Configuration(), fs, dirName, keyClass, NullWritable.class);
}
/** Create a set naming the element class and compression type. */
Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/PhasedFileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/PhasedFileSystem.java?view=diff&rev=496823&r1=496822&r2=496823
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/PhasedFileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/PhasedFileSystem.java Tue Jan 16 11:13:01 2007
@@ -50,8 +50,6 @@
*/
public PhasedFileSystem(FileSystem fs, String jobid,
String tipid, String taskid) {
- super(fs.getConf()); // not used
-
this.baseFS = fs ;
this.jobid = jobid;
this.tipid = tipid ;
@@ -66,8 +64,6 @@
* @param conf JobConf
*/
public PhasedFileSystem(FileSystem fs, JobConf conf) {
- super(fs.getConf()); // not used
-
this.baseFS = fs ;
this.jobid = conf.get("mapred.job.id");
this.tipid = conf.get("mapred.tip.id");
@@ -80,7 +76,6 @@
* @param conf
*/
protected PhasedFileSystem(Configuration conf){
- super(conf);
throw new UnsupportedOperationException("Operation not supported");
}
Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTrackerStatus.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTrackerStatus.java?view=diff&rev=496823&r1=496822&r2=496823
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTrackerStatus.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTrackerStatus.java Tue Jan 16 11:13:01 2007
@@ -95,17 +95,6 @@
}
/**
- * All current tasks at the TaskTracker.
- *
- * Tasks are tracked by a TaskStatus object.
- *
- * @deprecated use {@link #getTaskReports()} instead
- */
- public Iterator taskReports() {
- return taskReports.iterator();
- }
-
- /**
* Get the current tasks at the TaskTracker.
* Tasks are tracked by a {@link TaskStatus} object.
*
Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestArrayFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestArrayFile.java?view=diff&rev=496823&r1=496822&r2=496823
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestArrayFile.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestArrayFile.java Tue Jan 16 11:13:01 2007
@@ -38,7 +38,7 @@
public void testArrayFile() throws Exception {
Configuration conf = new Configuration();
- FileSystem fs = new LocalFileSystem(conf);
+ FileSystem fs = FileSystem.getLocal(conf);
RandomDatum[] data = generate(10000);
writeTest(fs, data, FILE);
readTest(fs, data, FILE, conf);
@@ -46,7 +46,7 @@
public void testEmptyFile() throws Exception {
Configuration conf = new Configuration();
- FileSystem fs = new LocalFileSystem(conf);
+ FileSystem fs = FileSystem.getLocal(conf);
writeTest(fs, new RandomDatum[0], FILE);
ArrayFile.Reader reader = new ArrayFile.Reader(fs, FILE, conf);
assertNull(reader.get(0, new RandomDatum()));
Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java?view=diff&rev=496823&r1=496822&r2=496823
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java Tue Jan 16 11:13:01 2007
@@ -77,7 +77,7 @@
int seed = new Random().nextInt();
LOG.info("Seed = " + seed);
- FileSystem fs = new LocalFileSystem(conf);
+ FileSystem fs = FileSystem.getLocal(conf);
try {
// SequenceFile.Writer
writeTest(fs, count, seed, file, CompressionType.NONE, null);
Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSetFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSetFile.java?view=diff&rev=496823&r1=496822&r2=496823
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSetFile.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSetFile.java Tue Jan 16 11:13:01 2007
@@ -39,7 +39,7 @@
public TestSetFile(String name) { super(name); }
public void testSetFile() throws Exception {
- FileSystem fs = new LocalFileSystem(conf);
+ FileSystem fs = FileSystem.getLocal(conf);
try {
RandomDatum[] data = generate(10000);
writeTest(fs, data, FILE, CompressionType.NONE);
Modified: lucene/hadoop/trunk/src/webapps/job/machines.jsp
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/webapps/job/machines.jsp?view=diff&rev=496823&r1=496822&r2=496823
==============================================================================
--- lucene/hadoop/trunk/src/webapps/job/machines.jsp (original)
+++ lucene/hadoop/trunk/src/webapps/job/machines.jsp Tue Jan 16 11:13:01 2007
@@ -34,7 +34,7 @@
sinceHeartbeat = sinceHeartbeat / 1000;
}
int numCurTasks = 0;
- for (Iterator it2 = tt.taskReports(); it2.hasNext(); ) {
+ for (Iterator it2 = tt.getTaskReports().iterator(); it2.hasNext(); ) {
it2.next();
numCurTasks++;
}