Adam Lally wrote:
I'm looking for opinions on what we should set the output dir
parameters to, for example for the XCAS CAS Consumer.
Right now it is c:/temp/uima/xcaswriter. Other CAS consumers have
similar settings under c:/temp/uima.
I was recently surprised to discover that the adjustExamplePaths
scripts replace "c:/temp" with "temp", so these become relative paths.
Was that intentional? I opened this as
https://issues.apache.org/jira/browse/UIMA-302.
I thought the intention was that this would be replaced by /tmp on
unix. But then again, issue
https://issues.apache.org/jira/browse/UIMA-300 shows that this might
not be such a good idea, to use a shared directory on a multi-user
system.
So maybe then, a relative path is best? We could just set the output
dir parameters to be something like "output/xcaswriter". Or does
anyone have a different suggestion?
I think we should do something, right now it is disconcerting that if
you don't run adjustExamplePaths the output goes in the absolute
c:/temp dir, but if you do run adjustExamplePaths it no longer goes
there, but in a relative directory. (When I ran into this it took me
quite a while to figure out where my output was going!)
-Adam
+1 to not have adjustSamplePaths change the Windows c:/temp to temp.
That seems wrong.
As for the larger picture - I think it would make sense to have output
from example code that the
user runs go into the "working directory" or the more global "temp" dir,
provided that some safeguards are there to prevent
overwriting some user files accidentally. This could take the form of
writing to working-dir/temp/uima-qualified-name
under the assumption that things in temp in the working dir/temp are
probably ok to overwrite, especially if
the name starts with some uima prefix that is unlikely to be
purposefully in use. (e.g., uima-example-xxxx).
If using a global /temp (in Unix) and supporting multiple users, it
seems it would be good to use some name
convention that included the user name. I realize this would prevent a
user from launching some complex
multi-threaded thing with multiple components writing to /temp - but all
this is about example defaults, I think, and
that is not a realistic example scenario (if we do a complex example
like this, we can name the output default files to have different names).
-Marshall