mirror of https://github.com/apache/nifi.git
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:
parent
4df3eb567d
commit
9bc00b6b64
|
@ -106,7 +106,8 @@ public class ListAzureBlobStorage extends AbstractListProcessor<BlobInfo> {
|
||||||
attributes.put("azure.etag", entity.getEtag());
|
attributes.put("azure.etag", entity.getEtag());
|
||||||
attributes.put("azure.primaryUri", entity.getPrimaryUri());
|
attributes.put("azure.primaryUri", entity.getPrimaryUri());
|
||||||
attributes.put("azure.secondaryUri", entity.getSecondaryUri());
|
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.blobtype", entity.getBlobType());
|
||||||
attributes.put("azure.length", String.valueOf(entity.getLength()));
|
attributes.put("azure.length", String.valueOf(entity.getLength()));
|
||||||
attributes.put("azure.timestamp", String.valueOf(entity.getTimestamp()));
|
attributes.put("azure.timestamp", String.valueOf(entity.getTimestamp()));
|
||||||
|
@ -163,6 +164,7 @@ public class ListAzureBlobStorage extends AbstractListProcessor<BlobInfo> {
|
||||||
|
|
||||||
Builder builder = new BlobInfo.Builder()
|
Builder builder = new BlobInfo.Builder()
|
||||||
.primaryUri(uri.getPrimaryUri().toString())
|
.primaryUri(uri.getPrimaryUri().toString())
|
||||||
|
.blobName(cloudBlob.getName())
|
||||||
.containerName(containerName)
|
.containerName(containerName)
|
||||||
.contentType(properties.getContentType())
|
.contentType(properties.getContentType())
|
||||||
.contentLanguage(properties.getContentLanguage())
|
.contentLanguage(properties.getContentLanguage())
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class BlobInfo implements Comparable<BlobInfo>, Serializable, ListableEnt
|
||||||
private final long lastModifiedTime;
|
private final long lastModifiedTime;
|
||||||
private final long length;
|
private final long length;
|
||||||
private final String blobType;
|
private final String blobType;
|
||||||
|
private final String blobName;
|
||||||
private final String containerName;
|
private final String containerName;
|
||||||
|
|
||||||
public static long getSerialversionuid() {
|
public static long getSerialversionuid() {
|
||||||
|
@ -57,6 +58,10 @@ public class BlobInfo implements Comparable<BlobInfo>, Serializable, ListableEnt
|
||||||
return containerName;
|
return containerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBlobName() {
|
||||||
|
return blobName;
|
||||||
|
}
|
||||||
|
|
||||||
public String getEtag() {
|
public String getEtag() {
|
||||||
return etag;
|
return etag;
|
||||||
}
|
}
|
||||||
|
@ -83,6 +88,7 @@ public class BlobInfo implements Comparable<BlobInfo>, Serializable, ListableEnt
|
||||||
private long length;
|
private long length;
|
||||||
private String blobType;
|
private String blobType;
|
||||||
private String containerName;
|
private String containerName;
|
||||||
|
private String blobName;
|
||||||
|
|
||||||
public Builder primaryUri(String primaryUri) {
|
public Builder primaryUri(String primaryUri) {
|
||||||
this.primaryUri = primaryUri;
|
this.primaryUri = primaryUri;
|
||||||
|
@ -129,6 +135,11 @@ public class BlobInfo implements Comparable<BlobInfo>, Serializable, ListableEnt
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Builder blobName(String blobName) {
|
||||||
|
this.blobName = blobName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public BlobInfo build() {
|
public BlobInfo build() {
|
||||||
return new BlobInfo(this);
|
return new BlobInfo(this);
|
||||||
}
|
}
|
||||||
|
@ -180,6 +191,7 @@ public class BlobInfo implements Comparable<BlobInfo>, Serializable, ListableEnt
|
||||||
this.lastModifiedTime = builder.lastModifiedTime;
|
this.lastModifiedTime = builder.lastModifiedTime;
|
||||||
this.length = builder.length;
|
this.length = builder.length;
|
||||||
this.blobType = builder.blobType;
|
this.blobType = builder.blobType;
|
||||||
|
this.blobName = builder.blobName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue