why hive can‘t select data from hdfs when use partition? -


i use flume write data hdfs,path /hive/logs/dt=20151002.then,i use hive select data,but count of response 0.

here create table sql,create external table if not exists test (id string) partitioned (dt string) row format delimited fields terminated '\t' lines terminated '\n' stored textfile location '/hive/logs'

here select sql,select count(*) test

it seems not registering partition in hive meta-store. although partition present in hdfs path,hive won't know if not registered in meta store. register can following:

alter table test add partition (dt='20151002') location '/hive/logs/dt=20151002';


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -