Re: [netcdf-java] Force update with ncML

Marco,

You have a few options for doing what you describe, but you will have to balance the trade-offs for what you choose. The short answer to your last question is "no" - we cannot dynamically update - because the operating system does not send a notification to the TDS when a directory changes under Java 6. Version 5 of the TDS will use features of Java 7 that enable operating system notifications, at which point we have a plan for "dynamic" updating. Without any sort of notification from the o/s, we must poll a directory to find out if it has changed. If not too much is going on with your filesystem, then the o/s will probably cache the information and be able to respond quickly, though if your filesystem is very busy, then there is no reasonable expectation that the directory information will be cached. Thus, you must scan repeatedly to find out if a new file has shown up.

The other option for you, perhaps better, is to set up a feature collection instead of an NcML aggregation. If you have information about how or when the new files are delivered, you can specify an update element with a cron expression or set up an external trigger to update your collection without lots of extra overhead. Details are here:

http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.3/reference/collections/FeatureCollections.html

http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.3/tutorial/FeatureCollectionsTutorial.html

-Lansing

On 4/4/2013 10:19 AM, MNETO (simepar) wrote:
Helo Lansing,

The frequency of my data is 10 minutes. I would like to update whenever new data is available. It does not seem efficient refresh every 4 seconds due to the large amount of data that has to be read from the directory. Unless the ncML read only the new files added to the directory.

Then! Can not dynamically update?

Thanks for your help!


*||||   ||||||||||**|**|||  Marco Aurélio Silva Neto*
*|||| *IIIIIIIII*||**||| *Analista de Sistemas
*|||||||||||||   ||||| **Fone*: (41) 3320-2000 - Ramal: 2079
*
*


2013/4/4 Lansing Madry <madry@xxxxxxxxxxxxxxxx <mailto:madry@xxxxxxxxxxxxxxxx>>

    Good Morning Marco,

    You can set the value of recheckEvery to units of seconds.  For
    instance:

    recheckEvery="4 sec"

    Regards,
      Lansing Madry
      Unidata
      Boulder, Colorado


    On 4/4/2013 8:15 AM, MNETO (simepar) wrote:
    Good Morning,

    I use ncML.  Follows a ncML configuration file (PPI_DZ_0.ncml)
     to one data type. Although in my ncML file has the field
    "recheckEvery="1 min"", I need update my data always when a new
    data is avaliable. I don't can to wait the time of one minute for
    update.

    <netcdf
    xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";>
        <aggregation dimName="time" type="joinNew" recheckEvery="1 min">
               <variableAgg name="PPI_DZ_0"/>
               <scan location="./" suffix=".nc"
    dateFormatMark="RAD#yyMMddHHmmss"/>
      </aggregation>
    </netcdf>

    Is there any way to force update from the command line or
    configuration in file ncML?

    Thanks

    *||||   ||||||||||**|**|||  Marco Aurélio Silva Neto*
    *|||| *IIIIIIIII*||**||| *Analista de Sistemas
    *||||||||||||| ||||| **Fone*: (41) 3320-2000
    <tel:%2841%29%203320-2000> - Ramal: 2079
    *
    *


    _______________________________________________
    netcdf-java mailing list
    netcdf-java@xxxxxxxxxxxxxxxx  <mailto:netcdf-java@xxxxxxxxxxxxxxxx>
For list information or to unsubscribe, visit:http://www.unidata.ucar.edu/mailing_lists/


    _______________________________________________
    netcdf-java mailing list
    netcdf-java@xxxxxxxxxxxxxxxx <mailto:netcdf-java@xxxxxxxxxxxxxxxx>
    For list information or to unsubscribe, visit:
    http://www.unidata.ucar.edu/mailing_lists/



  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: