lucasmoten commented on a change in pull request #4576:
URL: https://github.com/apache/nifi/pull/4576#discussion_r510366644



##########
File path: 
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/FetchS3Object.java
##########
@@ -147,6 +171,11 @@ public void onTrigger(final ProcessContext context, final 
ProcessSession session
             request = new GetObjectRequest(bucket, key, versionId);
         }
         request.setRequesterPays(requesterPays);
+        if(rangeLength != null) {

Review comment:
       At time of writing, im testing this with a small file in an s3 bucket, 
and with three different FetchS3Object calls on the same, 
   
   See this image of a flow depicting the three different FetchS3Object 
processors, which only differ in what range start and range length is requested 
   ![Screenshot from 2020-10-22 
18-02-52](https://user-images.githubusercontent.com/14304023/96913477-3365f500-1493-11eb-9e59-3a18f59e8e31.png)
   
   With the following hex representation of a file that is the source being 
retrieved ... 
   ```
   0x00000000   5B      2E      53      68      65      6C      6C      43      
6C      61      73      73      49      6E      66      6F      [.ShellClassInfo
   0x00000010   5D      0D      0A      43      4C      53      49      44      
3D      7B      36      34      35      46      46      30      ]..CLSID={645FF0
   0x00000020   34      30      2D      35      30      38      31      2D      
31      30      31      42      2D      39      46      30      40-5081-101B-9F0
   0x00000030   38      2D      30      30      41      41      30      30      
32      46      39      35      34      45      7D      0D      8-00AA002F954E}.
   0x00000040   0A      4C      6F      63      61      6C      69      7A      
65      64      52      65      73      6F      75      72      .LocalizedResour
   0x00000050   63      65      4E      61      6D      65      3D      40      
25      53      79      73      74      65      6D      52      ceName=@%SystemR
   0x00000060   6F      6F      74      25      5C      73      79      73      
74      65      6D      33      32      5C      73      68      oot%\system32\sh
   0x00000070   65      6C      6C      33      32      2E      64      6C      
6C      2C      2D      38      39      36      34      0D      ell32.dll,-8964.
   0x00000080   0A      .
   ```
   
   from left to right ...
   - start 0, length 0 ... yields 1 byte ... viewing queue in nifi, content in 
hex mode has   `0x00000000    5B  10    [.`
     - Im not sure whether this should error (returning nothing), or return the 
entire file?
   - start 0, length 1 ... yields 2 bytes .. viewing queue in nifi, content in 
hex mode has  `0x00000000    5B  2E    [.`
     - I was expecting this to return `5B`
   - start 1, length 1 ... yields 2 bytes .. viewing queue in nifi, content in 
hex mode has  `0x00000000    2E  53    .S`
     - I was expecting this to return `2E`
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to