I'm running an EMR cluster on AWS. Software versions are:
- AMI: 3.3.1
- Hadoop: Amazon 2.4.0
- Hive: 0.13.1
I've created an external table to load data from S3:
CREATE EXTERNAL TABLE views ( -- ... columns elided for brevity ... ) PARTITIONED BY (y INT, m INT, d INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' NULL DEFINED AS '\0' STORED AS TEXTFILE LOCATION 's3n://bucketname/path';
(I also tried an s3: URL to see if that made a difference.)
Now, when I try to ALTER TABLE views RECOVER PARTITIONS, I get:
FAILED: ParseException line 1:18 cannot recognize input near 'views' 'RECOVER' 'PARTITIONS' in alter table statement
If, instead, I try MSCK REPAIR TABLE views, it tells me about the partitions that aren't in the metadata, but doesn't load them:
Partitions not in metastore: views:y=2015/m=01/d=20 views:y=2015/m=01/d=21 Time taken: 0.984 seconds, Fetched: 1 row(s)
I'm aware of HIVE-3231 which describes my issue with MSCK, but I have no idea whether that fix ever got merged (it looks like it failed to build) or if it's in the Amazon version of Hive.
So my question is, what am I doing wrong? In particular, I would expect the ALTER TABLE syntax to still work.
Aucun commentaire:
Enregistrer un commentaire