mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
IMPALA-8344: Add support for running the minicluster with S3Guard
Some tests can fail on S3 due to some operations that are eventually consistent. S3Guard stores extra metadata in a DynamoDB to solve several consistency issues. This adds support for running the minicluster on S3 with S3Guard. S3Guard is configured by the following environment variables: S3GUARD_ENABLED: defaults to false, set to true to enable S3Guard S3GUARD_DYNAMODB_TABLE: name of the DynamoDB table to use. This must be exclusively owned by this minicluster. The dataload scripts initialize this table and will purge entries if the table already exists. The table should be in the same region as the S3_BUCKET for the minicluster. S3GUARD_DYNAMODB_REGION - AWS region for S3GUARD_DYNAMODB_TABLE These environment variables only impact S3 configurations. The support comes from three pieces: 1. Configuration changes in core-site.xml to add the appropriate parameters. 2. Updating dataload to initialize/purge the s3guard dynamodb table and import data appropriately. 3. Update tests to manipulate files through the HDFS command line rather than through s3 utilities. This takes the filesystem utility code for ABFS (which actually calls HDFS command line), makes it generic, and uses it for S3Guard. Testing: - Ran multiple rounds of s3 tests - Aborted tests in the middle and restarted the s3 tests (to test the s3guard reinitialization code) Change-Id: I3c748529a494bb6e70fec96dc031523ff79bf61d Reviewed-on: http://gerrit.cloudera.org:8080/13020 Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Reviewed-by: Sahil Takiar <stakiar@cloudera.com>
This commit is contained in:
@@ -80,9 +80,10 @@ def dump_config(d, source_path, out):
|
||||
print >>out, dedent(header)
|
||||
for k, v in sorted(d.iteritems()):
|
||||
try:
|
||||
k_new = _substitute_env_vars(k)
|
||||
if isinstance(v, int):
|
||||
v = str(v)
|
||||
v = _substitute_env_vars(v)
|
||||
v_new = _substitute_env_vars(v)
|
||||
except KeyError, e:
|
||||
raise Exception("failed environment variable substitution for value {k}: {e}"
|
||||
.format(k=k, e=e))
|
||||
@@ -90,7 +91,7 @@ def dump_config(d, source_path, out):
|
||||
<property>
|
||||
<name>{name}</name>
|
||||
<value>{value}</value>
|
||||
</property>""".format(name=xmlescape(k), value=xmlescape(v))
|
||||
</property>""".format(name=xmlescape(k_new), value=xmlescape(v_new))
|
||||
print >>out, "</configuration>"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user