nifi-commits 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] (NIFI-2068) Add Elasticsearch processors that use the REST API
Date Fri, 01 Jul 2016 15:51:11 GMT

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

ASF GitHub Bot commented on NIFI-2068:
--------------------------------------

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

    https://github.com/apache/nifi/pull/576#discussion_r69319929
  
    --- Diff: nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/test/java/org/apache/nifi/processors/elasticsearch/TestFetchElasticsearchHttp.java
---
    @@ -0,0 +1,292 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.nifi.processors.elasticsearch;
    +
    +import com.squareup.okhttp.Call;
    +import com.squareup.okhttp.MediaType;
    +import com.squareup.okhttp.OkHttpClient;
    +import com.squareup.okhttp.Protocol;
    +import com.squareup.okhttp.Request;
    +import com.squareup.okhttp.Response;
    +import com.squareup.okhttp.ResponseBody;
    +import org.apache.nifi.processor.ProcessContext;
    +import org.apache.nifi.processor.exception.ProcessException;
    +import org.apache.nifi.ssl.SSLContextService;
    +import org.apache.nifi.util.MockFlowFile;
    +import org.apache.nifi.util.TestRunner;
    +import org.apache.nifi.util.TestRunners;
    +import org.junit.After;
    +import org.junit.Before;
    +import org.junit.Test;
    +import org.mockito.invocation.InvocationOnMock;
    +import org.mockito.stubbing.Answer;
    +
    +import java.io.IOException;
    +import java.io.InputStream;
    +import java.util.HashMap;
    +
    +import static org.junit.Assert.assertNotNull;
    +import static org.mockito.Matchers.any;
    +import static org.mockito.Mockito.mock;
    +import static org.mockito.Mockito.when;
    +
    +public class TestFetchElasticsearchHttp {
    +
    +    private InputStream docExample;
    +    private TestRunner runner;
    +
    +    @Before
    +    public void setUp() throws IOException {
    +        ClassLoader classloader = Thread.currentThread().getContextClassLoader();
    +        docExample = classloader.getResourceAsStream("DocumentExample.json");
    --- End diff --
    
    Is it necessary to have a document on disk? Just hesitant regarding OS issues.


> Add Elasticsearch processors that use the REST API
> --------------------------------------------------
>
>                 Key: NIFI-2068
>                 URL: https://issues.apache.org/jira/browse/NIFI-2068
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Matt Burgess
>            Assignee: Matt Burgess
>             Fix For: 1.0.0
>
>
> The current Elasticsearch processors use the Transport Client, and as a result there
can be some compatibility issues between multiple versions of ES clusters. The REST API is
much more standard between versions, so it would be nice to have ES processors that use the
REST API, to enable things like migration from an Elasticsearch cluster with an older version
to a cluster with a newer version.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message