Github user arunmahadevan commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1123#discussion_r53427904
  
    --- Diff: 
storm-core/src/jvm/org/apache/storm/metric/FileBasedEventLogger.java ---
    @@ -79,26 +80,18 @@ public void run() {
     
         @Override
         public void prepare(Map stormConf, TopologyContext context) {
    -        String logDir; // storm local directory
             String stormId = context.getStormId();
             int port = context.getThisWorkerPort();
    -        if ((logDir = System.getProperty("storm.local.dir")) == null &&
    -                (logDir = (String)stormConf.get("storm.local.dir")) == 
null) {
    -            String msg = "Could not determine the directory to log 
events.";
    -            LOG.error(msg);
    -            throw new RuntimeException(msg);
    -        } else {
    -            LOG.info("FileBasedEventLogger log directory {}.", logDir);
    -        }
    +
    +        String workersArtifactRoot = 
ConfigUtils.workerArtifactsRoot(stormConf, stormId, port);
     
             /*
              * Include the topology name & worker port in the file name so that
              * multiple event loggers can log independently.
              */
    -        Path path = Paths.get(logDir, "workers-artifacts", stormId, 
Integer.toString(port), "events.log");
    +        Path path = Paths.get(workersArtifactRoot, "events.log");
             if (!path.isAbsolute()) {
    --- End diff --
    
    
[ConfigUtils](https://github.com/apache/storm/blob/master/storm-core/src/jvm/org/apache/storm/utils/ConfigUtils.java#L407)
 appears to take care of the relative path, so this check could be removed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to