Hive AWS雅典娜:“msck修理台”是否会产生费用?
S3中的ORC数据如下所示:Hive AWS雅典娜:“msck修理台”是否会产生费用?,hive,emr,amazon-emr,amazon-athena,Hive,Emr,Amazon Emr,Amazon Athena,S3中的ORC数据如下所示: s3://bucket/orc/clientId=client-1/year=2017/month=3/day=16/hour=20/ s3://bucket/orc/clientId=client-2/year=2017/month=3/day=16/hour=21/ s3://bucket/orc/clientId=client-3/year=2017/month=3/day=16/hour=22/ ALTER TABLE <athena table&g
s3://bucket/orc/clientId=client-1/year=2017/month=3/day=16/hour=20/
s3://bucket/orc/clientId=client-2/year=2017/month=3/day=16/hour=21/
s3://bucket/orc/clientId=client-3/year=2017/month=3/day=16/hour=22/
ALTER TABLE <athena table>
ADD PARTITION (clientId='client-1',year=2017,month=3,day=16,hour=20)
location 's3://bucket/orc/clientId=client-1/year=2017/month=3/day=16/hour=20/';
每小时我都会运行一个EMR作业,将S3中的原始JSON转换为ORC,并使用路径分区约定(如上)将其写入Athena摄取。在EMR作业完成后,我运行msck repair table
,以便Athena可以选择新分区
我有3个相关问题:
msck repair table
是否会在AWS中花费我的钱msck修复表
can超时。是否有一种方法可以在数据管道中执行步骤,以继续运行此命令,直到它成功完成clientId
,因为可能有1-X个,并且我不知道在运行EMR时存在哪些。是否有解决此问题的最佳实践方法(使用Hive或其他方法)?我可以调用S3API来获取s3://bucket/org/
的列表,并编写代码来迭代列表并手动添加。我希望有一个更简单的方法s3://bucket/orc/clientId=client-1/year=2017/month=3/day=16/hour=20/
s3://bucket/orc/clientId=client-2/year=2017/month=3/day=16/hour=21/
s3://bucket/orc/clientId=client-3/year=2017/month=3/day=16/hour=22/
ALTER TABLE <athena table>
ADD PARTITION (clientId='client-1',year=2017,month=3,day=16,hour=20)
location 's3://bucket/orc/clientId=client-1/year=2017/month=3/day=16/hour=20/';
ALTER表
添加分区(clientId='client-1',年=2017,月=3,日=16,小时=20)
位置“s3://bucket/orc/clientId=client-1/year=2017/month=3/day=16/hour=20/”;
:
DDL查询或分区检测不收费
:
S3获得费用确实适用
我还不知道如何自动化msck修复表
,以确保它完成