Q:

Is there a way to create Columnfamily in external table dynamically?

I created a External Table like this:       
 CREATE External TABLE  IF NOT EXISTS  words  (word string, timest string, 
    url string, occs string, nos string, hiveall string, occall string) STORED 
    BY org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES 
    ('hbase.columns.mapping' =':key, count:timest,  count:url, count:occs, 
    count:nos, other:hiveall, other:occall ')

Is there any way to create the columnfamilys dynamically? so that i have for example something like this:
1397897857000      column=word:occall, timestamp=1449778100184, value=value1

1397897857000      column=otherword:occall, timestamp=1449778100184, value=value2

I thought about something like this but from hive, this code here is from hbase :
Configuration config = HBaseConfiguration.create();
HBaseAdmin admin = new HBaseAdmin(conf);
String table = "myTable";

admin.disableTable(table);

HColumnDescriptor cf1 = ...;
admin.addColumn(table, cf1);      // adding new ColumnFamily
HColumnDescriptor cf2 = ...;
admin.modifyColumn(table, cf2);    // modifying existing ColumnFamily

admin.enableTable(table);

from here:
http://hbase.apache.org/0.94/book/schema.html
Or does somebody has another idea for my Problem:
 I have multiple data from a word count job. This data contains the url, where the word was read from, a timestamp ,when the word was read, the occurance of how often it was found in the url, and some information about a category( there are news, social and all) with the occurance. The main problem is that multiple words can occur at the same timestamp, which will override a existing one. I need the rowkey to be the timestamp to make some querys against it ( like what was most used word in the last 2 weeks). 

A:

Column families can't be changed after creation like this. In your scenario, you should create different column qualifiers instead of different column families.
Fix a column family and use word coming as qualifier name. So, it will not override when different words come at the same timestamp.

