[jira] [Commented] (CAMEL-12437) Ability to define dynamic bucket name for s3 router using standard S3Constants.BUCKET_NAME supplied in header

2018-04-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435632#comment-16435632
 ] 

ASF GitHub Bot commented on CAMEL-12437:


oscerd commented on issue #2290: CAMEL-12437
URL: https://github.com/apache/camel/pull/2290#issuecomment-380817305
 
 
   Merged on master. Thanks.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Ability to define dynamic bucket name for s3 router using standard 
> S3Constants.BUCKET_NAME supplied in header
> -
>
> Key: CAMEL-12437
> URL: https://issues.apache.org/jira/browse/CAMEL-12437
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-aws
>Affects Versions: 2.20.2
>Reporter: Aliaksandr Laptseu
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 2.22.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12437) Ability to define dynamic bucket name for s3 router using standard S3Constants.BUCKET_NAME supplied in header

2018-04-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435634#comment-16435634
 ] 

ASF GitHub Bot commented on CAMEL-12437:


Github user oscerd closed the pull request at:

https://github.com/apache/camel/pull/2290


> Ability to define dynamic bucket name for s3 router using standard 
> S3Constants.BUCKET_NAME supplied in header
> -
>
> Key: CAMEL-12437
> URL: https://issues.apache.org/jira/browse/CAMEL-12437
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-aws
>Affects Versions: 2.20.2
>Reporter: Aliaksandr Laptseu
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 2.22.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12437) Ability to define dynamic bucket name for s3 router using standard S3Constants.BUCKET_NAME supplied in header

2018-04-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435633#comment-16435633
 ] 

ASF GitHub Bot commented on CAMEL-12437:


oscerd closed pull request #2290: CAMEL-12437
URL: https://github.com/apache/camel/pull/2290
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
 
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
index df6e1c36409..2efb9904aec 100644
--- 
a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
+++ 
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
@@ -228,7 +228,12 @@ public void processSingleOp(final Exchange exchange) 
throws Exception {
 is = new ByteArrayInputStream(baos.toByteArray());
 }
 
-putObjectRequest = new 
PutObjectRequest(getConfiguration().getBucketName(), determineKey(exchange), 
is, objectMetadata);
+String bucketName = 
exchange.getIn().getHeader(S3Constants.BUCKET_NAME, String.class);
+if (bucketName == null){
+LOG.trace("Bucket name is not in header, using default one  
[{}]...", getConfiguration().getBucketName());
+bucketName = getConfiguration().getBucketName();
+}
+putObjectRequest = new PutObjectRequest(bucketName, 
determineKey(exchange), is, objectMetadata);
 
 String storageClass = determineStorageClass(exchange);
 if (storageClass != null) {


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Ability to define dynamic bucket name for s3 router using standard 
> S3Constants.BUCKET_NAME supplied in header
> -
>
> Key: CAMEL-12437
> URL: https://issues.apache.org/jira/browse/CAMEL-12437
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-aws
>Affects Versions: 2.20.2
>Reporter: Aliaksandr Laptseu
>Assignee: Andrea Cosentino
>Priority: Major
> Fix For: 2.22.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12437) Ability to define dynamic bucket name for s3 router using standard S3Constants.BUCKET_NAME supplied in header

2018-04-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435500#comment-16435500
 ] 

ASF GitHub Bot commented on CAMEL-12437:


oscerd commented on issue #2290: CAMEL-12437
URL: https://github.com/apache/camel/pull/2290#issuecomment-380794923
 
 
   Sounds reasonable. I'll merge ASAP, thanks for the moment :-)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Ability to define dynamic bucket name for s3 router using standard 
> S3Constants.BUCKET_NAME supplied in header
> -
>
> Key: CAMEL-12437
> URL: https://issues.apache.org/jira/browse/CAMEL-12437
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-aws
>Affects Versions: 2.20.2
>Reporter: Aliaksandr Laptseu
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12437) Ability to define dynamic bucket name for s3 router using standard S3Constants.BUCKET_NAME supplied in header

2018-04-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435478#comment-16435478
 ] 

ASF GitHub Bot commented on CAMEL-12437:


GitHub user alaptseu opened a pull request:

https://github.com/apache/camel/pull/2290

CAMEL-12437

I created a jira ticket for this improvement 
https://issues.apache.org/jira/browse/CAMEL-12437

Basically with current implementation (as per camel version 2.20.2) there 
is no way to provide dynamic s3 bucket name when you upload files (it's 
possible though if copying files from source bucket to destination bucket).
I think we could use S3Constants.BUCKET_NAME provided at exchange header 
and if it is set use that value as bucket name where file will be uploaded, if 
S3Constants.BUCKET_NAME is not provided then  use bucket which is preconfigured 
at configuration.



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

$ git pull https://github.com/alaptseu/camel master

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

https://github.com/apache/camel/pull/2290.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 #2290


commit 97304063ec80f448ebd7040720f27bc2b8f59d5c
Author: Laptseu 
Date:   2018-04-12T12:28:46Z

CAMEL-12437




> Ability to define dynamic bucket name for s3 router using standard 
> S3Constants.BUCKET_NAME supplied in header
> -
>
> Key: CAMEL-12437
> URL: https://issues.apache.org/jira/browse/CAMEL-12437
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-aws
>Affects Versions: 2.20.2
>Reporter: Aliaksandr Laptseu
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12437) Ability to define dynamic bucket name for s3 router using standard S3Constants.BUCKET_NAME supplied in header

2018-04-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435477#comment-16435477
 ] 

ASF GitHub Bot commented on CAMEL-12437:


alaptseu opened a new pull request #2290: CAMEL-12437
URL: https://github.com/apache/camel/pull/2290
 
 
   I created a jira ticket for this improvement 
https://issues.apache.org/jira/browse/CAMEL-12437
   
   Basically with current implementation (as per camel version 2.20.2) there is 
no way to provide dynamic s3 bucket name when you upload files (it's possible 
though if copying files from source bucket to destination bucket).
   I think we could use S3Constants.BUCKET_NAME provided at exchange header and 
if it is set use that value as bucket name where file will be uploaded, if 
S3Constants.BUCKET_NAME is not provided then  use bucket which is preconfigured 
at configuration.
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Ability to define dynamic bucket name for s3 router using standard 
> S3Constants.BUCKET_NAME supplied in header
> -
>
> Key: CAMEL-12437
> URL: https://issues.apache.org/jira/browse/CAMEL-12437
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-aws
>Affects Versions: 2.20.2
>Reporter: Aliaksandr Laptseu
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)