You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Adam Lally <al...@alum.rpi.edu> on 2007/02/12 17:54:05 UTC

What should default output dir for example CAS Consumers be?

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

Re: What should default output dir for example CAS Consumers be?

Posted by Thilo Goetz <tw...@gmx.de>.
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.
...

My 2 cents: as somebody not familiar with the workings of our previous 
behavior, the working directory is the first place I'd be looking for 
output.  It is pretty much the only place I'd think to look before I'd 
have to take a look at the documentation ;-)

--Thilo


Re: What should default output dir for example CAS Consumers be?

Posted by Marshall Schor <ms...@schor.com>.
Adam Lally wrote:
> On 2/12/07, Marshall Schor <ms...@schor.com> wrote:
>> 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).
>>
>
> I went with changing c:/temp/uima/xxxx to temp-uima-output/xxxx, where
> xxxx identifies the CAS Consumer and is unchanged from previous
> versions.  I think that's good enough for now.  And I removed the line
> from adjustExamplePaths that replace C:/temp with temp.
>
> -Adam

+1 -Marshall

Re: What should default output dir for example CAS Consumers be?

Posted by Adam Lally <al...@alum.rpi.edu>.
On 2/12/07, Marshall Schor <ms...@schor.com> wrote:
> 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).
>

I went with changing c:/temp/uima/xxxx to temp-uima-output/xxxx, where
xxxx identifies the CAS Consumer and is unchanged from previous
versions.  I think that's good enough for now.  And I removed the line
from adjustExamplePaths that replace C:/temp with temp.

-Adam

Re: What should default output dir for example CAS Consumers be?

Posted by Marshall Schor <ms...@schor.com>.
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