Uploaded image for project: 'Mahout'
  1. Mahout
  2. MAHOUT-395

Using KMeansDriver leaves open files and can lead to FileNotFoundException - "too many open files" error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.1, 0.2, 0.3, 0.4
    • 0.4
    • classic
    • None

    Description

      KMeansDriver uses isConverged() method to determine if the k-means clustering run is complete. isConverged() has to open each SequenceFIle and read each cluster to see if the containing cluster is converged. During this process the readers are not explicitly closed, so in the case where there are a large number of sequence files opened, the driving system may run out of file handles before they are eventually implicitly reclaimed. I'm attaching a patch that explicitly closes these files as they are no longer needed to remain open.

      Attachments

        1. KMeansDriver.patch
          2 kB
          Scott Ganyo

        Activity

          People

            drew.farris Drew Farris
            scottganyo Scott Ganyo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: