table region list

Lists the regions that make up a specified table.

Syntax

CLI
maprcli table region list
    -path <path>
    [ -start offset ]
    [ -limit number ]
REST
http[s]://<host>:<port>/rest/table/region/list?path=<path>&<parameters>
NOTE: The mapr user is not treated as a superuser. MapR-DB does not allow the mapr user to run this command unless that user is given the relevant permission or permissions with access-control expressions.

Parameters

Parameter

Description

path

Path to the table.

  • For a path on the local cluster, start the path at the volume mount point. For example, if you want to list regions for a table named test under volume1 which has a mount point at /volume1, specify the following path: /volume1/test
  • For a path on a remote cluster, you must also specify the cluster name in the path. For example, if you want to list regions for a table named test under volume1 in the sanfrancisco cluster, specify the following path:/mapr/sanfrancisco/volume1/customer

start

The offset from the starting region. The default value is 0.

limit

The number of regions to return, counting from the starting region. The default value is 2147483647.

Output fields

Verbose Field Name

Terse Field Name

Field Value

numberofrows nr Number of rows in the region
fid fid The region's FID.

primarynode

pn

Host name of the primary node for this region

secondarynodes

sn

Host names of the secondary nodes where this region is replicated

numberofrowswithdelete nrd Number of rows in the region, counting deleted rows

startkey

sk

Value of the start key for this region

For the first region in a table, this value is exclusive. For all other regions, it is inclusive. See the example output.

endkey

ek

Value of the end key for this region

This value is always exclusive. See the example output.

lastheartbeat

lhb

Time since last heartbeat from the region's primary node

logicalsize

ls

Logical size of the region

physicalsize

ps

Physical size of the region

Examples

Lists the region information for a table

This example lists the region information for the table newtable.

CLI
maprcli table region list -path /my.cluster.com/volume1/newtable 
REST
https://r1n1.sj.us:8443/rest/table/region/list?path=%2Fmy.cluster.com%2Fvolume1%2Fnewtable

Example Output with the -json Option Used

This example shows two table regions. The value of endkey for the first region is the value of startkey for the second region. The value of endkey is always exclusive. So, for the first region, endkey shows that the first region was split with the addition of the record with the key 5190414F2E44DB732547630A9A81452539749000; for the second region, startkey shows that the region begins with that record.

{
    "timestamp":1452554659812,
    "timeofday":"2016-01-11 03:24:19.812 GMT-0800",
    "status":"OK",
    "total":2,
    "data":[
        {
            "primarynode":"10.10.123.45",
            "secondarynodes":"",
            "startkey":"-INFINITY",
            "endkey":"5190414F2E44DB732547630A9A81452539749000",
            "lastheartbeat":0,
            "fid":"2068.100.131676",
            "logicalsize":794624,
            "physicalsize":794624,
            "copypendingsize":0,
            "numberofrows":0,
            "numberofrowswithdelete":0,
            "numberofspills":0,
            "numberofsegments":0
        },
        {
            "primarynode":"10.10.123.54",
            "secondarynodes":"",
            "startkey":"5190414F2E44DB732547630A9A81452539749000",
            "endkey":"INFINITY",
            "lastheartbeat":0,
            "fid":"2069.181.131578",
            "logicalsize":745472,
            "physicalsize":745472,
            "copypendingsize":0,
            "numberofrows":0,
            "numberofrowswithdelete":0,
            "numberofspills":0,
            "numberofsegments":0
        }
    ]
}