Database Reference
In-Depth Information
column_families:
- name: Hotel
compare_with: UTF8Type
- name: HotelByCity
compare_with: UTF8Type
- name: Guest
compare_with: BytesType
- name: Reservation
compare_with: TimeUUIDType
- name: PointOfInterest
column_type: Super
compare_with: UTF8Type
compare_subcolumns_with: UTF8Type
- name: Room
column_type: Super
compare_with: BytesType
compare_subcolumns_with: BytesType
- name: RoomAvailability
column_type: Super
compare_with: BytesType
compare_subcolumns_with: BytesType
This definition provides all of the column families to run the example, and a couple more that we
don't directly reference in the application code, because it rounds out the design as transferred
from RDBMS.
Loading the schema
Once you have the schema defined in YAML, you need to load it. To do this, open a console,
start the jconsole application, and connect to Cassandra via JMX. Then, execute the operation
loadSchemaFromYAML , which is part of the org.apache.cas-
sandra.service.StorageService MBean. Now Cassandra knows about your schema and
you can start using it. You can also use the API itself to create keyspaces and column families.
Search WWH ::




Custom Search