HiveDB 0.9.3 Released
posted in: announcements
We’ve just tagged HiveDB release 0.9.3 and declared it ready for use. This release is packed with a ton of new features along with a lot of updates to the core HiveDB code. Hopefully this will be our last development release before 1.0. Here’s what’s new:
» Hibernate Support
This is where the bulk of the work for this release has gone. We now directly integrate with Hibernate using Hibernate Shards. Writing an application with HiveDB is as easy as using Hibernate.
List entityClasses = Lists.newList(Continent.class, WeatherReport.class, WeatherEvent.class);
ShardAccessStrategy strategy = new SequentialShardAccessStrategy();
HiveSessionFactory factoryBuilder = new HiveSessionFactoryBuilderImpl( hiveUri, entityClasses, strategy);
WeatherReport report = new WeatherReport();
...
Session session = factoryBuilder.openSession();
Transaction tx = null;
try {
tx = session.beginTransaction();
session.saveOrUpdate(report);
} catch( RuntimeException e ) {
if(tx != null)
tx.rollback();
} finally {
session.close();
}
» Simple configuration and installation using Java Annotations
We created automated configuration an installation of the Hive. You can decorate you entity classes or interfaces with our annotations and ConfigurationReader will process them and create the required Hive resources and indexes.
@Resource("WeatherReport")
public interface WeatherReport {
@PartitionIndex
String getContinent();
@EntityId
Integer getReportId();
@Index
Integer getRegionCode();
@Index(type=IndexType.Data)
Double getLatitude();
@Index(type=IndexType.Data)
Double getLongitude();
int getTemperature();
}
Just pass the annotated classes into the ConfigurationReader and call install() and your hive is ready to go.
ConfigurationReader reader = new ConfigurationReader(WeatherReport.class);
reader.install(hiveUri);
» More compact and flexible directory layout
We have added relationships between entities into the directory removing the need for redundant secondary indexes.
» Automated Indexing for Hive entities
If you have annotated your entity classes you can use the HiveIndexer to automatically add or update entries in the directory. Or if you are using Hibernate the HiveSessionFactory will automatically index anything that you save or update.
There are a lot more new features including automated proxying for entity classes, simple data validation, serialized blob storage along with many updates and improvements to the core HiveDB code. We intend for this to be the last development release before HiveDB 1.0. We’ll be updating all of the documentation and posting more about the new features in the coming weeks.
Finally, come and see us at MySql Conference 2008.
