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

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

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

    https://github.com/apache/nifi/pull/419#discussion_r62421129
  
    --- Diff: 
nifi-nar-bundles/nifi-site-to-site-reporting-bundle/nifi-site-to-site-reporting-task/src/main/java/org/apache/nifi/reporting/AbstractSiteToSiteReportingTask.java
 ---
    @@ -0,0 +1,168 @@
    +/*
    + * 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.reporting;
    +
    +import org.apache.nifi.annotation.lifecycle.OnScheduled;
    +import org.apache.nifi.annotation.lifecycle.OnStopped;
    +import org.apache.nifi.components.PropertyDescriptor;
    +import org.apache.nifi.components.ValidationContext;
    +import org.apache.nifi.components.ValidationResult;
    +import org.apache.nifi.components.Validator;
    +import org.apache.nifi.controller.ConfigurationContext;
    +import org.apache.nifi.events.EventReporter;
    +import org.apache.nifi.processor.util.StandardValidators;
    +import org.apache.nifi.remote.client.SiteToSiteClient;
    +import org.apache.nifi.ssl.SSLContextService;
    +
    +import javax.net.ssl.SSLContext;
    +import java.io.IOException;
    +import java.net.URL;
    +import java.util.ArrayList;
    +import java.util.List;
    +import java.util.concurrent.TimeUnit;
    +
    +/**
    + * Base class for ReportingTasks that send data over site-to-site.
    + */
    +public abstract class AbstractSiteToSiteReportingTask extends 
AbstractReportingTask {
    +
    +    static final PropertyDescriptor DESTINATION_URL = new 
PropertyDescriptor.Builder()
    +            .name("Destination URL")
    +            .description("The URL to send the Provenance Events to. For 
example, to send to a NiFi instance running " +
    +                    "at http://localhost:8080/nifi this value should be 
http://localhost:8080";)
    +            .required(true)
    --- End diff --
    
    May I ask why you request the destination without "/nifi", but then you add 
"/nifi" to make a destinationUrl variable on line 130?  I found this slightly 
confusing while testing, mostly because I was also troubleshooting my own 
destination site-to-site configuration.  It works fine as-is.  But I noticed 
that Remote Process Groups ask for the remote URL in the form of 
"https://remotehost:8080/nifi";, and I think there may be some simplicity in 
copying that pattern.


> Add ReportingTask for sending provenance events over Site-To-Site
> -----------------------------------------------------------------
>
>                 Key: NIFI-1858
>                 URL: https://issues.apache.org/jira/browse/NIFI-1858
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>            Priority: Minor
>             Fix For: 0.7.0
>
>
> Currently if someone wants to export Provenance events they can do so through 
> a ReportingTask. Rather than creating specialized ReportingTasks for 
> different destinations, another approach would be to send provenance events 
> to another NiFi instance over site-to-site and then use the standard 
> processors  in that other instance to store the events in the desired 
> destination.



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

Reply via email to