mirror of https://github.com/apache/nifi.git
NIFI-4770 - ListAzureBlobStorage now properly writes azure.container flowfile attribute
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes #2402.
This commit is contained in:
parent
ca54186b60
commit
94eb11bfa6
|
@ -102,6 +102,7 @@ public class ListAzureBlobStorage extends AbstractListProcessor<BlobInfo> {
|
||||||
@Override
|
@Override
|
||||||
protected Map<String, String> createAttributes(BlobInfo entity, ProcessContext context) {
|
protected Map<String, String> createAttributes(BlobInfo entity, ProcessContext context) {
|
||||||
final Map<String, String> attributes = new HashMap<>();
|
final Map<String, String> attributes = new HashMap<>();
|
||||||
|
attributes.put("azure.container", entity.getContainerName());
|
||||||
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());
|
||||||
|
@ -162,6 +163,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())
|
||||||
|
.containerName(containerName)
|
||||||
.contentType(properties.getContentType())
|
.contentType(properties.getContentType())
|
||||||
.contentLanguage(properties.getContentLanguage())
|
.contentLanguage(properties.getContentLanguage())
|
||||||
.etag(properties.getEtag())
|
.etag(properties.getEtag())
|
||||||
|
|
|
@ -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 containerName;
|
||||||
|
|
||||||
public static long getSerialversionuid() {
|
public static long getSerialversionuid() {
|
||||||
return serialVersionUID;
|
return serialVersionUID;
|
||||||
|
@ -52,6 +53,10 @@ public class BlobInfo implements Comparable<BlobInfo>, Serializable, ListableEnt
|
||||||
return contentLanguage;
|
return contentLanguage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getContainerName() {
|
||||||
|
return containerName;
|
||||||
|
}
|
||||||
|
|
||||||
public String getEtag() {
|
public String getEtag() {
|
||||||
return etag;
|
return etag;
|
||||||
}
|
}
|
||||||
|
@ -77,6 +82,7 @@ public class BlobInfo implements Comparable<BlobInfo>, Serializable, ListableEnt
|
||||||
private long lastModifiedTime;
|
private long lastModifiedTime;
|
||||||
private long length;
|
private long length;
|
||||||
private String blobType;
|
private String blobType;
|
||||||
|
private String containerName;
|
||||||
|
|
||||||
public Builder primaryUri(String primaryUri) {
|
public Builder primaryUri(String primaryUri) {
|
||||||
this.primaryUri = primaryUri;
|
this.primaryUri = primaryUri;
|
||||||
|
@ -98,6 +104,11 @@ public class BlobInfo implements Comparable<BlobInfo>, Serializable, ListableEnt
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Builder containerName(String containerName) {
|
||||||
|
this.containerName = containerName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Builder etag(String etag) {
|
public Builder etag(String etag) {
|
||||||
this.etag = etag;
|
this.etag = etag;
|
||||||
return this;
|
return this;
|
||||||
|
@ -164,6 +175,7 @@ public class BlobInfo implements Comparable<BlobInfo>, Serializable, ListableEnt
|
||||||
this.secondaryUri = builder.secondaryUri;
|
this.secondaryUri = builder.secondaryUri;
|
||||||
this.contentType = builder.contentType;
|
this.contentType = builder.contentType;
|
||||||
this.contentLanguage = builder.contentLanguage;
|
this.contentLanguage = builder.contentLanguage;
|
||||||
|
this.containerName = builder.containerName;
|
||||||
this.etag = builder.etag;
|
this.etag = builder.etag;
|
||||||
this.lastModifiedTime = builder.lastModifiedTime;
|
this.lastModifiedTime = builder.lastModifiedTime;
|
||||||
this.length = builder.length;
|
this.length = builder.length;
|
||||||
|
|
Loading…
Reference in New Issue