@Override protected void cleanup(Context context) throws IOException, InterruptedException { IOUtils.close(closeables); }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { IOUtils.close(closeables); }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { IOUtils.close(closeables); }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { IOUtils.close(closeables); } }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { IOUtils.close(closeables); } }
@Override public void close() throws IOException { IOUtils.close(iterators); }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { IOUtils.close(closeables); } }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { IOUtils.close(closeables); } }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { IOUtils.close(closeables); } }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { IOUtils.close(closeables); } }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { IOUtils.close(closeables); }
@Override public void close() throws IOException { IOUtils.close(iterators); }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { IOUtils.close(closeables); }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { IOUtils.close(closeables); }
@Override public void close() throws IOException { IOUtils.close(iterators); }
@Override public void close() throws IOException { IOUtils.close(iterators); iterators.clear(); }
@Override public void close() throws IOException { IOUtils.close(iterators); iterators.clear(); }
@Override public void close() throws IOException { IOUtils.close(iterators); iterators.clear(); }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { try { if (sqAccum != null) { /* * hack: we will output sq partial sums with index -1 for summation. */ SparseRowBlockWritable sbrw = new SparseRowBlockWritable(1); sbrw.plusRow(0, sqAccum); LongWritable lw = new LongWritable(-1); context.write(lw, sbrw); } } finally { IOUtils.close(closeables); } }
/** * This method takes the clustered points output by the clustering algorithms as input and writes them into * their respective clusters. */ public void process() throws IOException { createPostProcessDirectory(); for (Pair<?, WeightedVectorWritable> record : new SequenceFileDirIterable<Writable, WeightedVectorWritable>(clusteredPoints, PathType.GLOB, PathFilters.partFilter(), null, false, conf)) { String clusterId = record.getFirst().toString().trim(); putVectorInRespectiveCluster(clusterId, record.getSecond()); } IOUtils.close(writersForClusters.values()); writersForClusters.clear(); }