amazon-s3

Oozie jobs are failing with class not found error - Class org.apache.oozie.action.hadoop.OozieLauncherOutputCommitter not found

不羁岁月 提交于 2020-01-16 08:35:06
问题 Our oozie jobs are failing with java.lang.ClassNotFoundException. Please find complete log attached. 2019-11-26 12:41:31,690 INFO [main] org.apache.hadoop.service.AbstractService: Service org.apache.hadoop.mapreduce.v2.app.MRAppMaster failed in state INITED; cause: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.oozie.action.hadoop.OozieLauncherOutputCommitter not found java.lang.RuntimeException: java.lang.RuntimeException: java.lang

Either get the id, either the bin, from after_post_process or after_save

点点圈 提交于 2020-01-16 05:07:08
问题 I've been fighting this for some time now, and your help will certainly be of much appreciation. I've built a method to sign pdf documents which you can find here, and now am only one step away from signing my file. I would like to do this asynchronously, but first i would need to understand how to do it synchronously. So I try 2 different approaches, the after post_process : after_post_process do |receipt| if receipt.receipt_file_changed? require 'aws-sdk' logger.debug("RECEIPT ID: #{self

How to move a lot of items from one S3 Amazon bucket to another?

老子叫甜甜 提交于 2020-01-15 11:43:07
问题 I have 2x S3 Amazon buckets Old stuff New stuff and I wish to move a list of 10K or so items from the Old Stuff bucket (which is just a subset of the data in that bucket) to the New Stuff bucket. I'm not sure of the best way to do this. I was thinking of leveraging their REST API but nothing stood out that could do this. Secondly, I'm not sure that their API would handle bulk moving - so then I would need some suggestions about how to best fire off 10K odd REST api requests... Any code

How to move a lot of items from one S3 Amazon bucket to another?

纵然是瞬间 提交于 2020-01-15 11:42:42
问题 I have 2x S3 Amazon buckets Old stuff New stuff and I wish to move a list of 10K or so items from the Old Stuff bucket (which is just a subset of the data in that bucket) to the New Stuff bucket. I'm not sure of the best way to do this. I was thinking of leveraging their REST API but nothing stood out that could do this. Secondly, I'm not sure that their API would handle bulk moving - so then I would need some suggestions about how to best fire off 10K odd REST api requests... Any code

Using aws-sdk to download files from s3. Encoding not right

Deadly 提交于 2020-01-15 11:28:08
问题 I am trying to use aws-sdk to load s3 files to local disk, and question why my pdf file (which just has a text saying SAMPLE PDF) turns out with an apparently empty content. I guess it has something to do with the encoding...but how can i fix it? Here is my code : require 'aws-sdk' bucket_name = "****" access_key_id = "***" secret_access_key = "**" s3=AWS::S3.new( access_key_id: access_key_id, secret_access_key: secret_access_key) b = s3.buckets[bucket_name] filen = File.basename("Sample.pdf"

Crontab cannot find AWS Credentials - linuxbox EC2

无人久伴 提交于 2020-01-15 10:08:43
问题 I've created a linux box that has a very simple make bucket command : was s3 mb s3://bucket running this from the prompt works fine. I've run AWS configure as both the user I'm logged in as and sudo. The details are definitely correct as the above wouldn't create the bucket. The error message I'm getting from cron is :make_bucket failed: s3://cronbucket/ Unable to locate credentials I've tried various things thus far with the crontab in trying to tell it where the credentials are, some of

Using IO library to load string variable as a txt file to/from s3

泪湿孤枕 提交于 2020-01-15 09:27:28
问题 I have old code below that gzips a file and stores it as json into S3, using the IO library ( so a file does not save locally). I am having trouble converting this same approach (ie using IO library for a buffer) to create a .txt file and push into S3 and later retrieve. I know how to create txt files and push into s3 is as well, but not how to use IO in the process. The value I would want to be stored in the text value would just be a variable with a string value of 'test' Goal: Use IO

Uploader produces errors regarding the column in which it should store the path

让人想犯罪 __ 提交于 2020-01-15 08:37:27
问题 An Image model has a 1:1 association with an Organization model. In the organizations controller, the create method calls on an Image model method called upload_file . def create @organization = Organization.new(new_params) if @organization.save Image.upload_file(@organization.id) end end The upload_file method uses a carrierwave uploader to store a standard file in an Amazon S3 bucket. To this end, the Image model includes mount_uploader :file_name, ImageUploader . My question is how to

awssdk_config_override.json file not found - Exception AWSSDK

和自甴很熟 提交于 2020-01-15 06:54:09
问题 I have a very simple call to just create a new AmazonS3Client (using Java AWSSDK 1.10.12) like this: AmazonS3 s3Client = new AmazonS3Client(); And during this call I'm getting the exception message from the AWSDK: Internalconfig.java - "awssdk_config_override.json file not found" Actual message: 6656 [http-bio-8080-exec-8] DEBUG com.amazonaws.internal.config.InternalConfig -Configuration override awssdk_config_override.json not found. Totally baffled what's going on here. I can currently only

How do I add or modify the Content-Disposition of an existing object in Amazon S3?

寵の児 提交于 2020-01-15 06:34:47
问题 We have hundreds of object in an AWS S3 bucket which don't have content disposition set. I'm using Ruby aws-sdk gem. How do you add or change content disposition to these objects, WITHOUT re-uploading the files again? I have tried obj.write(:content_disposition => 'attachment') obj.copy_from(obj.key, :content_disposition => 'attachment') and also copy_to(), move_to(), but none of these seem to work in adding the content disposition to the objects. In a few cases, the objects don't seem to