There is weird problem I see in one of my table, I am able to perform sleect count(*) with where clause or without but I am not able to perform select * from table. I am getting following error.
select count(*) from sample1;
Time taken: 0.407 seconds, Fetched: 1 row(s)
hive> select count(*) from sample1 where logdate='2016-05-27';
Time taken: 0.242 seconds, Fetched: 1 row(s)
hive> select count(*) from sample1 where logdate='2014-10-08';
Time taken: 0.184 seconds, Fetched: 1 row(s)
hive> select * from sample1;
Failed with exception java.io.IOException:java.io.IOException: Error reading file: hdfs://HDPHA/pdcrdata/securedata/sample1/logdate=2014-10-08/part-m-00000
I tried doing msck repair or ANALYZE TABLE sample1 COMPUTE STATISTICS and both ran successfully.
So any idea whats went wrong ?
What I think is it even trying to hit the table to get the counts, every time it's getting directly from metadata.
Can you please run count(*) with limit option i.e. select count(*) from sample1 limit 2; or select count(*) from sample1 where logdate='2016-05-27' limit 2; so that it will trigger MR job and provide actual status.
Even if you are able to get those status and still not able to read I suggest you see whether are you able to read HDFS directory directly.
i.e. hdfs dfs -tail hdfs://HDPHA/pdcrdata/securedata/sample1/logdate=2014-10-08/part-m-00000.
Hope this helps you.,