HDB++ new release

Hi All,

Currently we are using hdb version 1.3 and jhdbViewer version 1.6 for data archiving. What is the new release of hdb and from where can we download it ?

Hi,

The latest development versions are available on Bintray tango-controls MAVEN repository (Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog).
Please note that the latest version of the Configurator GUI (3.0) will require the latest versions of HDB++ Configuration Manager and HDB++ Event Subscriber device servers, supporting the new TTL feature.
We are currently using hdbpp-configurator version 2.2 at the ESRF, which requires hdbpp-es and hdbpp-cm supporting archiving contexts and strategies (which should correspond to the latest release on Github. For instance you can get the latest hdbpp-cm official release on this page: Releases · tango-controls-hdbpp/hdbpp-cm · GitHub).
A new release of these device servers is in preparation (Build-And-Package branch on github HDB++ repositories: https://github.com/tango-controls/hdbpp-es/tree/Build-And-Package).
Development versions of the device servers (with the TTL feature, corresponding to Build-And-Package branches) and C++ libraries are available on Bintray too as Debian packages (See HDB++cassandra and HDB++mysql meta-packages.

Please note that these versions available as Debian packages are not yet in production at the ESRF, so you might still encounter some bugs. We will deploy the new versions in production at the ESRF in the coming weeks.

An official release is in preparation (Still need to merge Build-And-Package branches) and to move the repositories to the new (HDB++ Github organization.

Sorry for the delay in the answer and for the current lack of information/documentation. We are in the process of improving all of that and on the way to a clean and clearly defined/identified release.
Stay tuned! :wink:

Kind regards,
Reynald

Hi All,

Referring to the URL: HDB++ Java Classes

The example mentioned uses two API’s for addattribute from the ManageAttributes class. However, two methods are not found in implementation in ManageAttributes class.

Our Requirement: We should be able to start archiving for an attribute using Java Code. Can I request HDB++ Experts to help us achieve it?

When I use the following code:
HDB++ Configurator 1.5a JAR was used.

import org.Tango.hdb_configurator.configurator.HdbAttribute;
import org.Tango.hdb_configurator.configurator.ManageAttributes;
import fr.esrf.TangoDs.Except;
import fr.esrf.Tango.DevFailed;

public class MyAttributeManagement {
    public static void main (String args[]) {
        try {
            // Create a hdb attribute list
            // These attributes are pushed by the device code
            List<HdbAttribute> hdbAttributes = new ArrayList<HdbAttribute>();
            hdbAttributes.add(new HdbAttribute("test/hdb/testHdb/test", true));
            
            // Add send these attributes to an event subscriber
            String archiver = "tango/hdb/es-1";
            ManageAttributes.addAttributes(archiver, hdbAttributes);
        } catch (DevFailed e) {
            Except.print_exception(e);
        }
    }
}

I get an error saying Configuration Manager not found in the environment. Any help will be appreciated.

Hi,

I had a look at the source code for Hdb++ Configurator 1.5a.
This source code is still on Sourceforge. (The latest development version is already on tango-controls-hdbpp github organization).

In version 1.5a, ManageAttributes.addAttributes() method is actually invoking TangoUtils.getConfiguratorDeviceName() method to get the Hdb++ Configuration Manager device name.

Here is the source code for this method on line 186: https://sourceforge.net/p/tango-cs/code/HEAD/tree/archiving/hdb++/gui/java-configurator/tags/hdb_configurator-Release-1.5a/src/org/tango/hdb_configurator/common/TangoUtils.java

So it appears that this version requires to set HdbManager system property or HdbManager environment variable to the device name of your HDB++ConfigurationManager device.

export HdbManager=your_tango/hdb/manager

should help.

Kind regards,
Reynald

Hi Reynald,

Thanks for the prompt reply. I am able to start archiving with version 1.5a Configurator JAR. Trying with HDB++ Configurator 2.2 JAR seems the method for addattribute in ManageAttributes class has changed.

Hi
The configurator 2.x manage a new feature using strategies.
The methods have changed to use Strategy class as input parameter.
The documentation says:


Since release 2.0 the GUI manage the storage strategy based on contexts.
    It is compatible only with a release of HdbConfigurationManager and HdbEventSubscriber managing features too.

But on documentation, examples are not up to date.
It will be updated soon.
Pascal

Hi Pascal,

By when are we expecting the documentation to happen.
Meanwhile, if we can get an example with the new API (v2.2), would be really helpful.

Team,

Any help will be much appreciated …

Hi
I am back
The new method needs a DeviceProxy on configurator manager device as first parameter.


    //===============================================================
    /**
     *  Add a list of attributes to specified subscriber
     * @param configuratorProxy DeviceProxy on configurator manager device
     * @param subscriberName    specified subscriber device name
     * @param hdbAttributes     specified attribute to be added.
     * @throws DevFailed in case of bad subscriber name or connection failed.
     */
    //===============================================================
    public static void addAttributes(DeviceProxy configuratorProxy, String subscriberName, List<HdbAttribute> hdbAttributes) throws DevFailed {
        - - - - 
    }

Cheers
Pascal

Hi,

Thanks for your reply.
I tried with the new method but still facing error i.e.
MultiAttribute::get_attr_ind_by_name : SetStrategy attribute not found.
Could you please tell us how to use Strategy ??
It would be helpful.

Hi,

It looks like you are using an old version of the HDB++ Configuration Manager device server which is not supporting the strategies feature, and which is not compatible with the HDBConfigurator 2.2.
You should stay with HDBConfigurator 1.5a or upgrade the HDB++ConfigurationManager and HDB++ Event Subscriber device servers if you want to use strategies.

All the HDB++ related git repositories have been moved to the tango-controls-hdbpp Github organization (HDB++ · GitHub).

Cheers,
Reynald

Hello TANGOers,

New features of HDB++ are promising. I need your help in understanding these features and resolving some issues as listed below.

  • Time to Live (TTL)
  • I want to archive an attribute with TTL as 1 hour. Tried with the Configuration GUI (v2.2) but it doesn’t allow decimal value and expects value in no.of days. Is my understanding correct that we won’t be able to specify TTL in hour format using the Configuration GUI? As a workaround, I used commands on Configuration Manager device server to specify TTL as 1 hour. attr_conf table successfully reflected this change. However, the entries corresponding to the attributes were not deleted from the MySQL database. Values older than 1 hour are still reflecting. Please note that majority of the tables use MyISAM as the SQL engine. Any ideas on what I missed?
  • Further, I wish to understand how TTL feature works. How does HDB++ trigger/notify MySQL to delete the older data? I read the delete_attr stored procedure, but I was unable to locate any code/schedule calling this stored procedure.
  • LightSchema
  • Added a new row in the LibConfiguration property as lightschema=1, for Configuration Manager and Event Subscriber device servers. In order to use the lightschema, I need to remove the attribute from archiving, restart Event Subscriber and Configuration Manager device servers. Is that possible to update the lightschema property and see the change at run-time (without restarting device servers and removing the attribute)?
  • Using lightschema, I see that the values for columns insert_time, recv_time, quality, and att_error_desc_id are not updated but use their default values specified in the schema (eg: 0000-00-00 00:00:00.000000). I had expected that those columns will be dropped from the table. :stuck_out_tongue:
    As the default values are still values, I don’t think it will help significantly in reducing the data on the disk. Is it safe to alter the database schema by dropping the columns insert_time, recv_time, quality, and att_error_desc_id and using lightschema permanently?
  • Partition and Maintenance scripts
  • I read that partition and maintenance scripts are available for MySQL. Is create_hdb++_mysql_innodb.sql a partition and maintenance script? Are there any other scripts available?

Please feel free to correct me if there are any gaps in my understanding.

Kind regards,
Jyotin

Hi Jyotin,

  • TTL
    If I remember correctly, the schema expects the TTL being specified in hours: there may be a misalignement in the Configurator GUI. Be aware that just specifying the TTL dsoes not get the entries deleted, in particular when usign the MySQL backend. The current idea is not to have the ConfigurationMaganger or EventSubscriber devices triggering this action, but to periodically run a SQL script on the backend in order to have the expired data deleted. Looks like this SQL script is not on github; maybe Graziano can provide some more detail.
  • LighSchema
    Iour findings are consistent to my understanding, except that for having the EventSubscriber switch to the LightSchema a device restart should be sufficient (no need to remove the Attribute from archiving). Also in this case the archiving engine does not mess around with the pre-existing archive schema: if you want to drop those columns definitely you are supposed to drop them in the DB schema (by hand).
  • Partition and Maintenance scripts
    The one you’re referring is not a partitioning or maintenance script, but a configuration one. Just checked and partitioning scripts are not on github, maybe Sergi (from Alba), who’s been playing with this stuff, can point you to the right place.

Cheers,
Lorenzo

Hi Lorenzo,

Thank you for clarifying the understanding. I will wait for Graziano and Sergi to reply on this thread.

You are right in specifying that restart of Event Subscriber device server is enough to absorb change in lightschema property. There is no need to remove the attribute from archiving.

Kind regards,
Jyotin

Hello All,

After installing the Archiving solution with MySQL, I am trying my hand at the Extraction solution (HDB Viewer).

I have observed that HDB Viewer is not compatible with the MySQL lightschema feature. (I see database queries that expect recv_time and insert_time timestamps in the HDB Viewer source code - org.tango.jhdb.MySQLSchema and it throws a java.sql.Timestamp exception for Invalid Date format because of zeros in the aforementioned columns.)

Are there any near time plans to support HDB Viewer with the lightschema feature?

Kind regards,
Jyotin