mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r1491214 [1/2] - in /mahout/trunk: ./ core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/ core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/ core/src/main/java/org...
Date Sun, 09 Jun 2013 13:32:41 GMT
Author: gsingers
Date: Sun Jun  9 13:32:39 2013
New Revision: 1491214

URL: http://svn.apache.org/r1491214
Log:
MAHOUT-1211: clean up use of deprecated closeQuietly api

Modified:
    mahout/trunk/CHANGELOG
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/FactorizationEvaluator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorSplitterMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/svd/FilePersistenceStrategy.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/precompute/FileSimilarItemsWriter.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/precompute/MultithreadedBatchItemSimilarities.java
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/DFUtils.java
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/DecisionForest.java
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/data/Dataset.java
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/mapreduce/Classifier.java
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/tools/UDistrib.java
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/naivebayes/BayesUtils.java
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/naivebayes/NaiveBayesModel.java
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/BaumWelchTrainer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/RandomSequenceGenerator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/ViterbiEvaluator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/ModelSerializer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyDriver.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/classify/ClusterClassifier.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/iterator/ClusterIterator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/RandomSeedGenerator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyDriver.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/spectral/common/VectorCache.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/AbstractJob.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/HadoopUtil.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/distance/MahalanobisDistanceMeasure.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/distance/WeightedDistanceMeasure.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/FileLineIterator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/sequencefile/SequenceFileIterator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/sequencefile/SequenceFileValueIterator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/driver/MahoutDriver.java
    mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthDriver.java
    mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/MatrixColumnMeansJob.java
    mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java
    mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/DistributedLanczosSolver.java
    mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/EigenVerificationJob.java
    mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/HdfsBackedLanczosState.java
    mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/similarity/cooccurrence/Vectors.java
    mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SSVDHelper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/qr/QRFirstStep.java
    mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/DictionaryVectorizer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/collocations/llr/CollocMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/document/SequenceFileTokenizerMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/pruner/PrunedPartialVectorMergeReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/term/TFPartialVectorReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/tfidf/TFIDFConverter.java
    mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/data/Utils.java
    mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/mapreduce/partial/PartialBuilderTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/classifier/naivebayes/NaiveBayesTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/classifier/sgd/ModelSerializerTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/clustering/ClusteringTestUtils.java
    mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/TestCanopyCreation.java
    mahout/trunk/core/src/test/java/org/apache/mahout/clustering/dirichlet/TestMapReduce.java
    mahout/trunk/core/src/test/java/org/apache/mahout/clustering/fuzzykmeans/TestFuzzyKmeansClustering.java
    mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java
    mahout/trunk/core/src/test/java/org/apache/mahout/common/MahoutTestCase.java
    mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthTest2.java
    mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTest2.java
    mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTestVs.java
    mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthSynthDataTest2.java
    mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthTest2.java
    mahout/trunk/core/src/test/java/org/apache/mahout/math/MatrixWritableTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/math/hadoop/MathHelper.java
    mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/ConditionalEntropyTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/EntropyTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/InformationGainRatioTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/InformationGainTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/DictionaryVectorizerTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/DocumentProcessorTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/EncodedVectorsFromSequenceFilesTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/SparseVectorsFromSequenceFilesTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/collocations/llr/GramKeyTest.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/bookcrossing/BookCrossingDataModel.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/email/MailToPrefsDriver.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/grouplens/GroupLensDataModel.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/kddcup/DataFileIterator.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/kddcup/ToCSV.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/kddcup/track1/Track1Runner.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/kddcup/track1/svd/Track1SVDRunner.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/kddcup/track2/Track2Runner.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/hadoop/example/als/netflix/NetflixDatasetConverter.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/NewsgroupHelper.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/df/mapreduce/TestForest.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/sgd/AdaptiveLogisticModelParameters.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/sgd/LogisticModelParameters.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/sgd/PrintResourceOrFile.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/sgd/SimpleCsvExamples.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/sgd/TrainLogistic.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayClustering.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplaySpectralKMeans.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/minhash/LastfmDataConverter.java
    mahout/trunk/examples/src/test/java/org/apache/mahout/classifier/sgd/TrainLogisticTest.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/GenericJDBCDataModel.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/clustering/evaluation/RepresentativePointsDriver.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/clustering/lda/LDAPrintTopics.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/text/SequenceFilesFromMailArchives.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/text/wikipedia/WikipediaDatasetCreatorMapper.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/text/wikipedia/WikipediaXmlSplitter.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/text/wikipedia/XmlInputFormat.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/SequenceFileDumper.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/SplitInput.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/io/ChunkedWriter.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/regex/AnalyzerTransformer.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/vectors/RowIdJob.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/vectors/arff/ARFFIterator.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/vectors/arff/Driver.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/vectors/io/DelimitedTermInfoWriter.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/vectors/io/SequenceFileVectorWriter.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/vectors/io/TextualVectorWriter.java
    mahout/trunk/integration/src/main/java/org/apache/mahout/utils/vectors/lucene/ClusterLabels.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/clustering/TestClusterDumper.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/text/SequenceFilesFromMailArchivesTest.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/text/TestSequenceFilesFromDirectory.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/utils/SplitInputTest.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/csv/CSVVectorIteratorTest.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/io/VectorWriterTest.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/CachedTermInfoTest.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/DriverTest.java
    mahout/trunk/integration/src/test/java/org/apache/mahout/utils/vectors/lucene/LuceneIterableTest.java

Modified: mahout/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/mahout/trunk/CHANGELOG?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/CHANGELOG (original)
+++ mahout/trunk/CHANGELOG Sun Jun  9 13:32:39 2013
@@ -102,4 +102,6 @@ Release 0.8 - unreleased
 
   MAHOUT-1103: Fixed issue with splitting clusters on Hadoop (Matt Molek, gsingers)
 
-  MAHOUT-1126: Filter out bad META-INF files in job packaging (Pat Ferrel, gsingers)
\ No newline at end of file
+  MAHOUT-1126: Filter out bad META-INF files in job packaging (Pat Ferrel, gsingers)
+
+  MAHOUT-1211: Change deprecated Closeables.closeQuietly calls (smarthi, gsingers, srowen, dlyubimov)
\ No newline at end of file

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/FactorizationEvaluator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/FactorizationEvaluator.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/FactorizationEvaluator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/FactorizationEvaluator.java Sun Jun  9 13:32:39 2013
@@ -112,7 +112,7 @@ public class FactorizationEvaluator exte
       writer = new BufferedWriter(new OutputStreamWriter(outputStream, Charsets.UTF_8));
       writer.write(String.valueOf(rmse));
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     return 0;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorSplitterMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorSplitterMapper.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorSplitterMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorSplitterMapper.java Sun Jun  9 13:32:39 2013
@@ -70,7 +70,7 @@ public final class UserVectorSplitterMap
           }
         }
       } finally {
-        Closeables.closeQuietly(in);
+        Closeables.close(in, true);
       }
     }
   }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java Sun Jun  9 13:32:39 2013
@@ -176,7 +176,7 @@ public class FileDataModel extends Abstr
       iterator.next();
       firstLine = iterator.peek();
     }
-    Closeables.closeQuietly(iterator);
+    Closeables.close(iterator, true);
 
     delimiter = determineDelimiter(firstLine);
     delimiterPattern = Splitter.on(delimiter);

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/svd/FilePersistenceStrategy.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/svd/FilePersistenceStrategy.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/svd/FilePersistenceStrategy.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/svd/FilePersistenceStrategy.java Sun Jun  9 13:32:39 2013
@@ -63,7 +63,7 @@ public class FilePersistenceStrategy imp
       in = new DataInputStream(new BufferedInputStream(new FileInputStream(file)));
       return readBinary(in);
     } finally {
-      Closeables.closeQuietly(in);
+      Closeables.close(in, true);
     }
   }
 
@@ -75,7 +75,7 @@ public class FilePersistenceStrategy imp
       out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(file)));
       writeBinary(factorization, out);
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
   }
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/precompute/FileSimilarItemsWriter.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/precompute/FileSimilarItemsWriter.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/precompute/FileSimilarItemsWriter.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/precompute/FileSimilarItemsWriter.java Sun Jun  9 13:32:39 2013
@@ -62,6 +62,6 @@ public class FileSimilarItemsWriter impl
 
   @Override
   public void close() throws IOException {
-    Closeables.closeQuietly(writer);
+    Closeables.close(writer, true);
   }
 }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/precompute/MultithreadedBatchItemSimilarities.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/precompute/MultithreadedBatchItemSimilarities.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/precompute/MultithreadedBatchItemSimilarities.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/precompute/MultithreadedBatchItemSimilarities.java Sun Jun  9 13:32:39 2013
@@ -106,7 +106,7 @@ public class MultithreadedBatchItemSimil
       } catch (InterruptedException e) {
         throw new RuntimeException(e);
       }
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     return output.getNumSimilaritiesProcessed();

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/DFUtils.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/DFUtils.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/DFUtils.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/DFUtils.java Sun Jun  9 13:32:39 2013
@@ -157,7 +157,7 @@ public final class DFUtils {
     try {
       writable.write(out);
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
   }
   
@@ -174,7 +174,7 @@ public final class DFUtils {
       out = path.getFileSystem(conf).create(path);
       out.write(string.getBytes(Charset.defaultCharset()));
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, false);
     }
   }
   

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/DecisionForest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/DecisionForest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/DecisionForest.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/DecisionForest.java Sun Jun  9 13:32:39 2013
@@ -227,7 +227,7 @@ public class DecisionForest implements W
           forest.readFields(dataInput);
         }
       } finally {
-        Closeables.closeQuietly(dataInput);
+        Closeables.close(dataInput, true);
       }
     }
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/data/Dataset.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/data/Dataset.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/data/Dataset.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/data/Dataset.java Sun Jun  9 13:32:39 2013
@@ -328,7 +328,7 @@ public class Dataset {
     try {
       input.readFully(buff);
     } finally {
-      Closeables.closeQuietly(input);
+      Closeables.close(input, true);
     }
     String json = new String(buff, Charset.defaultCharset());
     return fromJSON(json);

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/mapreduce/Classifier.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/mapreduce/Classifier.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/mapreduce/Classifier.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/mapreduce/Classifier.java Sun Jun  9 13:32:39 2013
@@ -164,7 +164,7 @@ public class Classifier {
           }
         }
       } finally {
-        Closeables.closeQuietly(ofile);
+        Closeables.close(ofile, true);
       }
     }
     results = new double[resList.size()][2];

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/tools/UDistrib.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/tools/UDistrib.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/tools/UDistrib.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/df/tools/UDistrib.java Sun Jun  9 13:32:39 2013
@@ -188,7 +188,7 @@ public final class UDistrib {
     // close all the files.
     scanner.close();
     for (FSDataOutputStream file : files) {
-      Closeables.closeQuietly(file);
+      Closeables.close(file, true);
     }
     
     // merge all output files

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/naivebayes/BayesUtils.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/naivebayes/BayesUtils.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/naivebayes/BayesUtils.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/naivebayes/BayesUtils.java Sun Jun  9 13:32:39 2013
@@ -107,7 +107,7 @@ public final class BayesUtils {
         writer.append(new Text(label), new IntWritable(i++));
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
     return i;
   }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/naivebayes/NaiveBayesModel.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/naivebayes/NaiveBayesModel.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/naivebayes/NaiveBayesModel.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/naivebayes/NaiveBayesModel.java Sun Jun  9 13:32:39 2013
@@ -117,7 +117,7 @@ public class NaiveBayesModel {
         weightsPerLabelAndFeature.assignRow(label, VectorWritable.readVector(in));
       }
     } finally {
-      Closeables.closeQuietly(in);
+      Closeables.close(in, true);
     }
     NaiveBayesModel model = new NaiveBayesModel(weightsPerLabelAndFeature, weightsPerFeature, weightsPerLabel,
         perLabelThetaNormalizer, alphaI);
@@ -137,7 +137,7 @@ public class NaiveBayesModel {
         VectorWritable.writeVector(out, weightsPerLabelAndFeature.viewRow(row));
       }
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
   }
   

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/BaumWelchTrainer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/BaumWelchTrainer.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/BaumWelchTrainer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/BaumWelchTrainer.java Sun Jun  9 13:32:39 2013
@@ -121,7 +121,7 @@ public final class BaumWelchTrainer {
       try {
         LossyHmmSerializer.serialize(trainedModel, stream);
       } finally {
-        Closeables.closeQuietly(stream);
+        Closeables.close(stream, true);
       }
 
       //printing tranied model

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/RandomSequenceGenerator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/RandomSequenceGenerator.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/RandomSequenceGenerator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/RandomSequenceGenerator.java Sun Jun  9 13:32:39 2013
@@ -85,7 +85,7 @@ public final class RandomSequenceGenerat
       try {
         model = LossyHmmSerializer.deserialize(modelStream);
       } finally {
-        Closeables.closeQuietly(modelStream);
+        Closeables.close(modelStream, true);
       }
 
       //generating observations
@@ -99,7 +99,7 @@ public final class RandomSequenceGenerat
           writer.print(' ');
         }
       } finally {
-        Closeables.closeQuietly(writer);
+        Closeables.close(writer, true);
       }
     } catch (OptionException e) {
       CommandLineUtil.printHelp(optionGroup);

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/ViterbiEvaluator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/ViterbiEvaluator.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/ViterbiEvaluator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/ViterbiEvaluator.java Sun Jun  9 13:32:39 2013
@@ -87,7 +87,7 @@ public final class ViterbiEvaluator {
       try {
         model = LossyHmmSerializer.deserialize(modelStream);
       } finally {
-        Closeables.closeQuietly(modelStream);
+        Closeables.close(modelStream, true);
       }
 
       //reading observations
@@ -117,7 +117,7 @@ public final class ViterbiEvaluator {
           writer.print(' ');
         }
       } finally {
-        Closeables.closeQuietly(writer);
+        Closeables.close(writer, true);
       }
 
       if (computeLikelihood) {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/ModelSerializer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/ModelSerializer.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/ModelSerializer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/ModelSerializer.java Sun Jun  9 13:32:39 2013
@@ -41,7 +41,7 @@ public final class ModelSerializer {
     try {
       PolymorphicWritable.write(out, model);
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
   }
 
@@ -50,7 +50,7 @@ public final class ModelSerializer {
     try {
       PolymorphicWritable.write(out, model);
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
   }
 
@@ -59,7 +59,7 @@ public final class ModelSerializer {
     try {
       PolymorphicWritable.write(out, model);
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
   }
 
@@ -68,7 +68,7 @@ public final class ModelSerializer {
     try {
       return PolymorphicWritable.read(dataIn, clazz);
     } finally {
-      Closeables.closeQuietly(in);
+      Closeables.close(in, true);
     }
   }
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyDriver.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyDriver.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyDriver.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyDriver.java Sun Jun  9 13:32:39 2013
@@ -300,7 +300,7 @@ public class CanopyDriver extends Abstra
         }
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
     return canopyOutputDir;
   }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/clustering/classify/ClusterClassifier.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/classify/ClusterClassifier.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/clustering/classify/ClusterClassifier.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/clustering/classify/ClusterClassifier.java Sun Jun  9 13:32:39 2013
@@ -197,7 +197,7 @@ public class ClusterClassifier extends A
         Writable key = new IntWritable(i);
         writer.append(key, cw);
       } finally {
-        Closeables.closeQuietly(writer);
+        Closeables.close(writer, true);
       }
     }
   }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/clustering/iterator/ClusterIterator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/iterator/ClusterIterator.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/clustering/iterator/ClusterIterator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/clustering/iterator/ClusterIterator.java Sun Jun  9 13:32:39 2013
@@ -209,7 +209,7 @@ public final class ClusterIterator {
       while (iterator.hasNext()) {
         ClusterWritable value = iterator.next();
         if (!value.getValue().isConverged()) {
-          Closeables.closeQuietly(iterator);
+          Closeables.close(iterator, true);
           return false;
         }
       }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/RandomSeedGenerator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/RandomSeedGenerator.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/RandomSeedGenerator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/RandomSeedGenerator.java Sun Jun  9 13:32:39 2013
@@ -123,7 +123,7 @@ public final class RandomSeedGenerator {
         }
         log.info("Wrote {} Klusters to {}", k, outFile);
       } finally {
-        Closeables.closeQuietly(writer);
+        Closeables.close(writer, true);
       }
     }
     

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyDriver.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyDriver.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyDriver.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyDriver.java Sun Jun  9 13:32:39 2013
@@ -218,7 +218,7 @@ public class MeanShiftCanopyDriver exten
           writer.append(new Text(), clusterWritable);
         }
       } finally {
-        Closeables.closeQuietly(writer);
+        Closeables.close(writer, true);
       }
     }
   }
@@ -332,7 +332,7 @@ public class MeanShiftCanopyDriver exten
           writer.append(new Text(cluster.getIdentifier()), clusterWritable);
         }
       } finally {
-        Closeables.closeQuietly(writer);
+        Closeables.close(writer, true);
       }
       clustersIn = clustersOut;
       iteration++;
@@ -493,7 +493,7 @@ public class MeanShiftCanopyDriver exten
           writer.append(new IntWritable(closest.getId()), new WeightedVectorWritable(1, canopy.getCenter()));
         }
       } finally {
-        Closeables.closeQuietly(writer);
+        Closeables.close(writer, true);
       }
     }
   }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/clustering/spectral/common/VectorCache.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/spectral/common/VectorCache.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/clustering/spectral/common/VectorCache.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/clustering/spectral/common/VectorCache.java Sun Jun  9 13:32:39 2013
@@ -76,7 +76,7 @@ public final class VectorCache {
     try {
       writer.append(key, new VectorWritable(vector));
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     if (deleteOnExit) {
@@ -140,7 +140,7 @@ public final class VectorCache {
     try {
       return iterator.next().get();
     } finally {
-      Closeables.closeQuietly(iterator);
+      Closeables.close(iterator, true);
     }
   }
 }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/common/AbstractJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/common/AbstractJob.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/common/AbstractJob.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/common/AbstractJob.java Sun Jun  9 13:32:39 2013
@@ -457,7 +457,7 @@ public abstract class AbstractJob extend
       return vectorWritable.get().size();
 
     } finally {
-      Closeables.closeQuietly(reader);
+      Closeables.close(reader, true);
     }
   }
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/common/HadoopUtil.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/common/HadoopUtil.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/common/HadoopUtil.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/common/HadoopUtil.java Sun Jun  9 13:32:39 2013
@@ -288,7 +288,7 @@ public final class HadoopUtil {
     try {
       out.writeInt(value);
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
   }
 
@@ -298,7 +298,7 @@ public final class HadoopUtil {
     try {
       return in.readInt();
     } finally {
-      Closeables.closeQuietly(in);
+      Closeables.close(in, true);
     }
   }
 }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/common/distance/MahalanobisDistanceMeasure.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/common/distance/MahalanobisDistanceMeasure.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/common/distance/MahalanobisDistanceMeasure.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/common/distance/MahalanobisDistanceMeasure.java Sun Jun  9 13:32:39 2013
@@ -81,7 +81,7 @@ public class MahalanobisDistanceMeasure 
         try {
           inverseCovarianceMatrix.readFields(in);
         } finally {
-          Closeables.closeQuietly(in);
+          Closeables.close(in, true);
         }
         this.inverseCovarianceMatrix = inverseCovarianceMatrix.get();
         Preconditions.checkArgument(this.inverseCovarianceMatrix != null, "inverseCovarianceMatrix not initialized");
@@ -98,7 +98,7 @@ public class MahalanobisDistanceMeasure 
         try {
           meanVector.readFields(in);
         } finally {
-          Closeables.closeQuietly(in);
+          Closeables.close(in, true);
         }
         this.meanVector = meanVector.get();
         Preconditions.checkArgument(this.meanVector != null, "meanVector not initialized");

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/common/distance/WeightedDistanceMeasure.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/common/distance/WeightedDistanceMeasure.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/common/distance/WeightedDistanceMeasure.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/common/distance/WeightedDistanceMeasure.java Sun Jun  9 13:32:39 2013
@@ -77,7 +77,7 @@ public abstract class WeightedDistanceMe
         try {
           weights.readFields(in);
         } finally {
-          Closeables.closeQuietly(in);
+          Closeables.close(in, true);
         }
         this.weights = weights.get();
       }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/FileLineIterator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/FileLineIterator.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/FileLineIterator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/FileLineIterator.java Sun Jun  9 13:32:39 2013
@@ -112,7 +112,11 @@ public final class FileLineIterator exte
     try {
       line = reader.readLine();
     } catch (IOException ioe) {
-      close();
+      try {
+        close();
+      } catch (IOException e) {
+        //we are throwing here anyway, so do nothing
+      }
       throw new IllegalStateException(ioe);
     }
     return line == null ? endOfData() : line;
@@ -128,14 +132,18 @@ public final class FileLineIterator exte
         }
       }
     } catch (IOException ioe) {
-      close();
+      try {
+        close();
+      } catch (IOException e) {
+        throw new IllegalStateException(e);
+      }
     }
   }
   
   @Override
-  public void close() {
+  public void close() throws IOException {
     endOfData();
-    Closeables.closeQuietly(reader);
+    Closeables.close(reader, true);
   }
   
 }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/sequencefile/SequenceFileIterator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/sequencefile/SequenceFileIterator.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/sequencefile/SequenceFileIterator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/sequencefile/SequenceFileIterator.java Sun Jun  9 13:32:39 2013
@@ -72,10 +72,11 @@ public final class SequenceFileIterator<
   }
 
   @Override
-  public void close() {
+  public void close() throws IOException {
     key = null;
     value = null;
-    Closeables.closeQuietly(reader);
+    Closeables.close(reader, true);
+
     endOfData();
   }
 
@@ -100,7 +101,11 @@ public final class SequenceFileIterator<
       }
       return new Pair<K,V>(key, value);
     } catch (IOException ioe) {
-      close();
+      try {
+        close();
+      } catch (IOException e) {
+        //throwing next anyway
+      }
       throw new IllegalStateException(ioe);
     }
   }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/sequencefile/SequenceFileValueIterator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/sequencefile/SequenceFileValueIterator.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/sequencefile/SequenceFileValueIterator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/sequencefile/SequenceFileValueIterator.java Sun Jun  9 13:32:39 2013
@@ -61,9 +61,9 @@ public final class SequenceFileValueIter
   }
 
   @Override
-  public void close() {
+  public void close() throws IOException {
     value = null;
-    Closeables.closeQuietly(reader);
+    Closeables.close(reader, true);
     endOfData();
   }
 
@@ -80,7 +80,11 @@ public final class SequenceFileValueIter
       }
       return value;
     } catch (IOException ioe) {
-      close();
+      try {
+        close();
+      } catch (IOException e) {
+        //throw the original exception next
+      }
       throw new IllegalStateException(ioe);
     }
   }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/driver/MahoutDriver.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/driver/MahoutDriver.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/driver/MahoutDriver.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/driver/MahoutDriver.java Sun Jun  9 13:32:39 2013
@@ -212,7 +212,7 @@ public final class MahoutDriver {
         properties.load(propsStream);
         return properties;
       } finally {
-        Closeables.closeQuietly(propsStream);
+        Closeables.close(propsStream, true);
       }
     }
     return null;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthDriver.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthDriver.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthDriver.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthDriver.java Sun Jun  9 13:32:39 2013
@@ -179,9 +179,9 @@ public final class FPGrowthDriver extend
                 new StringOutputConverter(new SequenceFileOutputCollector<Text, TopKStringPatterns>(writer)),
                 new ContextStatusUpdater(null));
       } finally {
-        Closeables.closeQuietly(writer);
-        Closeables.closeQuietly(inputStream);
-        Closeables.closeQuietly(inputStreamAgain);
+        Closeables.close(writer, true);
+        Closeables.close(inputStream, true);
+        Closeables.close(inputStreamAgain, true);
       }
     } else {
       FPGrowth<String> fp = new FPGrowth<String>();
@@ -201,9 +201,9 @@ public final class FPGrowthDriver extend
                 new StringOutputConverter(new SequenceFileOutputCollector<Text, TopKStringPatterns>(writer)),
                 new ContextStatusUpdater(null));
       } finally {
-        Closeables.closeQuietly(writer);
-        Closeables.closeQuietly(inputStream);
-        Closeables.closeQuietly(inputStreamAgain);
+        Closeables.close(writer, true);
+        Closeables.close(inputStream, true);
+        Closeables.close(inputStreamAgain, true);
       }
     }
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/MatrixColumnMeansJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/MatrixColumnMeansJob.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/MatrixColumnMeansJob.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/MatrixColumnMeansJob.java Sun Jun  9 13:32:39 2013
@@ -116,7 +116,7 @@ public final class MatrixColumnMeansJob 
                                .newInstance(0);
         }
       } finally {
-        Closeables.closeQuietly(iterator);
+        Closeables.close(iterator, true);
       }
     } catch (IOException ioe) {
       throw ioe;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java Sun Jun  9 13:32:39 2013
@@ -189,7 +189,7 @@ public final class TimesSquaredJob {
     try {
       return iterator.next().get();
     } finally {
-      Closeables.closeQuietly(iterator);
+      Closeables.close(iterator, true);
     }
   }
 
@@ -221,7 +221,7 @@ public final class TimesSquaredJob {
         try {
           inputVector = iterator.next().get();
         } finally {
-          Closeables.closeQuietly(iterator);
+          Closeables.close(iterator, true);
         }
 
         int outDim = conf.getInt(OUTPUT_VECTOR_DIMENSION, Integer.MAX_VALUE);

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/DistributedLanczosSolver.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/DistributedLanczosSolver.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/DistributedLanczosSolver.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/DistributedLanczosSolver.java Sun Jun  9 13:32:39 2013
@@ -233,7 +233,7 @@ public class DistributedLanczosSolver ex
         seqWriter.append(iw, vw);
       }
     } finally {
-      Closeables.closeQuietly(seqWriter);
+      Closeables.close(seqWriter, true);
     }
   }
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/EigenVerificationJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/EigenVerificationJob.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/EigenVerificationJob.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/EigenVerificationJob.java Sun Jun  9 13:32:39 2013
@@ -211,7 +211,7 @@ public class EigenVerificationJob extend
         }
       }
     } finally {
-      Closeables.closeQuietly(seqWriter);
+      Closeables.close(seqWriter, true);
     }
     cleanedEigensPath = path;
   }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/HdfsBackedLanczosState.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/HdfsBackedLanczosState.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/HdfsBackedLanczosState.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/decomposer/HdfsBackedLanczosState.java Sun Jun  9 13:32:39 2013
@@ -148,7 +148,7 @@ public class HdfsBackedLanczosState exte
           IntWritable.class, VectorWritable.class);
       writer.append(new IntWritable(key), new VectorWritable(vector));
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
   }
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/similarity/cooccurrence/Vectors.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/similarity/cooccurrence/Vectors.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/similarity/cooccurrence/Vectors.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/similarity/cooccurrence/Vectors.java Sun Jun  9 13:32:39 2013
@@ -142,7 +142,7 @@ public final class Vectors {
       vectorWritable.setWritesLaxPrecision(laxPrecision);
       vectorWritable.write(out);
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
   }
 
@@ -152,7 +152,7 @@ public final class Vectors {
     try {
       return readAsIntMap(in);
     } finally {
-      Closeables.closeQuietly(in);
+      Closeables.close(in, true);
     }
   }
 
@@ -184,7 +184,7 @@ public final class Vectors {
     try {
       return VectorWritable.readVector(in);
     } finally {
-      Closeables.closeQuietly(in);
+      Closeables.close(in, true);
     }
   }
 }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SSVDHelper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SSVDHelper.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SSVDHelper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SSVDHelper.java Sun Jun  9 13:32:39 2013
@@ -81,7 +81,7 @@ public final class SSVDHelper {
       return vw.get();
 
     } finally {
-      Closeables.closeQuietly(iter);
+      Closeables.close(iter, true);
     }
   }
 
@@ -137,7 +137,7 @@ public final class SSVDHelper {
         r = new SequenceFile.Reader(fs, firstSeqFile.getPath(), conf);
         return r.getKeyClass().asSubclass(Writable.class);
       } finally {
-        Closeables.closeQuietly(r);
+        Closeables.close(r, true);
       }
     }
     throw new IOException("Unable to open input files to determine input label type.");
@@ -248,7 +248,7 @@ public final class SSVDHelper {
       return v;
 
     } finally {
-      Closeables.closeQuietly(iter);
+      Closeables.close(iter, true);
     }
 
   }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/qr/QRFirstStep.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/qr/QRFirstStep.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/qr/QRFirstStep.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/qr/QRFirstStep.java Sun Jun  9 13:32:39 2013
@@ -239,7 +239,7 @@ public class QRFirstStep implements Clos
         flushSolver();
         assert tempQw != null;
         closeables.remove(tempQw);
-        Closeables.closeQuietly(tempQw);
+        Closeables.close(tempQw, true);
       }
       flushQBlocks();
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/DictionaryVectorizer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/DictionaryVectorizer.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/DictionaryVectorizer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/DictionaryVectorizer.java Sun Jun  9 13:32:39 2013
@@ -233,7 +233,7 @@ public final class DictionaryVectorizer 
       for (Pair<Writable,Writable> record
            : new SequenceFileDirIterable<Writable,Writable>(filesPattern, PathType.GLOB, null, null, true, conf)) {
         if (currentChunkSize > chunkSizeLimit) {
-          Closeables.closeQuietly(dictWriter);
+          Closeables.close(dictWriter, true);
           chunkIndex++;
 
           chunkPath = new Path(dictionaryPathBase, DICTIONARY_FILE + chunkIndex);
@@ -250,7 +250,7 @@ public final class DictionaryVectorizer 
       }
       maxTermDimension[0] = i;
     } finally {
-      Closeables.closeQuietly(dictWriter);
+      Closeables.close(dictWriter, true);
     }
     
     return chunkPaths;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/collocations/llr/CollocMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/collocations/llr/CollocMapper.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/collocations/llr/CollocMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/collocations/llr/CollocMapper.java Sun Jun  9 13:32:39 2013
@@ -165,7 +165,7 @@ public class CollocMapper extends Mapper
       context.getCounter(Count.NGRAM_TOTAL).increment(count);
       sf.end();
     } finally {
-      Closeables.closeQuietly(sf);
+      Closeables.close(sf, true);
     }
   }
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/document/SequenceFileTokenizerMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/document/SequenceFileTokenizerMapper.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/document/SequenceFileTokenizerMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/document/SequenceFileTokenizerMapper.java Sun Jun  9 13:32:39 2013
@@ -52,7 +52,7 @@ public class SequenceFileTokenizerMapper
       }
     }
     stream.end();
-    Closeables.closeQuietly(stream);
+    Closeables.close(stream, true);
     context.write(key, document);
   }
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/pruner/PrunedPartialVectorMergeReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/pruner/PrunedPartialVectorMergeReducer.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/pruner/PrunedPartialVectorMergeReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/pruner/PrunedPartialVectorMergeReducer.java Sun Jun  9 13:32:39 2013
@@ -47,12 +47,8 @@ public class PrunedPartialVectorMergeRed
       vector.assign(value.get(), Functions.PLUS);
     }
 
-    if (normPower != PartialVectorMerger.NO_NORMALIZING) {
-      if (logNormalize) {
-        vector = vector.logNormalize(normPower);
-      } else {
-        vector = vector.normalize(normPower);
-      }
+    if (vector != null && normPower != PartialVectorMerger.NO_NORMALIZING) {
+      vector = logNormalize ? vector.logNormalize(normPower) : vector.normalize(normPower);
     }
 
     VectorWritable vectorWritable = new VectorWritable(vector);

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/term/TFPartialVectorReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/term/TFPartialVectorReducer.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/term/TFPartialVectorReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/term/TFPartialVectorReducer.java Sun Jun  9 13:32:39 2013
@@ -89,7 +89,7 @@ public class TFPartialVectorReducer exte
 
         sf.end();
       } finally {
-        Closeables.closeQuietly(sf);
+        Closeables.close(sf, true);
       }
     } else {
       for (String term : value.getEntries()) {
@@ -112,7 +112,7 @@ public class TFPartialVectorReducer exte
       VectorWritable vectorWritable = new VectorWritable(vector);
       context.write(key, vectorWritable);
     } else {
-      context.getCounter("TFParticalVectorReducer", "emptyVectorCount").increment(1);
+      context.getCounter("TFPartialVectorReducer", "emptyVectorCount").increment(1);
     }
   }
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/tfidf/TFIDFConverter.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/tfidf/TFIDFConverter.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/tfidf/TFIDFConverter.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/tfidf/TFIDFConverter.java Sun Jun  9 13:32:39 2013
@@ -223,7 +223,7 @@ public final class TFIDFConverter {
                                                                    conf)) {
 
         if (currentChunkSize > chunkSizeLimit) {
-          Closeables.closeQuietly(freqWriter);
+          Closeables.close(freqWriter, true);
           chunkIndex++;
 
           chunkPath = new Path(dictionaryPathBase, FREQUENCY_FILE + chunkIndex);
@@ -249,7 +249,7 @@ public final class TFIDFConverter {
       Long[] counts = {featureCount, vectorCount};
       return new Pair<Long[], List<Path>>(counts, chunkPaths);
     } finally {
-      Closeables.closeQuietly(freqWriter);
+      Closeables.close(freqWriter, true);
     }
   }
 

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/data/Utils.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/data/Utils.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/data/Utils.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/data/Utils.java Sun Jun  9 13:32:39 2013
@@ -243,7 +243,7 @@ public final class Utils {
         output.write('\n');
       }
     } finally {
-      Closeables.closeQuietly(output);
+      Closeables.close(output, false);
     }
   
   }

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/mapreduce/partial/PartialBuilderTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/mapreduce/partial/PartialBuilderTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/mapreduce/partial/PartialBuilderTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/classifier/df/mapreduce/partial/PartialBuilderTest.java Sun Jun  9 13:32:39 2013
@@ -74,7 +74,7 @@ public final class PartialBuilderTest ex
         writer.append(keys[index], values[index]);
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     // load the output and make sure its valid

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/classifier/naivebayes/NaiveBayesTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/naivebayes/NaiveBayesTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/classifier/naivebayes/NaiveBayesTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/classifier/naivebayes/NaiveBayesTest.java Sun Jun  9 13:32:39 2013
@@ -80,7 +80,7 @@ public class NaiveBayesTest extends Maho
       writer.append(LABEL_NOT_STOLEN, trainingInstance(COLOR_RED, TYPE_SUV, ORIGIN_IMPORTED));
       writer.append(LABEL_STOLEN, trainingInstance(COLOR_RED, TYPE_SPORTS, ORIGIN_IMPORTED));
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
   }
 

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/classifier/sgd/ModelSerializerTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/sgd/ModelSerializerTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/classifier/sgd/ModelSerializerTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/classifier/sgd/ModelSerializerTest.java Sun Jun  9 13:32:39 2013
@@ -45,7 +45,7 @@ public final class ModelSerializerTest e
     try {
       PolymorphicWritable.write(dos, m);
     } finally {
-      Closeables.closeQuietly(dos);
+      Closeables.close(dos, true);
     }
     return PolymorphicWritable.read(new DataInputStream(new ByteArrayInputStream(buf.toByteArray())), clazz);
   }

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/clustering/ClusteringTestUtils.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/ClusteringTestUtils.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/clustering/ClusteringTestUtils.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/clustering/ClusteringTestUtils.java Sun Jun  9 13:32:39 2013
@@ -65,7 +65,7 @@ public final class ClusteringTestUtils {
         writer.append(intWritable ? new IntWritable(recNum++) : new LongWritable(recNum++), point);
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
   }
 

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/TestCanopyCreation.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/TestCanopyCreation.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/TestCanopyCreation.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/TestCanopyCreation.java Sun Jun  9 13:32:39 2013
@@ -349,7 +349,7 @@ public final class TestCanopyCreation ex
       assertTrue("center "+c+" not found", findAndRemove(c, refCenters, EPSILON));
       assertFalse("more to come", reader.next(key, clusterWritable));
     } finally {
-      Closeables.closeQuietly(reader);
+      Closeables.close(reader, true);
     }
   }
 
@@ -406,7 +406,7 @@ public final class TestCanopyCreation ex
       assertTrue("center "+c+" not found", findAndRemove(c, refCenters, EPSILON));
       assertFalse("more to come", reader.next(key, clusterWritable));
     } finally {
-      Closeables.closeQuietly(reader);
+      Closeables.close(reader, true);
     }
   }
 

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/clustering/dirichlet/TestMapReduce.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/dirichlet/TestMapReduce.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/clustering/dirichlet/TestMapReduce.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/clustering/dirichlet/TestMapReduce.java Sun Jun  9 13:32:39 2013
@@ -193,7 +193,7 @@ public final class TestMapReduce extends
     try {
       inverseCovarianceMatrix.write(out);
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
     
     Path meanVectorFile = new Path(getTestTempDirPath("mahalanobis"), "MahalanobisDistanceMeasureMeanVectorFile");
@@ -204,7 +204,7 @@ public final class TestMapReduce extends
     try {
       meanVectorWritable.write(out);
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
     
     conf.set("MahalanobisDistanceMeasure.maxtrixClass", MatrixWritable.class.getName());
@@ -256,7 +256,7 @@ public final class TestMapReduce extends
     try {
       inverseCovarianceMatrix.write(out);
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
     
     Path meanVectorFile = new Path(getTestTempDirPath("mahalanobis"), "MahalanobisDistanceMeasureMeanVectorFile");
@@ -267,7 +267,7 @@ public final class TestMapReduce extends
     try {
       meanVectorWritable.write(out);
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
     
     conf.set("MahalanobisDistanceMeasure.maxtrixClass", MatrixWritable.class.getName());

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/clustering/fuzzykmeans/TestFuzzyKmeansClustering.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/fuzzykmeans/TestFuzzyKmeansClustering.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/clustering/fuzzykmeans/TestFuzzyKmeansClustering.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/clustering/fuzzykmeans/TestFuzzyKmeansClustering.java Sun Jun  9 13:32:39 2013
@@ -83,7 +83,7 @@ public final class TestFuzzyKmeansCluste
           writer.append(new Text(cluster.getIdentifier()), cluster);
         }
       } finally {
-        Closeables.closeQuietly(writer);
+        Closeables.close(writer, true);
       }
 
       // now run the Job using the run() command line options.
@@ -156,7 +156,7 @@ public final class TestFuzzyKmeansCluste
 
         }
       } finally {
-        Closeables.closeQuietly(writer);
+        Closeables.close(writer, true);
       }
 
       // now run the Job using the run() command line options.

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java Sun Jun  9 13:32:39 2013
@@ -146,7 +146,7 @@ public final class TestKmeansClustering 
           writer.append(new Text(cluster.getIdentifier()), cluster);
         }
       } finally {
-        Closeables.closeQuietly(writer);
+        Closeables.close(writer, true);
       }
       // now run the Job
       Path outputPath = getTestTempDirPath("output");
@@ -203,7 +203,7 @@ public final class TestKmeansClustering 
           writer.append(new Text(cluster.getIdentifier()), cluster);
         }
       } finally {
-        Closeables.closeQuietly(writer);
+        Closeables.close(writer, true);
       }
       // now run the Job
       Path outputPath = getTestTempDirPath("output");

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/common/MahoutTestCase.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/common/MahoutTestCase.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/common/MahoutTestCase.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/common/MahoutTestCase.java Sun Jun  9 13:32:39 2013
@@ -142,7 +142,7 @@ public abstract class MahoutTestCase ext
         writer.write('\n');
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
   }
 }

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthTest.java Sun Jun  9 13:32:39 2013
@@ -72,7 +72,7 @@ public final class FPGrowthTest extends 
         new StringOutputConverter(new SequenceFileOutputCollector<Text,TopKStringPatterns>(writer)),
         new ContextStatusUpdater(null));
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     List<Pair<String, TopKStringPatterns>> frequentPatterns = FPGrowth.readFrequentPattern(conf, path);
@@ -115,7 +115,7 @@ public final class FPGrowthTest extends 
           new StringOutputConverter(new SequenceFileOutputCollector<Text,TopKStringPatterns>(writer)),
           new ContextStatusUpdater(null));
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     List<Pair<String, TopKStringPatterns>> frequentPatterns = FPGrowth.readFrequentPattern(conf, path);
@@ -153,7 +153,7 @@ public final class FPGrowthTest extends 
           new StringOutputConverter(new SequenceFileOutputCollector<Text,TopKStringPatterns>(writer)),
           new ContextStatusUpdater(null));
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     List<Pair<String, TopKStringPatterns>> frequentPatterns = FPGrowth.readFrequentPattern(conf, path);

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthTest2.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthTest2.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthTest2.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/FPGrowthTest2.java Sun Jun  9 13:32:39 2013
@@ -72,7 +72,7 @@ public final class FPGrowthTest2 extends
         new StringOutputConverter(new SequenceFileOutputCollector<Text,TopKStringPatterns>(writer)),
         new ContextStatusUpdater(null));
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     List<Pair<String, TopKStringPatterns>> frequentPatterns = FPGrowthObj.readFrequentPattern(conf, path);
@@ -115,7 +115,7 @@ public final class FPGrowthTest2 extends
           new StringOutputConverter(new SequenceFileOutputCollector<Text,TopKStringPatterns>(writer)),
           new ContextStatusUpdater(null));
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     List<Pair<String, TopKStringPatterns>> frequentPatterns = FPGrowthObj.readFrequentPattern(conf, path);
@@ -153,7 +153,7 @@ public final class FPGrowthTest2 extends
           new StringOutputConverter(new SequenceFileOutputCollector<Text,TopKStringPatterns>(writer)),
           new ContextStatusUpdater(null));
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     List<Pair<String, TopKStringPatterns>> frequentPatterns = FPGrowthObj.readFrequentPattern(conf, path);

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTest.java Sun Jun  9 13:32:39 2013
@@ -84,7 +84,7 @@ public class PFPGrowthRetailDataTest ext
       }
       
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
   }
   

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTest2.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTest2.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTest2.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTest2.java Sun Jun  9 13:32:39 2013
@@ -84,7 +84,7 @@ public class PFPGrowthRetailDataTest2 ex
       }
       
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
   }
   

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTestVs.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTestVs.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTestVs.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthRetailDataTestVs.java Sun Jun  9 13:32:39 2013
@@ -94,7 +94,7 @@ public final class PFPGrowthRetailDataTe
       }
       
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
   }
   

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthSynthDataTest2.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthSynthDataTest2.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthSynthDataTest2.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthSynthDataTest2.java Sun Jun  9 13:32:39 2013
@@ -87,7 +87,7 @@ public class PFPGrowthSynthDataTest2 ext
       }
       
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
   }
 

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthTest.java Sun Jun  9 13:32:39 2013
@@ -74,7 +74,7 @@ public final class PFPGrowthTest extends
         writer.write("\n");
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
     
   }

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthTest2.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthTest2.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthTest2.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/fpm/pfpgrowth/PFPGrowthTest2.java Sun Jun  9 13:32:39 2013
@@ -75,7 +75,7 @@ public final class PFPGrowthTest2 extend
         writer.write("\n");
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
     
   }

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/math/MatrixWritableTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/math/MatrixWritableTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/math/MatrixWritableTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/math/MatrixWritableTest.java Sun Jun  9 13:32:39 2013
@@ -116,7 +116,7 @@ public final class MatrixWritableTest ex
 		try {
 			toWrite.write(dos);
 		} finally {
-			Closeables.closeQuietly(dos);
+			Closeables.close(dos, true);
 		}
 
 		ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
@@ -124,7 +124,7 @@ public final class MatrixWritableTest ex
 		try {
 			toRead.readFields(dis);
 		} finally {
-			Closeables.closeQuietly(dis);
+			Closeables.close(dis, true);
 		}
 	}
 

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/math/hadoop/MathHelper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/math/hadoop/MathHelper.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/math/hadoop/MathHelper.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/math/hadoop/MathHelper.java Sun Jun  9 13:32:39 2013
@@ -189,7 +189,7 @@ public final class MathHelper {
         writer.append(new IntWritable(n), new VectorWritable(v));
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
   }
 

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/ConditionalEntropyTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/ConditionalEntropyTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/ConditionalEntropyTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/ConditionalEntropyTest.java Sun Jun  9 13:32:39 2013
@@ -53,7 +53,7 @@ public final class ConditionalEntropyTes
         writer.append(new Text(keys[i]), new Text(values[i]));
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     // run the job

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/EntropyTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/EntropyTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/EntropyTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/EntropyTest.java Sun Jun  9 13:32:39 2013
@@ -68,7 +68,7 @@ public final class EntropyTest extends M
 
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     // run the job

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/InformationGainRatioTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/InformationGainRatioTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/InformationGainRatioTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/InformationGainRatioTest.java Sun Jun  9 13:32:39 2013
@@ -45,7 +45,7 @@ public final class InformationGainRatioT
         writer.append(new Text(keys[i]), new Text(values[i]));
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     // run the job

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/InformationGainTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/InformationGainTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/InformationGainTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/math/stats/entropy/InformationGainTest.java Sun Jun  9 13:32:39 2013
@@ -45,7 +45,7 @@ public final class InformationGainTest e
         writer.append(new Text(keys[i]), new Text(values[i]));
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     // run the job

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/DictionaryVectorizerTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/DictionaryVectorizerTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/DictionaryVectorizerTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/DictionaryVectorizerTest.java Sun Jun  9 13:32:39 2013
@@ -69,7 +69,7 @@ public final class DictionaryVectorizerT
         writer.append(new Text("Document::ID::" + i), new Text(gen.getRandomDocument()));
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
   }
   

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/DocumentProcessorTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/DocumentProcessorTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/DocumentProcessorTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/DocumentProcessorTest.java Sun Jun  9 13:32:39 2013
@@ -57,7 +57,7 @@ public class DocumentProcessorTest exten
       String text2 = "and another one";
       writer.append(new Text(documentId2), new Text(text2));
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
 
     DocumentProcessor.tokenizeDocuments(input, StandardAnalyzer.class, output, configuration);

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/EncodedVectorsFromSequenceFilesTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/EncodedVectorsFromSequenceFilesTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/EncodedVectorsFromSequenceFilesTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/EncodedVectorsFromSequenceFilesTest.java Sun Jun  9 13:32:39 2013
@@ -63,7 +63,7 @@ public class EncodedVectorsFromSequenceF
         writer.append(new Text("Document::ID::" + i), new Text(gen.getRandomDocument()));
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
   }
   

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/SparseVectorsFromSequenceFilesTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/SparseVectorsFromSequenceFilesTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/SparseVectorsFromSequenceFilesTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/SparseVectorsFromSequenceFilesTest.java Sun Jun  9 13:32:39 2013
@@ -58,7 +58,7 @@ public class SparseVectorsFromSequenceFi
         writer.append(new Text("Document::ID::" + i), new Text(gen.getRandomDocument()));
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
   }
 
@@ -102,7 +102,7 @@ public class SparseVectorsFromSequenceFi
         writer.append(new Text("Document::ID::" + i), new Text(docs[i]));
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
     Path outPath = runTest(false, false, false, 2, docs.length);
     Path tfidfVectors = new Path(outPath, "tfidf-vectors");
@@ -139,7 +139,7 @@ public class SparseVectorsFromSequenceFi
         writer.append(new Text("Document::ID::" + i), new Text(docs[i]));
       }
     } finally {
-      Closeables.closeQuietly(writer);
+      Closeables.close(writer, true);
     }
     Path outPath = runTest(true, false, false, 2, docs.length);
     Path tfVectors = new Path(outPath, "tf-vectors");

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/collocations/llr/GramKeyTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/collocations/llr/GramKeyTest.java?rev=1491214&r1=1491213&r2=1491214&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/collocations/llr/GramKeyTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/vectorizer/collocations/llr/GramKeyTest.java Sun Jun  9 13:32:39 2013
@@ -85,7 +85,7 @@ public final class GramKeyTest extends M
     try {
       two.write(out);
     } finally {
-      Closeables.closeQuietly(out);
+      Closeables.close(out, true);
     }
     
     byte[] b = bout.toByteArray();
@@ -96,7 +96,7 @@ public final class GramKeyTest extends M
     try {
       one.readFields(din);
     } finally {
-      Closeables.closeQuietly(din);
+      Closeables.close(din, true);
     }
 
     assertTrue(Arrays.equals(two.getBytes(), one.getBytes()));



Mime
View raw message