org.apache.storm.daemon.logviewer.handler

## Class LogviewerProfileHandler

- java.lang.Object
- - org.apache.storm.daemon.logviewer.handler.LogviewerProfileHandler

-     public class LogviewerProfileHandler
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `WORKER_LOG_FILENAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LogviewerProfileHandler(String logRoot, ResourceAuthorizer resourceAuthorizer, StormMetricsRegistry metricsRegistry)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `downloadDumpFile(String topologyId, String hostPort, String fileName, String user)` Download a dump file.
    `javax.ws.rs.core.Response` | `listDumpFiles(String topologyId, String hostPort, String user)` Enumerate dump (profile) files for given worker.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### WORKER_LOG_FILENAME

          public static final String WORKER_LOG_FILENAME

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### LogviewerProfileHandler

          public LogviewerProfileHandler(String logRoot,
                                         ResourceAuthorizer resourceAuthorizer,
                                         StormMetricsRegistry metricsRegistry)

      Constructor.

      Parameters:
        `logRoot` - worker log root directory
        `resourceAuthorizer` - `ResourceAuthorizer`
        `metricsRegistry` - The logviewer metrisc registry

  - ### Method Detail

    - #### listDumpFiles

          public javax.ws.rs.core.Response listDumpFiles(String topologyId,
                                                         String hostPort,
                                                         String user)
                                                  throws IOException

      Enumerate dump (profile) files for given worker.

      Parameters:
        `topologyId` - topology ID
        `hostPort` - host and port of worker
        `user` - username
      Returns:
        The HTML page representing list page of dump files
      Throws:
        `IOException`

    - #### downloadDumpFile

          public javax.ws.rs.core.Response downloadDumpFile(String topologyId,
                                                            String hostPort,
                                                            String fileName,
                                                            String user)
                                                     throws IOException

      Download a dump file.

      Parameters:
        `topologyId` - topology ID
        `hostPort` - host and port of worker
        `fileName` - dump file name
        `user` - username
      Returns:
        a Response which lets browsers download that file.
      Throws:
        `IOException`
      See Also:
        `org.apache.storm.daemon.logviewer.utils.LogFileDownloader#downloadFile(String, String, String, boolean)}`

Copyright © 2019 The Apache Software Foundation. All rights reserved.