hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ta...@apache.org
Subject svn commit: r645767 - in /hadoop/core/trunk: ./ src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/
Date Tue, 08 Apr 2008 05:33:12 GMT
Author: taton
Date: Mon Apr  7 22:33:12 2008
New Revision: 645767

URL: http://svn.apache.org/viewvc?rev=645767&view=rev
Log:
HADOOP-3018. Fix the eclipse plug-in contrib wrt removed deprecated methods (taton)


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSFolder.java
    hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSLocationsRoot.java
    hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSPath.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=645767&r1=645766&r2=645767&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon Apr  7 22:33:12 2008
@@ -535,6 +535,9 @@
     HADOOP-3157. Fix path handling in DistributedCache and TestMiniMRLocalFS.
     (Doug Cutting via rangadi) 
 
+    HADOOP-3018. Fix the eclipse plug-in contrib wrt removed deprecated
+    methods (taton)
+
 Release 0.16.3 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSFolder.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSFolder.java?rev=645767&r1=645766&r2=645767&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSFolder.java
(original)
+++ hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSFolder.java
Mon Apr  7 22:33:12 2008
@@ -25,6 +25,7 @@
 import java.util.logging.Logger;
 
 import org.apache.hadoop.eclipse.server.HadoopServer;
+import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.Path;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -57,31 +58,15 @@
   protected void loadDFSFolderChildren() throws IOException {
     List<DFSPath> list = new ArrayList<DFSPath>();
 
-    for (Path path : getDFS().listPaths(this.getPath())) {
-      if (getDFS().isDirectory(path)) {
-        list.add(new DFSFolder(this, path));
+    for (FileStatus status : getDFS().listStatus(this.getPath())) {
+      if (status.isDir()) {
+        list.add(new DFSFolder(this, status.getPath()));
       } else {
-        list.add(new DFSFile(this, path));
+        list.add(new DFSFile(this, status.getPath()));
       }
     }
 
     this.children = list.toArray(new DFSContent[list.size()]);
-  }
-
-  /**
-   * Does a recursive delete of the remote directory tree at this node.
-   */
-  @Override
-  public void delete() {
-
-    try {
-      getDFS().delete(this.path);
-
-    } catch (IOException e) {
-      e.printStackTrace();
-      MessageDialog.openWarning(null, "Delete file",
-          "Unable to delete file \"" + this.path + "\"\n" + e);
-    }
   }
 
   /**

Modified: hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSLocationsRoot.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSLocationsRoot.java?rev=645767&r1=645766&r2=645767&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSLocationsRoot.java
(original)
+++ hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSLocationsRoot.java
Mon Apr  7 22:33:12 2008
@@ -26,7 +26,6 @@
 import org.apache.hadoop.eclipse.servers.IHadoopServerListener;
 import org.apache.hadoop.eclipse.servers.ServerRegistry;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.ipc.RPC;
 
 /**
  * Representation of the root element containing all DFS servers. This
@@ -138,6 +137,7 @@
       }
     };
 
+    // Wait 5 seconds for the connections to be closed
     closeThread.start();
     try {
       closeThread.join(5000);
@@ -145,7 +145,6 @@
     } catch (InterruptedException ie) {
       // Ignore
     }
-    RPC.stopClient();
   }
 
 }

Modified: hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSPath.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSPath.java?rev=645767&r1=645766&r2=645767&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSPath.java
(original)
+++ hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/dfs/DFSPath.java
Mon Apr  7 22:33:12 2008
@@ -96,9 +96,12 @@
     }
   }
 
+  /**
+   * Does a recursive delete of the remote directory tree at this node.
+   */
   public void delete() {
     try {
-      dfs.delete(this.path);
+      getDFS().delete(this.path, true);
 
     } catch (IOException e) {
       e.printStackTrace();



Mime
View raw message