use of com.nearinfinity.honeycomb.mysql.gen.AvroTableSchema in project honeycomb by altamiracorp.
the class HandlerProxy method createTable.
/**
* Create a table with the given specifications. The table is not open when
* this is called.
*
* @param tableName Name of the table
* @param serializedTableSchema Serialized {@link AvroTableSchema} avro object
* @param autoInc Initial auto increment value
*/
public void createTable(String tableName, byte[] serializedTableSchema, long autoInc) {
Verify.isNotNullOrEmpty(tableName);
checkNotNull(serializedTableSchema, "Schema cannot be null");
store = storeFactory.createStore(tableName);
TableSchema tableSchema = TableSchema.deserialize(serializedTableSchema);
Verify.isValidTableSchema(tableSchema);
store.createTable(tableName, tableSchema);
store.incrementAutoInc(tableName, autoInc);
}
Aggregations