Mahout
  1. Mahout
  2. MAHOUT-717

LDAPrintTopics only prints first topic when outputting to stdout

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.5
    • Fix Version/s: 0.6
    • Component/s: None
    • Labels:
      None

      Description

      LDAPrintTopics uses a PrintWriter to output topics.
      This PrintWriter wraps a File when an output directory is specified and System.out otherwise.
      This PrintWriter is closed and recreated for each topic; which doesn't work for the System.out case (since it closes System.out)
      Fix is to flush the stream and close only in the output directory case.

        Activity

        Mat Kelcey created issue -
        Mat Kelcey made changes -
        Field Original Value New Value
        Attachment mahout-717.patch [ 12481042 ]
        Mat Kelcey made changes -
        Attachment mahout-717.patch [ 12481042 ]
        Mat Kelcey made changes -
        Attachment mahout-717.patch [ 12481043 ]
        Mat Kelcey made changes -
        Summary LADPrintTopics only prints first topic when outputting to stdout LDAPrintTopics only prints first topic when outputting to stdout
        Hide
        Sean Owen added a comment -

        Looks like someone already fixed this actually – I see new logic to only close if "!printToSystemOut"

        Show
        Sean Owen added a comment - Looks like someone already fixed this actually – I see new logic to only close if "!printToSystemOut"
        Sean Owen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Sean Owen [ srowen ]
        Fix Version/s 0.6 [ 12316364 ]
        Resolution Fixed [ 1 ]
        Hide
        Sebastian Schelter added a comment -

        Seems like I accidentally fixed this

        Show
        Sebastian Schelter added a comment - Seems like I accidentally fixed this
        Sean Owen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        4d 4h 1m 1 Sean Owen 05/Jun/11 10:39
        Resolved Resolved Closed Closed
        249d 4h 21m 1 Sean Owen 09/Feb/12 14:00

          People

          • Assignee:
            Sean Owen
            Reporter:
            Mat Kelcey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development