NIFI-4826 - Fixed azure.blobname in ListAzureBlobStorage

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

This closes #2440.
This commit is contained in:
zenfenan 2018-01-29 15:22:32 +05:30 committed by Pierre Villard
parent 4df3eb567d
commit 9bc00b6b64
2 changed files with 15 additions and 1 deletions

View File

@ -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())

View File

@ -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