metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cestella <>
Subject [GitHub] incubator-metron pull request #388: METRON-610: OnlineStatisticsProvider ser...
Date Mon, 05 Dec 2016 14:57:43 GMT
GitHub user cestella opened a pull request:

    METRON-610: OnlineStatisticsProvider serialization is broken at random in the REPL

    We rely on the t-digest library version 3.1 and elasticsearch brings along 3.0. There
is a small API incompatibility between the two versions (namely the static method `TDigest.createAvlTreeDigest()`
is available in 3.1 but not 3.0).
    If the classpath for the Stellar REPL chooses the 3.0 version of the library, then deserialization
is broken.  Strictly speaking this is not a problem of the serialized form being incorrect
(we use t-digest's custom serialization), but a problem in the custom kryo serialization code
in the class. It relies on the default constructor being called and then the digest being
deserialized using the code within the t-digest library. Because the default constructor initializes
the digest via a call that does not exist in 3.0, it breaks. The serialization logic is safe
to use in both versions, but the object can't be constructed in 3.0.  This fix directly instantiates
the AvlTreeDigest, which exists in both versions.

You can merge this pull request into a Git repository by running:

    $ git pull stats_serialization_bug

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #388
commit 8c8175e607fe769c7f84ca390e772b6a56dfaa7e
Author: cstella <>
Date:   2016-12-05T14:46:47Z

    t-digest library between 3.0 and 3.1 have different APIs but both treat the AVL Tree library
the same, so adjusting the call should allow us to support either version.


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message