streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (STREAMS-134) Complete percolate tagger
Date Tue, 05 Aug 2014 13:13:12 GMT

    [ https://issues.apache.org/jira/browse/STREAMS-134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14086240#comment-14086240
] 

ASF GitHub Bot commented on STREAMS-134:
----------------------------------------

Github user mfranklin commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/61#discussion_r15810478
  
    --- Diff: streams-contrib/streams-persist-elasticsearch/src/main/java/org/apache/streams/elasticsearch/ElasticsearchConfigurator.java
---
    @@ -78,28 +78,14 @@ public static ElasticsearchReaderConfiguration detectReaderConfiguration(Config
     
         public static ElasticsearchWriterConfiguration detectWriterConfiguration(Config elasticsearch)
{
     
    -        ElasticsearchConfiguration elasticsearchConfiguration = detectConfiguration(elasticsearch);
    -        ElasticsearchWriterConfiguration elasticsearchWriterConfiguration = mapper.convertValue(elasticsearchConfiguration,
ElasticsearchWriterConfiguration.class);
    -
    -        String index = elasticsearch.getString("index");
    -        String type = elasticsearch.getString("type");
    -        Long maxMsBeforeFlush = elasticsearch.hasPath("MaxTimeBetweenFlushMs") ? elasticsearch.getLong("MaxTimeBetweenFlushMs")
: null;
    -
    -        if( elasticsearch.hasPath("bulk"))
    -            elasticsearchWriterConfiguration.setBulk(elasticsearch.getBoolean("bulk"));
    -
    -        if( elasticsearch.hasPath("batchSize"))
    -            elasticsearchWriterConfiguration.setBatchSize(elasticsearch.getLong("batchSize"));
    -
    -        if( elasticsearch.hasPath("batchBytes"))
    -            elasticsearchWriterConfiguration.setBatchBytes(elasticsearch.getLong("batchBytes"));
    -
    -
    -        elasticsearchWriterConfiguration.setIndex(index);
    -        elasticsearchWriterConfiguration.setType(type);
    -        elasticsearchWriterConfiguration.setMaxTimeBetweenFlushMs(maxMsBeforeFlush);
    -
    +        ElasticsearchWriterConfiguration elasticsearchWriterConfiguration = null;
     
    +        try {
    +            elasticsearchWriterConfiguration = mapper.readValue(elasticsearch.root().render(ConfigRenderOptions.concise()),
ElasticsearchWriterConfiguration.class);
    --- End diff --
    
    Won't this not work as the Typesafe config is not always valid JSON?


> Complete percolate tagger
> -------------------------
>
>                 Key: STREAMS-134
>                 URL: https://issues.apache.org/jira/browse/STREAMS-134
>             Project: Streams
>          Issue Type: New Feature
>            Reporter: Steve Blackmon
>
> streams-persist-elasticsearch contains an unfinished class for creating and applying
tags to documents in flight.
> complete, test, and document this feature.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message