druid icon indicating copy to clipboard operation
druid copied to clipboard

Add ability to handle s3a URIs

Open drcrallen opened this issue 10 years ago • 10 comments

More recent implementations of Hadoop's FS use s3a scheme for native Amazon library access to S3.

There are a few places in the druid code that assume a file is either s3 or s3n to use the s3 extensions.

This ask is that the uri scheme for s3a is properly handled.

drcrallen avatar Mar 28 '16 18:03 drcrallen

Is there any ETA/ release version for this feature to be implemented yet? We also need to access S3 for hadoop ingestion and always passing AWS credentials is not safe. Can it at least be hidden in the task logs?

saurabhere avatar Dec 20 '16 17:12 saurabhere

@saurabhere no ETA that I am aware of.

You should be able to work around this, though, by setting fs.s3.impl and fs.s3n.impl both to "org.apache.hadoop.fs.s3a.S3AFileSystem" and possibly setting some other properties too. That should get the system into using s3a for all s3:// and s3n:// urls, and it should be able to use your instance roles.

gianm avatar Dec 20 '16 17:12 gianm

I tried that. I got

Caused by: java.lang.ClassNotFoundException: Class org.apache.hadoop.fs.s3a.S3AFileSystem not found
	at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2101) ~[?:?]

So, I downloaded hadoop-aws-2.7.3 explicitely into hadoop-dependencies Then, i got

Caused by: java.lang.NoSuchMethodError: com.amazonaws.services.s3.transfer.TransferManagerConfiguration.setMultipartUploadThreshold(I)V
	at org.apache.hadoop.fs.s3a.S3AFileSystem.initialize(S3AFileSystem.java:285) ~[?:?]
	at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2669) ~[?:?]

This takes me to https://issues.apache.org/jira/browse/HADOOP-12420 Then I tried copying aws-java-sdk-1.7.4 to the hadoop-dependencies in vain. Is there something else I can do?

saurabhere avatar Dec 20 '16 18:12 saurabhere

So, I built my own version of hadoop-aws-2.7.3 by changing the aws-java-sdk version dependency to 1.10.21 and updating the call to TransferManagerConfiguration.setMultipartUploadThreshold(L), and it works smoothly. Thanks @gianm for the vote of confidence. :grin:

saurabhere avatar Dec 21 '16 16:12 saurabhere

Yay 😄

I'd like to add official support for this at some point but I'm glad you found a workaround.

gianm avatar Dec 21 '16 16:12 gianm

+1

robertervin avatar Feb 25 '17 22:02 robertervin

related to https://github.com/druid-io/druid/pull/3940

b-slim avatar Feb 26 '17 03:02 b-slim

@drcrallen shouldn't it be closed now?

dene14 avatar Mar 06 '19 10:03 dene14

This issue has been marked as stale due to 280 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

stale[bot] avatar Jul 25 '20 04:07 stale[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

stale[bot] avatar Aug 23 '20 00:08 stale[bot]