standardize system properties and data/logs/stats folders
---------------------------------------------------------
Key: CDV-677
URL: https://jira.terracotta.org/jira//browse/CDV-677
Project: Community Development
Issue Type: Bug
Reporter: Eugene Kuleshov
Assignee: Issue Review Board
Examples for maven plugin (like one in
tc-maven-plugin\examples\tc-maven-plugin-sample) are using the following
configuration in tc-config.xml
<clients>
<logs>target/terracotta/%(tc.nodeName)</logs>
Then name of tc.nodeName system property is set automatically by Maven plugin
or can be specified using:
<configuration>
<processes>
<process nodeName="master" ...
However projects generated with Maven archetypes don't use such convention and
puts logs to the user.home dir:
pojo archetype:
----
<clients>
<logs>%(user.home)/terracotta/client-logs/org.foo.fff.fff/%D</logs>
----
webapp archetype:
----
<servers>
<server name="localhost" host="localhost">
....
<data>%(user.home)/terracotta/data</data>
<logs>%(user.home)/terracotta/logs</logs>
</server>
...
</servers>
<clients>
<logs>%(user.home)/terracotta/%(tc.nodeName)</logs>
</clients>
----
Then new CVT stuff is using its own defaults for the data directories, and by
default creates bunch of folders like statistics* in the current dir. More
over, CVT is using its own system property to specify node name (tc.node-name
vs. tc.nodeName).
Here is the error message printed on console then CVT detects folder conflict:
[INFO] [dso start] 2008-03-25 19:07:51,031 ERROR -
[INFO] [dso start]
**************************************************************************************
[INFO] [dso start] The statistics store couldn't be opened at
[INFO] [dso start] 'C:\dev\terr\20spring\statistics'.
[INFO] [dso start] The CVT gathering system will not be active for this node.
[INFO] [dso start]
[INFO] [dso start] A common reason for this is that you're launching several
Terracotta L1
[INFO] [dso start] clients on the same machine. The default directory for the
statistics store
[INFO] [dso start] uses the IP address of the machine that it runs on as the
identifier.
[INFO] [dso start] When several clients are being executed on the same machine,
a typical solution
[INFO] [dso start] to properly separate these directories is by using a JVM
property at startup
[INFO] [dso start] that is unique for each client.
[INFO] [dso start]
[INFO] [dso start] For example:
[INFO] [dso start] dso-java.sh -Dtc.node-name=node1 your.main.Class
[INFO] [dso start]
[INFO] [dso start] You can then adapt the tc-config.xml file so that this JVM
property is picked
[INFO] [dso start] up when the statistics directory is configured by using
%(tc.node-name) in the
[INFO] [dso start] statistics path.
It would be really nice to have standard conventions for those folders and
system properties that would be used by default and consistent across all
components/projects.
I'd suggest to use "terracotta" dir from the project folder and have
corresponding subfolders in it. For example, something like this:
terracotta/
server-data/
server-logs/
server-statistics/
node1-logs/
node1-statistics/
node2-logs/
node2-statistics/
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.terracotta.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev