LATEST VERSION: 8.2.6 - CHANGELOG
Pivotal GemFire® v8.2

Creating a Region with gfsh

Creating a Region with gfsh

A simple and fast way to create a data region in the Pivotal GemFire cache is to use the gfsh command-line tool.

Before you start, configure your Cache or ClientCache and determine the region shortcut and other attributes settings your region needs.

Region creation is subject to attribute consistency checks, both internal to the cache and, if the region is not local, between all caches where the region is defined. The requirements for consistency between region attributes are detailed in the online Java API documentation.
  1. Start a gfsh prompt.
  2. Connect to a server that is currently acting as a JMX Manager node.
  3. Enter the create region command providing any desired region attributes as arguments.
    For example:
    gfsh>create region --name=region1 --type=REPLICATE
    See create region for more details and examples.
  4. Add data into the region by using the import datacommand or put gfsh command.
  5. After you modify data in the region you can use the export data command to generate a snapshot of the current region's data for later use.
  6. Export the configuration files of your server so that you can save your region's configuration and recreate the region with the same attributes the next time you start up your cache server. See export config for details.
    Note: The cluster configuration service, which is enabled by default, automatically saves the configuration on the locators in the distributed system. After you use the gfsh create region command, any new servers that you start that attach to the same locator receive the same configuration. You can also create alternate configurations within a distributed system by specifying a group when creating the region and starting servers. See Overview of the Cluster Configuration Service.