You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hdt.apache.org by ad...@apache.org on 2013/04/13 19:58:46 UTC

[2/5] git commit: rolled out HDT-20, as the giant list of jars is actually needed

rolled out HDT-20, as the giant list of jars is actually needed

Project: http://git-wip-us.apache.org/repos/asf/incubator-hdt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hdt/commit/9dd95b2d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hdt/tree/9dd95b2d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hdt/diff/9dd95b2d

Branch: refs/heads/hadoop-2
Commit: 9dd95b2daf88713fe627395d55e61150c55df1da
Parents: 1d8a2c9
Author: adamb <ad...@apache.org>
Authored: Fri Apr 12 13:53:45 2013 -0500
Committer: adamb <ad...@apache.org>
Committed: Fri Apr 12 13:53:45 2013 -0500

----------------------------------------------------------------------
 .../apache/hdt/core/natures/MapReduceNature.java   |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/9dd95b2d/org.apache.hdt.core/src/org/apache/hdt/core/natures/MapReduceNature.java
----------------------------------------------------------------------
diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/natures/MapReduceNature.java b/org.apache.hdt.core/src/org/apache/hdt/core/natures/MapReduceNature.java
index fd702d2..ef9587e 100644
--- a/org.apache.hdt.core/src/org/apache/hdt/core/natures/MapReduceNature.java
+++ b/org.apache.hdt.core/src/org/apache/hdt/core/natures/MapReduceNature.java
@@ -71,7 +71,7 @@ public class MapReduceNature implements IProjectNature {
 
         // get the hadoop core jar without touching test or examples
         // older version of hadoop don't use the word "core" -- eyhung
-        if ((fileName.indexOf("hadoop-core") != -1) && (fileName.endsWith("jar"))
+        if ((fileName.indexOf("hadoop") != -1) && (fileName.endsWith("jar"))
             && (fileName.indexOf("test") == -1)
             && (fileName.indexOf("examples") == -1)) {
           coreJars.add(pathname);
@@ -80,6 +80,19 @@ public class MapReduceNature implements IProjectNature {
         return false; // we don't care what this returns
       }
     });
+    File dir2 = new File(path + File.separatorChar + "lib");
+    if (dir2.exists() && dir2.isDirectory()) {
+      dir2.listFiles(new FileFilter() {
+        public boolean accept(File pathname) {
+          if ((!pathname.isDirectory())
+              && (pathname.getName().endsWith("jar"))) {
+            coreJars.add(pathname);
+          }
+
+          return false; // we don't care what this returns
+        }
+      });
+    }
 
     // Add Hadoop libraries onto classpath
     IJavaProject javaProject = JavaCore.create(getProject());