blob: b5f809af571f61f7493eab11076da9e7d13a55e4 [file] [log] [blame]
---
title: Custom-Partitioning and Colocating Data
---
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
You can customize how <%=vars.product_name_long%> groups your partitioned region data with custom partitioning and data colocation.
- **[Understanding Custom Partitioning and Data Colocation](custom_partitioning_and_data_colocation.html)**
Custom partitioning and data colocation can be used separately or in conjunction with one another.
- **[Standard Custom Partitioning](standard_custom_partitioning.html)**
By default, <%=vars.product_name%> partitions each data entry into a bucket using a hashing policy on the key. Additionally, the physical location of the key-value pair is abstracted away from the application. You can change these policies for a partitioned region by providing a standard partition resolver that maps entries to a set of buckets called a partition.
- **[Fixed Custom Partitioning](fixed_custom_partitioning.html)**
By default, <%=vars.product_name%> partitions each data entry into a bucket using a hashing policy on the key. Additionally, the physical location of the key-value pair is abstracted away from the application. You can change these policies for a partitioned region by providing a fixed partition resolver that not only maps entries to a set of buckets called a partition, but also specifies which members host which data buckets.
- **[Colocate Data from Different Partitioned Regions](colocating_partitioned_region_data.html)**
By default, <%=vars.product_name%> allocates the data locations for a partitioned region independent of the data locations for any other partitioned region. You can change this policy for any group of partitioned regions, so that cross-region, related data is all hosted by the same member.
Colocation is required for some operations,
and it increases performance for others by reducing the number of data
accesses to entries that are hosted on other cluster members.