Commit 216dc41c authored by Luciano Orsini's avatar Luciano Orsini
Browse files

references #266: elastic::timestream implementation of dynamic metadata broke...

references #266: elastic::timestream implementation of dynamic metadata broke backward compatibility
parent dca8f635
......@@ -16,9 +16,9 @@
#define WORKSUITE_ELASTICTIMESTREAM_VERSION_MAJOR 2
#define WORKSUITE_ELASTICTIMESTREAM_VERSION_MINOR 4
#define WORKSUITE_ELASTICTIMESTREAM_VERSION_PATCH 1
#define WORKSUITE_ELASTICTIMESTREAM_VERSION_PATCH 2
// If any previous versions available E.g. #define WORKSUITE_ELASTICTIMESTREAM_PREVIOUS_VERSIONS ""
#undef WORKSUITE_ELASTICTIMESTREAM_PREVIOUS_VERSIONS
#define WORKSUITE_ELASTICTIMESTREAM_PREVIOUS_VERSIONS "2.4.1"
//
// Template macros
......
......@@ -253,32 +253,33 @@ void elastic::timestream::Application::actionPerformed(xdata::Event& event)
try
{
if ( dynamicMetadata_ )
toolbox::Properties properties;
if ( httpVerbose_ )
{
toolbox::Properties properties;
if ( httpVerbose_ )
{
properties.setProperty("urn:es-api-stream:CURLOPT_VERBOSE","true");
}
if ( tcpNoDelay_ )
{
properties.setProperty("urn:es-api-stream:CURLOPT_TCP_NODELAY","true");
}
properties.setProperty("urn:es-api-stream:CURLOPT_VERBOSE","true");
}
if ( tcpNoDelay_ )
{
properties.setProperty("urn:es-api-stream:CURLOPT_TCP_NODELAY","true");
}
LOG4CPLUS_INFO(this->getApplicationLogger(), "Attaching to elastic search...");
LOG4CPLUS_INFO(this->getApplicationLogger(), "Attaching to elastic search...");
if ( (bool)(elasticsearchConnectionForbidReuse_) )
{
properties.setProperty("urn:es-api-stream:CURLOPT_FORBID_REUSE", "true");
}
if ( (bool)(elasticsearchConnectionForbidReuse_) )
{
properties.setProperty("urn:es-api-stream:CURLOPT_FORBID_REUSE", "true");
}
properties.setProperty("urn:es-api-cluster:number-of-channels", numberOfChannels_.toString());
properties.setProperty("urn:es-api-cluster:number-of-channels", numberOfChannels_.toString());
member_ = new elastic::api::Member(this, properties);
member_ = new elastic::api::Member(this, properties);
//curl -XPOST -H 'Content-Type: application/json' 'http://cmsos-iaas-cdaq.cms:9200/cmsos-meta-development-tags/_doc/_search?pretty' -d '{ "size": 1, "sort": { "timestamp": "desc"}, "query": { "match_all": {}}}'
std::string zone = this->getApplicationContext()->getDefaultZoneName();
elastic::api::Cluster& cluster = member_->joinCluster(elasticsearchClusterUrl_.toString());
//curl -XPOST -H 'Content-Type: application/json' 'http://cmsos-iaas-cdaq.cms:9200/cmsos-meta-development-tags/_doc/_search?pretty' -d '{ "size": 1, "sort": { "timestamp": "desc"}, "query": { "match_all": {}}}'
std::string zone = this->getApplicationContext()->getDefaultZoneName();
elastic::api::Cluster& cluster = member_->joinCluster(elasticsearchClusterUrl_.toString());
if ( dynamicMetadata_ )
{
if ( autoTag_ != "" ) // retrieve tag from elasticsearch
{
tag_ = "";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment