mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smar...@apache.org
Subject mahout git commit: MAHOUT-1611: Preconditions.checkArgument in org.apache.mahout.utils.ConcatenateVectorsJob
Date Sun, 09 Nov 2014 17:46:48 GMT
Repository: mahout
Updated Branches:
  refs/heads/master f1095d8c3 -> 379863d8f


MAHOUT-1611: Preconditions.checkArgument in org.apache.mahout.utils.ConcatenateVectorsJob


Project: http://git-wip-us.apache.org/repos/asf/mahout/repo
Commit: http://git-wip-us.apache.org/repos/asf/mahout/commit/379863d8
Tree: http://git-wip-us.apache.org/repos/asf/mahout/tree/379863d8
Diff: http://git-wip-us.apache.org/repos/asf/mahout/diff/379863d8

Branch: refs/heads/master
Commit: 379863d8f9dff8c0a42c341c68044c9c52b597e0
Parents: f1095d8
Author: Suneel Marthi <suneel.marthi@gmail.com>
Authored: Sun Nov 9 12:45:39 2014 -0500
Committer: Suneel Marthi <suneel.marthi@gmail.com>
Committed: Sun Nov 9 12:45:39 2014 -0500

----------------------------------------------------------------------
 CHANGELOG                                                        | 2 ++
 .../main/java/org/apache/mahout/utils/ConcatenateVectorsJob.java | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mahout/blob/379863d8/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 079d216..ca9b71c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,8 @@ Mahout Change Log
 
 Release 1.0 - unreleased
 
+  MAHOUT-1611: Preconditions.checkArgument in org.apache.mahout.utils.ConcatenateVectorsJob
(Haishou Ma via smarthi)
+
   MAHOUT-1615: SparkEngine drmFromHDFS returning the same Key for all Key,Vec Pairs for Text-Keyed
SequenceFiles (Anand Avati, dlyubimov, apalumbo)
 
   MAHOUT-1610: Update tests to pass in Java 8 (srowen)

http://git-wip-us.apache.org/repos/asf/mahout/blob/379863d8/integration/src/main/java/org/apache/mahout/utils/ConcatenateVectorsJob.java
----------------------------------------------------------------------
diff --git a/integration/src/main/java/org/apache/mahout/utils/ConcatenateVectorsJob.java
b/integration/src/main/java/org/apache/mahout/utils/ConcatenateVectorsJob.java
index 594e96f..83a3ca4 100644
--- a/integration/src/main/java/org/apache/mahout/utils/ConcatenateVectorsJob.java
+++ b/integration/src/main/java/org/apache/mahout/utils/ConcatenateVectorsJob.java
@@ -108,12 +108,12 @@ public class ConcatenateVectorsJob extends AbstractJob {
     // this works for both part* and a directory/ with part*.
     Path pathPattern = new Path(path, "part*");
     FileStatus[] paths = fs.globStatus(pathPattern);
-    Preconditions.checkArgument(paths.length == 0, path.getName() + " is a file, should be
a directory");
+    Preconditions.checkArgument(paths.length > 0, path.getName() + " is a file, should
be a directory");
 
     Path file = paths[0].getPath();
     SequenceFile.Reader reader = null;
     try {
-      reader = new SequenceFile.Reader(fs, file, fs.getConf());
+      reader = new SequenceFile.Reader(fs.getConf(), SequenceFile.Reader.file(file));
       return reader.getKeyClass().asSubclass(Writable.class);
     } finally {
       Closeables.close(reader, true);


Mime
View raw message