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

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

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

    https://github.com/apache/nifi/pull/1636#discussion_r109962882
  
    --- Diff: 
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/BlobInfo.java
 ---
    @@ -0,0 +1,188 @@
    +/*
    + * 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.azure.storage.utils;
    +
    +import java.io.Serializable;
    +
    +import org.apache.nifi.processors.standard.util.ListableEntity;
    +
    +public class BlobInfo implements Comparable<BlobInfo>, Serializable, 
ListableEntity {
    +    private static final long serialVersionUID = 1L;
    +
    +    private final String primaryUri;
    +    private final String secondaryUri;
    +    private final String contentType;
    +    private final String contentLanguage;
    +    private final String etag;
    +    private final long lastModifiedTime;
    +    private final long length;
    +    private final String blobType;
    +
    +    public static long getSerialversionuid() {
    +        return serialVersionUID;
    +    }
    +
    +    public String getPrimaryUri() {
    +        return primaryUri;
    +    }
    +
    +    public String getSecondaryUri() {
    +        return secondaryUri;
    +    }
    +
    +    public String getContentType() {
    +        return contentType;
    +    }
    +
    +    public String getContentLanguage() {
    +        return contentLanguage;
    +    }
    +
    +    public String getEtag() {
    +        return etag;
    +    }
    +
    +    public long getLastModifiedTime() {
    +        return lastModifiedTime;
    +    }
    +
    +    public long getLength() {
    +        return length;
    +    }
    +
    +    public String getBlobType() {
    +        return blobType;
    +    }
    +
    +    public static final class Builder {
    +        private String primaryUri;
    +        private String secondaryUri;
    +        private String contentType;
    +        private String contentLanguage;
    +        private String etag;
    +        private long lastModifiedTime;
    +        private long length;
    +        private String blobType;
    +
    +        public Builder primaryUri(String primaryUri) {
    +            this.primaryUri = primaryUri;
    +            return this;
    +        }
    +
    +        public Builder secondaryUri(String secondaryUri) {
    +            this.secondaryUri = secondaryUri;
    +            return this;
    +        }
    +
    +        public Builder contentType(String contentType) {
    +            this.contentType = contentType;
    +            return this;
    +        }
    +
    +        public Builder contentLanguage(String contentLanguage) {
    +            this.contentLanguage = contentLanguage;
    +            return this;
    +        }
    +
    +        public Builder etag(String etag) {
    +            this.etag = etag;
    +            return this;
    +        }
    +
    +        public Builder lastModifiedTime(long lastModifiedTime) {
    +            this.lastModifiedTime = lastModifiedTime;
    +            return this;
    +        }
    +
    +        public Builder length(long length) {
    +            this.length = length;
    +            return this;
    +        }
    +
    +        public Builder blobType(String blobType) {
    +            this.blobType = blobType;
    +            return this;
    +        }
    +
    +        public BlobInfo build() {
    +            return new BlobInfo(this);
    +        }
    +
    +    }
    +
    +    @Override
    +    public int hashCode() {
    +        final int prime = 31;
    +        int result = 1;
    +        result = prime * result + ((etag == null) ? 0 : etag.hashCode());
    +        return result;
    +    }
    +
    +    @Override
    +    public boolean equals(Object obj) {
    +        if (this == obj) {
    +            return true;
    +        }
    +        if (obj == null) {
    +            return false;
    +        }
    +        if (getClass() != obj.getClass()) {
    +            return false;
    +        }
    +        BlobInfo other = (BlobInfo) obj;
    +        if (etag == null) {
    +            if (other.etag != null) {
    +                return false;
    +            }
    +        } else if (!etag.equals(other.etag)) {
    +            return false;
    +        }
    +        return true;
    +    }
    +
    +    @Override
    +    public int compareTo(BlobInfo o) {
    +        return etag.compareTo(o.etag);
    +    }
    +
    +    protected BlobInfo(final Builder builder) {
    --- End diff --
    
    With the builder being available for constructing this class, typically 
this constructor should be private.


> Add support for Azure Blob Storage and Table Storage
> ----------------------------------------------------
>
>                 Key: NIFI-1833
>                 URL: https://issues.apache.org/jira/browse/NIFI-1833
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: 0.6.1
>            Reporter: Simon Elliston Ball
>            Priority: Minor
>
> It would be useful to have an Azure equivalent of the current S3 capability. 
> Azure also provides a Table storage mechanism, providing simple key value 
> storage. Since the Azure SDKs are Apache Licensed, this should be reasonably 
> straightforward. A first cut is available as an addition to the existing 
> azure bundle.



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

Reply via email to