Skip to content
PedroGomes edited this page Jan 20, 2011 · 1 revision

The MySQL section as it own creation class, as for the Cassandra executors (ORM and native) the schemas are now presented (below 0.7 versions don't have operations for column family run time edition).

Cassandra

`

   <Keyspace Name="Tpcw">
        <!--
   Implementation of part of the tpc-w schema. On column family for the costumers and other for the Items.
   The Orders will have a table of OrderLine, referent to Items. Each order belong to a costumer.
    -->
        <ColumnFamily CompareWith="UTF8Type"
                      Name="customer"/>
        <ColumnFamily CompareWith="BytesType"
                      Name="item"/>
        <ColumnFamily ColumnType="Super"
                      CompareWith="BytesType"
                      CompareSubcolumnsWith="BytesType"
                      Name="orders"/>
        <ColumnFamily ColumnType="Super"
                      CompareWith="BytesType"
                      CompareSubcolumnsWith="BytesType"
                      Name="order_line"/>
        <ColumnFamily CompareWith="UTF8Type"
                      Name="country"/>
        <ColumnFamily CompareWith="UTF8Type"
                      Name="address"/>
        <ColumnFamily CompareWith="UTF8Type"
                      Name="author"/>
        <ColumnFamily ColumnType="Super"
                      CompareWith="UTF8Type"
                      CompareSubcolumnsWith="UTF8Type"
                      Name="cc_xacts"/>
        <ColumnFamily ColumnType="Super"
                      CompareWith="BytesType"
                      CompareSubcolumnsWith="BytesType"
                      Name="shopping_cart_line"/>
        <ColumnFamily ColumnType="Super"
                      CompareWith="BytesType"
                      CompareSubcolumnsWith="BytesType"
                      Name="shopping_cart"/>
        <ColumnFamily ColumnType="Super"
                      CompareWith="BytesType"
                      CompareSubcolumnsWith="BytesType"
                      Name="Results"/>
        <ColumnFamily ColumnType="Super"
                              CompareWith="BytesType"
                              CompareSubcolumnsWith="BytesType"
                      Name="item_subject_index"/>
         <ColumnFamily ColumnType="Super"
                              CompareWith="BytesType"
                              CompareSubcolumnsWith="BytesType"
                      Name="item_title_index"/>
        <ColumnFamily ColumnType="Super"
                              CompareWith="BytesType"
                              CompareSubcolumnsWith="BytesType"
                      Name="item_author_index"/>


    <!--
   ~ Strategy: Setting this to the class that implements
   ~ IReplicaPlacementStrategy will change the way the node picker works.
   ~ Out of the box, Cassandra provides
   ~ org.apache.cassandra.locator.RackUnawareStrategy and
   ~ org.apache.cassandra.locator.RackAwareStrategy (place one replica in
   ~ a different datacenter, and the others on different racks in the same
   ~ one.)
  -->
  <ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrategy>

  <!-- Number of replicas of the data -->
  <ReplicationFactor>  </ReplicationFactor>

  <!--
   ~ EndPointSnitch: Setting this to the class that implements
   ~ AbstractEndpointSnitch, which lets Cassandra know enough
   ~ about your network topology to route requests efficiently.
   ~ Out of the box, Cassandra provides org.apache.cassandra.locator.EndPointSnitch,
   ~ and PropertyFileEndPointSnitch is available in contrib/.
  -->
  <EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
  </Keyspace>

                       `

Cassandra - Datanucleus

` org.apache.cassandra.locator.RackUnawareStrategy

  <!-- Number of replicas of the data -->
  <ReplicationFactor> </ReplicationFactor>

  <!--
   ~ EndPointSnitch: Setting this to the class that implements
   ~ AbstractEndpointSnitch, which lets Cassandra know enough
   ~ about your network topology to route requests efficiently.
   ~ Out of the box, Cassandra provides org.apache.cassandra.locator.EndPointSnitch,
   ~ and PropertyFileEndPointSnitch is available in contrib/.
  -->
  <EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>

`

Clone this wiki locally