Skip to content

Commit 7526a9d

Browse files
committed
Merge branch 'release-1.3.23'
* release-1.3.23: Bumping version to 1.3.23 Update changelog with latest changes EMR: changed to use regionalized buckets. EMR: Support installing hive-site.xml in create-cluster and install-applications commands. Update changelog with bugfix from boto/botocore#321 Add aws#824 to the changelog Rename of elasticloadbalancing -> elb, updates from docteam Optional s3 sync flag to address timestamp issues described in aws#599
2 parents 0acbafd + edf6eb4 commit 7526a9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+443
-189
lines changed

CHANGELOG.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ CHANGELOG
33
=========
44

55

6+
1.3.23
7+
======
8+
9+
* feature:``aws support``: Update ``aws support`` command to
10+
the latest version
11+
* feature:``aws iam``: Update ``aws iam`` command to the latest
12+
version
13+
* feature:``aws emr``: Add ``--hive-site`` option to
14+
``aws emr create-cluster`` and ``aws emr install-application`` commands
15+
* feature:``aws s3 sync``: Add an ``--exact-timestamps`` option
16+
to the ``aws s3 sync`` command
17+
(`issue 824 <https://github.com/aws/aws-cli/pull/824>`__)
18+
* bugfix:``aws ec2 copy-snapshot``: Fix bug when spaces in
19+
the description caused the copy request to fail
20+
(`issue botocore 321 <https://github.com/boto/botocore/pull/321>`__)
21+
22+
623
1.3.22
724
======
825

awscli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"""
1818
import os
1919

20-
__version__ = '1.3.22'
20+
__version__ = '1.3.23'
2121

2222
#
2323
# Get our data path to be added to botocore's search path

awscli/customizations/emr/applicationutils.py

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,19 @@ def build_applications(parsed_applications, parsed_globals, ami_version=None):
3333
if hive_version is None:
3434
hive_version = constants.LATEST
3535
step_list.append(
36-
emrutils.build_hive_install_step(
36+
_build_install_hive_step(
3737
region=parsed_globals.region,
3838
version=hive_version))
39+
args = app_config.get('Args')
40+
if args is not None:
41+
hive_site_path = _find_matching_arg(
42+
key=constants.HIVE_SITE_KEY, args_list=args)
43+
if hive_site_path is not None:
44+
step_list.append(
45+
_build_install_hive_site_step(
46+
region=parsed_globals.region,
47+
version=hive_version,
48+
hive_site_path=hive_site_path))
3949
elif app_name == constants.PIG:
4050
pig_version = app_config.get('Version')
4151
if pig_version is None:
@@ -122,4 +132,47 @@ def build_impala_install_bootstrap_action(region, version, args=None):
122132
path=emrutils.build_s3_link(
123133
relative_path=constants.IMPALA_INSTALL_PATH,
124134
region=region),
125-
args=args_list)
135+
args=args_list)
136+
137+
138+
def _build_install_hive_step(region, version,
139+
action_on_failure=constants.TERMINATE_CLUSTER):
140+
step_args = [
141+
emrutils.build_s3_link(constants.HIVE_SCRIPT_PATH, region),
142+
constants.INSTALL_HIVE_ARG,
143+
constants.BASE_PATH_ARG,
144+
emrutils.build_s3_link(constants.HIVE_BASE_PATH),
145+
constants.HIVE_VERSIONS,
146+
version]
147+
step = emrutils.build_step(
148+
name=constants.INSTALL_HIVE_NAME,
149+
action_on_failure=action_on_failure,
150+
jar=emrutils.build_s3_link(constants.SCRIPT_RUNNER_PATH, region),
151+
args=step_args)
152+
return step
153+
154+
155+
def _build_install_hive_site_step(region, version, hive_site_path,
156+
action_on_failure=constants.CANCEL_AND_WAIT):
157+
step_args = [
158+
emrutils.build_s3_link(constants.HIVE_SCRIPT_PATH, region),
159+
constants.BASE_PATH_ARG,
160+
emrutils.build_s3_link(constants.HIVE_BASE_PATH),
161+
constants.INSTALL_HIVE_SITE_ARG,
162+
hive_site_path,
163+
constants.HIVE_VERSIONS,
164+
version]
165+
step = emrutils.build_step(
166+
name=constants.INSTALL_HIVE_SITE_NAME,
167+
action_on_failure=action_on_failure,
168+
jar=emrutils.build_s3_link(constants.SCRIPT_RUNNER_PATH, region),
169+
args=step_args)
170+
return step
171+
172+
173+
def _find_matching_arg(key, args_list):
174+
for arg in args_list:
175+
if key in arg:
176+
return arg
177+
178+
return None

awscli/customizations/emr/constants.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@
102102
INSTALL_PIG_NAME = 'Install Pig'
103103
INSTALL_HIVE_ARG = '--install-hive'
104104
INSTALL_HIVE_NAME = 'Install Hive'
105+
HIVE_SITE_KEY = '--hive-site'
106+
INSTALL_HIVE_SITE_ARG = '--install-hive-site'
107+
INSTALL_HIVE_SITE_NAME = 'Install Hive Site Configuration'
105108
BASE_PATH_ARG = '--base-path'
106109
INSTALL_GANGLIA_NAME = 'Install Ganglia'
107110
INSTALL_HBASE_NAME = 'Install HBase'

awscli/customizations/emr/emrutils.py

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,15 @@ def build_bootstrap_action(
129129
return ba_config
130130

131131

132-
def build_s3_link(relative_path='', region=None):
133-
if region and region != 'us-east-1':
134-
return 's3://{0}.elasticmapreduce{1}'.format(region, relative_path)
135-
else:
136-
return 's3://elasticmapreduce{0}'.format(relative_path)
132+
def build_s3_link(relative_path='', region='us-east-1'):
133+
if region is None:
134+
region = 'us-east-1'
135+
return 's3://{0}.elasticmapreduce{1}'.format(region, relative_path)
137136

138137

139-
def get_script_runner(region=None):
138+
def get_script_runner(region='us-east-1'):
139+
if region is None:
140+
region = 'us-east-1'
140141
return build_s3_link(
141142
relative_path=constants.SCRIPT_RUNNER_PATH, region=region)
142143

@@ -164,23 +165,6 @@ def build_pig_install_step(region, version,
164165
return step
165166

166167

167-
def build_hive_install_step(region, version,
168-
action_on_failure=constants.TERMINATE_CLUSTER):
169-
step_args = [
170-
build_s3_link(constants.HIVE_SCRIPT_PATH, region),
171-
constants.INSTALL_HIVE_ARG,
172-
constants.BASE_PATH_ARG,
173-
build_s3_link(constants.HIVE_BASE_PATH),
174-
constants.HIVE_VERSIONS,
175-
version]
176-
step = build_step(
177-
name=constants.INSTALL_HIVE_NAME,
178-
action_on_failure=action_on_failure,
179-
jar=build_s3_link(constants.SCRIPT_RUNNER_PATH, region),
180-
args=step_args)
181-
return step
182-
183-
184168
def call(session, operation_object, parameters, region_name=None,
185169
endpoint_url=None, verify=None):
186170
# We could get an error from get_endpoint() about not having

awscli/customizations/s3/comparator.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def __init__(self, params=None):
3838
if 'size_only' in params:
3939
self.compare_on_size_only = params['size_only']
4040

41+
self.match_exact_timestamps = False
42+
if 'exact_timestamps' in params:
43+
self.match_exact_timestamps = params['exact_timestamps']
44+
4145
def call(self, src_files, dest_files):
4246
"""
4347
This function preforms the actual comparisons. The parameters it takes
@@ -198,6 +202,11 @@ def compare_time(self, src_file, dest_file):
198202
# at the source location.
199203
return False
200204
elif cmd == "download":
205+
if self.match_exact_timestamps:
206+
# An update is needed unless the
207+
# timestamps match exactly.
208+
return total_seconds(delta) == 0
209+
201210
if total_seconds(delta) <= 0:
202211
return True
203212
else:

awscli/customizations/s3/s3.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,7 @@ def add_verify_ssl(self, parsed_globals):
813813
'sse', 'storage-class', 'content-type',
814814
'cache-control', 'content-disposition',
815815
'content-encoding', 'content-language',
816+
'exact-timestamps',
816817
'expires', 'size-only']},
817818
'ls': {'options': {'nargs': '?', 'default': 's3://'},
818819
'params': ['recursive'], 'default': 's3://',
@@ -867,6 +868,11 @@ def add_verify_ssl(self, parsed_globals):
867868
'size-only': {'options': {'action': 'store_true'}, 'documents':
868869
('Makes the size of each key the only criteria used to '
869870
'decide whether to sync from source to destination.')},
871+
'exact-timestamps': {'options': {'action': 'store_true'}, 'documents':
872+
('When syncing from S3 to local, same-sized items will be '
873+
'ignored only when the timestamps match exactly. The '
874+
'default behavior is to ignore same-sized items unless '
875+
'the local version is newer than the S3 version.')},
870876
'index-document': {'options': {}, 'documents':
871877
('A suffix that is appended to a request that is for a '
872878
'directory on the website endpoint (e.g. if the suffix '

awscli/examples/autoscaling/put-scheduled-update-group-action.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The following example creates a scheduled action to scale on a recurring schedul
88

99
aws autoscaling put-scheduled-update-group-action --auto-scaling-group-name basic-auto-scaling-group --scheduled-action-name sample-scheduled-action --recurrence "30 0 1 1,6,12 0" --min-size 2 --max-size 6 --desired-capacity 4
1010

11-
For more information, see `Scheduled Scaling`_ in the *Auto Scaling Developer Guide*.
11+
For more information, see `Scheduled Scaling`__ in the *Auto Scaling Developer Guide*.
1212

13-
.. _`Scheduled Scaling`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/schedule_time.html
13+
.. __: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/schedule_time.html
1414

awscli/examples/elasticloadbalancing/apply-security-groups-to-load-balancer.rst renamed to awscli/examples/elb/apply-security-groups-to-load-balancer.rst

File renamed without changes.

awscli/examples/elasticloadbalancing/attach-load-balancer-to-subnets.rst renamed to awscli/examples/elb/attach-load-balancer-to-subnets.rst

File renamed without changes.

0 commit comments

Comments
 (0)