Testing S3 with Impala
Add the following to S3 configurations for Ozone access. Do not add any S3 credentials. For more information, see Configuring Impala access for S3A.
- Sign in to Cloudera Manager.
- Navigate to Clusters > Impala > Configurations tab.
- Search for Impala Catalog Server Advanced Configuration Snippet (Safety Valve) for core-site.xml.
-
Add the following property:
<property> <name>fs.s3a.endpoint</name> <value>https://ccycloud-5.ela75-chf4.root.comops.site:9879</value> </property> <property> <name>fs.s3a.bucket.probe</name> <value>0</value> </property> <property> <name>fs.s3a.change.detection.version.required</name> <value>false</value> </property> <property> <name>fs.s3a.path.style.access</name> <value>true</value> </property> <property> <name>fs.s3a.change.detection.mode</name> <value>none</value> </property>
- Navigate to Clusters > Impala > Configurations tab.
- Search for Impala Daemon Advanced Configuration Snippet (Safety Valve) for core-site.xml.
-
Add the following property:
<property> <name>fs.s3a.endpoint</name> <value>https://ccycloud-5.ela75-chf4.root.comops.site:9879</value> </property> <property> <name>fs.s3a.bucket.probe</name> <value>0</value> </property> <property> <name>fs.s3a.change.detection.version.required</name> <value>false</value> </property> <property> <name>fs.s3a.path.style.access</name> <value>true</value> </property> <property> <name>fs.s3a.change.detection.mode</name> <value>none</value> </property>
-
Create, insert, and select Hive tables through impala-shell.
create external table mytable23(key string, value int) location 's3a://obs-bucket/mytable23'; insert into mytable23 values("cldr",1); select * from mytable23; +------+-------+ | key | value | +------+-------+ | cldr | 1 | +------+-------+