Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.2
-
None
Description
Topic name can be null if table was created prior to settings up JMS. Per Ashutosh's comments:
–
NPE is certainly bad. We should do better. I think default may not be a good idea. Lets give a better error message something of effect: "Topic name not found in metastore. Please do alter table set properties (topicname=dbname.tablename) or whatever you want topic name to be."
–
Ideally, this is transparent to user. If you look at onCreateTable() it puts this in table properties while creating tables, so you need not to add it. If you are running metastore configured with NotificationListener, createTable() will auto populate this key-value. Looks like in this case, table was created before notification was enabled. In that case, you need to add this key-value pair yourself. To do it, you can do this via following ddl:
ALTER TABLE table_name SET TBLPROPERTIES table_properties
table_properties:
: (property_name = property_value, property_name = property_value, ... )