[GitHub] nifi pull request #2440: NIFI-4826 Fixed azure.blobname in ListAzureBlobStor...

2018-02-02 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/nifi/pull/2440


---


[GitHub] nifi pull request #2440: NIFI-4826 Fixed azure.blobname in ListAzureBlobStor...

2018-02-02 Thread pvillard31
Github user pvillard31 commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2440#discussion_r165665991
  
--- Diff: 
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/ListAzureBlobStorage.java
 ---
@@ -106,7 +106,8 @@
 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());
--- End diff --

You're right. I actually completely missed the fact that this change is for 
a processor with no input relationship... Disregard my comment.


---


[GitHub] nifi pull request #2440: NIFI-4826 Fixed azure.blobname in ListAzureBlobStor...

2018-02-02 Thread zenfenan
Github user zenfenan commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2440#discussion_r165660720
  
--- Diff: 
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/ListAzureBlobStorage.java
 ---
@@ -106,7 +106,8 @@
 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());
--- End diff --

I dint use `filename` just because to find a use for `entity.getName()` The 
filename attribute for ListAzureBlobStorage as of 1.5.0 has a large number as 
its name, much like the filenames of flowfiles generated by GenerateFlowFiles 
processor. The change here is intended to provide a meaningful filename i.e. 
the actual name of the blob.

My assumption was that people would either be updating the filename using 
UpdateAttribute/ExecuteScript (parsing the azure.primaryUri and taking the file 
name) or simply ignoring the filename altogether. In that case, this change 
won't affect, right? For ex: If people are overwriting filename attribute, 
whatever this contribution produces as a filename will still be overwritten ( I 
am again going with the assumption that they would either be parsing the 
filename from the azure.primaryUri attribute since that's the only attribute 
that provides us the blob name). If they aren't touching the filename 
attribute, then this would just produce a meaningful filename. Hope you 
understood what I'm trying to say.


---


[GitHub] nifi pull request #2440: NIFI-4826 Fixed azure.blobname in ListAzureBlobStor...

2018-02-02 Thread pvillard31
Github user pvillard31 commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2440#discussion_r165593121
  
--- Diff: 
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/ListAzureBlobStorage.java
 ---
@@ -106,7 +106,8 @@
 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());
--- End diff --

I'm a bit worried about this change. It's going to change the value of a 
core attribute (filename) that could break the behavior of existing workflows. 
I'd rather user another attribute name if we still want to have an attribute 
for ``entity.getName()``. Thoughts?


---


[GitHub] nifi pull request #2440: NIFI-4826 Fixed azure.blobname in ListAzureBlobStor...

2018-01-29 Thread zenfenan
GitHub user zenfenan opened a pull request:

https://github.com/apache/nifi/pull/2440

NIFI-4826 Fixed azure.blobname in ListAzureBlobStorage

- azure.blobname now has the value returned by CloudBlob.getName().
- Tested for blobs located in a multiple hierarchy directory structure by 
connecting ListAzureBlobStorage with FetchAzureBlobStorage with the latter 
processor's "Blob" property set to ${azure.blobname}

### For all changes:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced 
 in the commit message?

- [x] Does your PR title start with NIFI- where  is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.

- [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?

- [x] Is your initial contribution a single, squashed commit?

### For code changes:
- [x] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
- [ ] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
- [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
- [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
- [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?

### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered?

### Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zenfenan/nifi NIFI-4826

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/nifi/pull/2440.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2440


commit 194b0cf0f3414f05d41a85872347a69e7bab023e
Author: zenfenan 
Date:   2018-01-29T09:52:32Z

NIFI-4826 Fixed azure.blobname in ListAzureBlobStorage




---