[
https://issues.apache.org/jira/browse/STORM-1545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15153804#comment-15153804
]
ASF GitHub Bot commented on STORM-1545:
---------------------------------------
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.
> Topology Debug Event Log in Wrong Location
> ------------------------------------------
>
> Key: STORM-1545
> URL: https://issues.apache.org/jira/browse/STORM-1545
> Project: Apache Storm
> Issue Type: Bug
> Components: storm-core, storm-ui
> Affects Versions: 1.0.0
> Reporter: P. Taylor Goetz
> Labels: newbie
>
> Currently the {{events.log}} file is not created where the log viewer expects
> it so be, so the "events" link under debug in Storm UI returns a 404.
> The file should be in:
> {{$storm.log.dir/workers-artifacts/$topology_id/$port/events.log}}
> but is instead in:
> {{$storm.local.dir/workers-artifacts/$topology_id/$port/events.log}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)