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

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

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

    https://github.com/apache/nifi/pull/1482#discussion_r100469820
  
    --- Diff: 
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/storage/ListGCSBucket.java
 ---
    @@ -0,0 +1,407 @@
    +/*
    + * 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.gcp.storage;
    +
    +import com.google.cloud.Page;
    +import com.google.cloud.storage.Acl;
    +import com.google.cloud.storage.Blob;
    +import com.google.cloud.storage.BlobInfo;
    +import com.google.cloud.storage.Storage;
    +import com.google.common.collect.ImmutableList;
    +import org.apache.nifi.annotation.behavior.InputRequirement;
    +import org.apache.nifi.annotation.behavior.Stateful;
    +import org.apache.nifi.annotation.behavior.WritesAttribute;
    +import org.apache.nifi.annotation.behavior.WritesAttributes;
    +import org.apache.nifi.annotation.documentation.CapabilityDescription;
    +import org.apache.nifi.annotation.documentation.SeeAlso;
    +import org.apache.nifi.annotation.documentation.Tags;
    +import org.apache.nifi.components.PropertyDescriptor;
    +import org.apache.nifi.components.state.Scope;
    +import org.apache.nifi.components.state.StateMap;
    +import org.apache.nifi.flowfile.FlowFile;
    +import org.apache.nifi.flowfile.attributes.CoreAttributes;
    +import org.apache.nifi.processor.ProcessContext;
    +import org.apache.nifi.processor.ProcessSession;
    +import org.apache.nifi.processor.Relationship;
    +import org.apache.nifi.processor.exception.ProcessException;
    +import org.apache.nifi.processor.util.StandardValidators;
    +
    +import java.io.IOException;
    +import java.util.ArrayList;
    +import java.util.Collections;
    +import java.util.HashMap;
    +import java.util.HashSet;
    +import java.util.List;
    +import java.util.Map;
    +import java.util.Set;
    +import java.util.concurrent.TimeUnit;
    +import java.util.stream.Collectors;
    +
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.BUCKET_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.BUCKET_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CACHE_CONTROL_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CACHE_CONTROL_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.COMPONENT_COUNT_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.COMPONENT_COUNT_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CONTENT_DISPOSITION_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CONTENT_DISPOSITION_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CONTENT_ENCODING_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CONTENT_ENCODING_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CONTENT_LANGUAGE_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CONTENT_LANGUAGE_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CONTENT_TYPE_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CONTENT_TYPE_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CRC32C_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CRC32C_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CREATE_TIME_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.CREATE_TIME_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.ENCRYPTION_ALGORITHM_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.ENCRYPTION_ALGORITHM_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.ENCRYPTION_SHA256_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.ENCRYPTION_SHA256_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.ETAG_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.ETAG_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.GENERATED_ID_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.GENERATED_ID_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.GENERATION_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.GENERATION_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.KEY_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.KEY_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.MD5_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.MD5_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.MEDIA_LINK_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.MEDIA_LINK_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.METAGENERATION_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.METAGENERATION_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.OWNER_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.OWNER_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.OWNER_TYPE_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.OWNER_TYPE_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.SIZE_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.SIZE_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.UPDATE_TIME_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.UPDATE_TIME_DESC;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.URI_ATTR;
    +import static 
org.apache.nifi.processors.gcp.storage.StorageAttributes.URI_DESC;
    +
    +/**
    + * List objects in a google cloud storage bucket by object name pattern.
    + */
    +@InputRequirement(InputRequirement.Requirement.INPUT_ALLOWED)
    --- End diff --
    
    Did you mean this to be INPUT_ALLOWED?  It doesn't typically fit with List* 
processors, and doesn't look like you use input in onTrigger.


> Create Google Cloud Platform/Google Cloud Storage Processors
> ------------------------------------------------------------
>
>                 Key: NIFI-3449
>                 URL: https://issues.apache.org/jira/browse/NIFI-3449
>             Project: Apache NiFi
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Gene Peters
>              Labels: features
>
> Hi all,
> We had a need in our production deployments to interact with Google Cloud 
> Storage. At the time, NIFI-2809 hadn't seen much movement, and after applying 
> the patch I found that the configuration was too specific for my needs (it's 
> hardcoded to use "Application Default" credentials, everything uploaded to 
> GCS is uploaded with the "public" ACL, etc). So I created a series of 
> Processors / Controller Services based off of the AWS NiFi library, and would 
> like to contribute them. 
> Features:
> * All credentialing is handled by a controller service, allowing multiple 
> processors to use the same service / credentials
> * An Abstract processor is provided which forms the basis for all GCP related 
> processors.
> * The standard Google Cloud Storage operations are supported, very similarly 
> to the AWS S3 processors: ListGCSBucket, DeleteGCSObject, FetchGCSObject, 
> PutGCSObject
> * Everything is documented and unit tested. 
> * I've also provided integration tests, but they're disabled by default (as 
> they require Google Cloud credentials). To run them, use the flag 
> {{skipGCPIntegrationTests=false}}
> Todo:
> * The GCP Java library's ReadChannel objects implement the "restorable" 
> interface, which allows for state saving / checkpointing. I'd really like to 
> leverage this with the State support that NiFi provides, but it would require 
> serializing / deserializing the object. 
> I'm going to be submitting this as a pull request through GitHub. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to