List partition statistics
GET/metalakes/:metalake/objects/:metadataObjectType/:metadataObjectFullName/statistics/partitions
Returns the statistics of a table's partitions, grouped by partition, for all partitions or for the partitions in the range set by from and to. Partition statistics are supported only for objects of type TABLE.
Sign in with a bearer token or a local user's password; see Authentication.
Request
Path Parameters
The name of the metalake
Possible values: [TABLE]
The type of the metadata object. Statistics are supported for tables only; any other type fails with IllegalArgumentException. The server matches the value case-insensitively.
The full name of the metadata object
Query Parameters
The partition name at the lower end of the range. When omitted, the range has no lower bound.
The partition name at the upper end of the range. When omitted, the range has no upper bound.
Whether the range includes the partition named by from. Defaults to true.
Whether the range includes the partition named by to. Defaults to false.
Responses
- 200
- 400
- 404
- 501
- 5xx
The statistics of the table's partitions, grouped by partition, for all partitions or for those in the requested range.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- PartitionStatisticsListResponse
Schema
Array [
Array [
- MOD1
- MOD2
- MOD3
- MOD4
- MOD5
- MOD6
Array [
]
]
]
Possible values: [0]
Status code of the response
partitionStatistics
object[]
The list of partition statistics results
The name of the partition
statistics
object[]
required
The name of the statistic
value
object
The statistic's value, present only when the statistic has one. Its type depends on the statistic: a string, number, integer, boolean, array, or object.
oneOf
string
number
integer
boolean
Whether the statistic is reserved
Whether the statistic is modifiable
audit
object
required
Audit information for a Gravitino resource.
The user who created the resource
The time the resource was created
The user who last modified the resource
The time the resource was last modified
{
"code": 0,
"partitionStatistics": [
{
"partitionName": "string",
"statistics": [
{
"name": "string",
"value": "string",
"reserved": true,
"modifiable": true,
"audit": {
"creator": "string",
"createTime": "2024-07-29T15:51:28.071Z",
"lastModifier": "string",
"lastModifiedTime": "2024-07-29T15:51:28.071Z"
}
}
]
}
]
}
{
"code": 0,
"partitionStatistics": [
{
"partitionName": "p0",
"statistics": [
{
"name": "row_count",
"value": "1000",
"reserved": true,
"modifiable": false,
"audit": {
"creator": "user1",
"createTime": "2023-10-01T12:00:00Z",
"lastModifier": "user2",
"lastModifiedTime": "2023-10-02T12:00:00Z"
}
},
{
"name": "file_size",
"value": "500MB",
"reserved": true,
"modifiable": false,
"audit": {
"creator": "user1",
"createTime": "2023-10-01T12:00:00Z",
"lastModifier": "user2",
"lastModifiedTime": "2023-10-02T12:00:00Z"
}
},
{
"name": "custom-k1",
"value": "v1",
"reserved": false,
"modifiable": true,
"audit": {
"creator": "user1",
"createTime": "2023-10-01T12:00:00Z",
"lastModifier": "user2",
"lastModifiedTime": "2023-10-02T12:00:00Z"
}
}
]
},
{
"partitionName": "p1",
"statistics": [
{
"name": "row_count",
"value": "2000",
"reserved": true,
"modifiable": false,
"audit": {
"creator": "user1",
"createTime": "2023-10-01T12:00:00Z",
"lastModifier": "user2",
"lastModifiedTime": "2023-10-02T12:00:00Z"
}
},
{
"name": "file_size",
"value": "1GB",
"reserved": true,
"modifiable": false,
"audit": {
"creator": "user1",
"createTime": "2023-10-01T12:00:00Z",
"lastModifier": "user2",
"lastModifiedTime": "2023-10-02T12:00:00Z"
}
},
{
"name": "custom-k1",
"value": "v2",
"reserved": false,
"modifiable": true,
"audit": {
"creator": "user1",
"createTime": "2023-10-01T12:00:00Z",
"lastModifier": "user2",
"lastModifiedTime": "2023-10-02T12:00:00Z"
}
}
]
}
]
}
The request is malformed or fails validation, for example because of invalid JSON, a missing required field or an invalid parameter value. The body is normally an error model, although the server's middleware can return plain text instead.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- Example
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1003,
"type": "BadRequestException",
"message": "Malformed request"
}
The metalake or the metadata object does not exist.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- NoSuchMetadataObjectException
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1003,
"type": "NoSuchMetadataObjectException",
"message": "Metadata object does not exist",
"stack": [
"org.apache.gravitino.exceptions.NoSuchMetadataObjectException: Metadata object does not exist",
"..."
]
}
The server's statistics storage does not support the requested operation.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
The server hit an internal error that the client usually cannot fix by changing the request.
- application/vnd.gravitino.v1+json
- Schema
- Example (from schema)
- Example
Schema
Possible values: >= 1000 and <= 1100
HTTP response code
Internal type definition of the error
A human-readable message
Deprecated diagnostic stack trace. Enterprise omits it by default because it can expose internal implementation details. Operators can opt in for controlled diagnostics with gravitino.server.webserver.includeErrorStackTrace=true. See OWASP REST Security: Error handling and CWE-209.
{
"code": 1002,
"type": "string",
"message": "string"
}
{
"code": 1002,
"type": "RuntimeException",
"message": "Internal Server Error",
"stack": [
"java.lang.RuntimeException: Internal Server Error"
]
}