Repository: nifi
Updated Branches:
  refs/heads/master 4df3eb567 -> 9bc00b6b6


NIFI-4826 - Fixed azure.blobname in ListAzureBlobStorage

Signed-off-by: Pierre Villard <pierre.villard...@gmail.com>

This closes #2440.


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/9bc00b6b
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/9bc00b6b
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/9bc00b6b

Branch: refs/heads/master
Commit: 9bc00b6b6475a0bc65dea4c1d299b583cd50bea9
Parents: 4df3eb5
Author: zenfenan <sivaprasanna...@gmail.com>
Authored: Mon Jan 29 15:22:32 2018 +0530
Committer: Pierre Villard <pierre.villard...@gmail.com>
Committed: Fri Feb 2 15:59:54 2018 +0100

----------------------------------------------------------------------
 .../processors/azure/storage/ListAzureBlobStorage.java  |  4 +++-
 .../nifi/processors/azure/storage/utils/BlobInfo.java   | 12 ++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/9bc00b6b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/ListAzureBlobStorage.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/ListAzureBlobStorage.java
 
b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/ListAzureBlobStorage.java
index b9c1ecb..cdbb59a 100644
--- 
a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/ListAzureBlobStorage.java
+++ 
b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/ListAzureBlobStorage.java
@@ -106,7 +106,8 @@ public class ListAzureBlobStorage extends 
AbstractListProcessor<BlobInfo> {
         attributes.put("azure.etag", entity.getEtag());
         attributes.put("azure.primaryUri", entity.getPrimaryUri());
         attributes.put("azure.secondaryUri", entity.getSecondaryUri());
-        attributes.put("azure.blobname", entity.getName());
+        attributes.put("azure.blobname", entity.getBlobName());
+        attributes.put("filename", entity.getName());
         attributes.put("azure.blobtype", entity.getBlobType());
         attributes.put("azure.length", String.valueOf(entity.getLength()));
         attributes.put("azure.timestamp", 
String.valueOf(entity.getTimestamp()));
@@ -163,6 +164,7 @@ public class ListAzureBlobStorage extends 
AbstractListProcessor<BlobInfo> {
 
                     Builder builder = new BlobInfo.Builder()
                                               
.primaryUri(uri.getPrimaryUri().toString())
+                                              .blobName(cloudBlob.getName())
                                               .containerName(containerName)
                                               
.contentType(properties.getContentType())
                                               
.contentLanguage(properties.getContentLanguage())

http://git-wip-us.apache.org/repos/asf/nifi/blob/9bc00b6b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/BlobInfo.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/BlobInfo.java
 
b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/BlobInfo.java
index 36fb1df..6343dc8 100644
--- 
a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/BlobInfo.java
+++ 
b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/BlobInfo.java
@@ -31,6 +31,7 @@ public class BlobInfo implements Comparable<BlobInfo>, 
Serializable, ListableEnt
     private final long lastModifiedTime;
     private final long length;
     private final String blobType;
+    private final String blobName;
     private final String containerName;
 
     public static long getSerialversionuid() {
@@ -57,6 +58,10 @@ public class BlobInfo implements Comparable<BlobInfo>, 
Serializable, ListableEnt
         return containerName;
     }
 
+    public String getBlobName() {
+        return blobName;
+    }
+
     public String getEtag() {
         return etag;
     }
@@ -83,6 +88,7 @@ public class BlobInfo implements Comparable<BlobInfo>, 
Serializable, ListableEnt
         private long length;
         private String blobType;
         private String containerName;
+        private String blobName;
 
         public Builder primaryUri(String primaryUri) {
             this.primaryUri = primaryUri;
@@ -129,6 +135,11 @@ public class BlobInfo implements Comparable<BlobInfo>, 
Serializable, ListableEnt
             return this;
         }
 
+        public Builder blobName(String blobName) {
+            this.blobName = blobName;
+            return this;
+        }
+
         public BlobInfo build() {
             return new BlobInfo(this);
         }
@@ -180,6 +191,7 @@ public class BlobInfo implements Comparable<BlobInfo>, 
Serializable, ListableEnt
         this.lastModifiedTime = builder.lastModifiedTime;
         this.length = builder.length;
         this.blobType = builder.blobType;
+        this.blobName = builder.blobName;
     }
 
     @Override

Reply via email to