| Configuring for Object Storage and HDFS / Configuring the Transfer Server for AWS S3 Private Cloud | |
Use cache-control request headers in AWS S3 to avoid repeatedly uploading or serving the same files on a per-bucket basis. For more information on cache-control options in AWS S3, see:
http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html#RESTObjectPUT-requests
# ssh -i identity_file -p 33001 ec2-user@ec2_host_ip # sudo su -
* no-cache jpg public zip
These lines set the following directives:
The file can have any name and be saved in any location. The path to the file is used to configure Trapd, and if the file is saved in /opt/aspera/etc/trapd, then in the next step you need to specify only the file name.
# Path to a file defining a 'Cache-Control' mapping. # The path can be an absolute path otherwise it's the name of a file expected to # be in /opt/aspera/etc/trapd. # The mapping defines 'Cache-Control' to be used based on the file extension: # - the special extension '*' defines a default value # - leaving the cache directive empty means that no 'Control-Cache' would be set. # - a line starting with # is a comment and is ignored. # # Example # * no-cache # jpg public # zip # would by default set a 'Cache-Control' to 'no-cache' # files ending with '.jpg' would have 'Cache-Control' set to 'public' # files ending with '.zip' would have no 'Cache-Control' set # # Default is undefined (no Cache-Control is set) #aspera.s3session.cache-control-map=
Uncomment the last line and set the value as the path to your cache-control mapping file. The path can be just the name of the file if you have saved it in /opt/aspera/etc/trapd, otherwise enter the full path to the file. For example, if the mapping file, my-cache-control.txt, is in /trapd, then the line is as follows:
aspera.s3session.cache-control-map=my-cache-control.txt
If the file has been saved elsewhere, use the full path:
aspera.s3session.cache-control-map=/user1/s3_settings/my-cache-control.txt
Save your changes.
# /etc/init.d/asperatrapd restart