You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/11/30 18:27:21 UTC
[GitHub] [incubator-pinot] icefury71 opened a new issue #6300: Json schema validation for table config
icefury71 opened a new issue #6300:
URL: https://github.com/apache/incubator-pinot/issues/6300
Currently, we're doing manual checks for each field in the schema regarding data type, range etc...
Instead, we can use Json schema (https://json-schema.org/) to use annotation for auto-validation of such things.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] galalen commented on issue #6300: Json schema validation for table config
Posted by GitBox <gi...@apache.org>.
galalen commented on issue #6300:
URL: https://github.com/apache/incubator-pinot/issues/6300#issuecomment-737254645
here is the draft json schema for table config
```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://example.com/product.schema.json",
"title": "Pinot TableConfig",
"description": "define the table properties",
"type": "object",
"properties": {
"tableName": {
"description": "Name of the table",
"type": "string"
},
"tableType": {
"description": "Type of the table",
"type": "string"
},
"quota": {
"description": "Specifies quota for storage and queries per second",
"type": "object",
"properties": {
"maxQueriesPerSecond": { "type": "integer" },
"storage": { "type": "string" }
}
},
"routing": {
"type": "object",
"properties": {
"segmentPrunerTypes": {
"type": "array",
"items": {
"type": "string",
"enum": ["partition"]
}
},
"instanceSelectorType": {
"type": "string",
"enum": ["replicaGroup", "balanced"]
}
}
},
"segmentsConfig": {
"type": "object",
"properties": {
"schemaName": { "type": "string" },
"timeColumnName": { "type": "string" },
"timeType": { "type": "string" },
"replication": { "type": "string" },
"retentionTimeUnit": {
"type": "string",
"enum": ["DAYS", "HOURS", "MINUTES", "SECONDS"]
},
"retentionTimeValue": { "type": "string" },
"segmentPushFrequency": {
"type": "string",
"enum": ["HOURLY", "DAILY", "WEEKLY", "MONTHLY"]
},
"segmentPushType": { "type": "string", "enum": ["APPEND", "REFRESH"] }
}
},
"tableIndexConfig": {
"type": "object",
"properties": {
"invertedIndexColumns": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"createInvertedIndexDuringSegmentGeneration": {
"type": "boolean"
},
"sortedColumn": {
"type": "string"
},
"bloomFilterColumns": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"bloomFilterConfigs": {
"type": "string"
},
"rangeIndexColumns": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"starTreeIndexConfigs": {
"type": "string"
},
"enableDefaultStarTree": {
"type": "boolean"
},
"enableDynamicStarTreeCreation": {
"type": "boolean"
},
"noDictionaryColumns": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"onHeapDictionaryColumns": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"varLengthDictionaryColumns": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true
},
"loadMode": {
"type": "string",
"enum": ["HEAP", "MMAP"]
},
"columnMinMaxValueGeneratorMode": {
"type": "string",
"enum": ["NONE", "ALL", "TIME", "NON_METRIC"]
},
"nullHandlingEnabled": {
"type": "boolean"
},
"aggregateMetrics": {
"type": "boolean",
"$comment": "only applicable for stream"
},
"fieldConfigList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"encodingType": {
"type": "string",
"enum": ["RAW", "DICTIONARY"]
},
"indexType": {
"type": "string",
"enum": ["TEXT"]
},
"properties": {
"type": "object",
"properties": {
"enableQueryCacheForTextIndex": { "type": "boolean" },
"rawIndexWriterVersion": { "type": "string" },
"deriveNumDocsPerChunkForRawIndex": { "type": "string" }
}
}
}
}
}
}
},
"tenants": {
"type": "object",
"properties": {
"broker": { "type": "string" },
"server": { "type": "string" },
"tagOverrideConfig": {
"type": "object",
"properties": {
"realtimeConsuming": { "type": "string" },
"realtimeCompleted": { "type": "string" }
}
}
}
},
"ingestionConfig": {
"type": "object",
"properties": {
"filterConfig": {
"type": "object",
"properties": {
"filterFunction": { "type": "string" }
}
},
"transformConfigs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"columnName": { "type": "string" },
"transformFunction": { "type": "string" }
}
}
}
}
},
"metadata": {
"type": "object"
}
},
"required": ["tableName", "tableType", "segmentsConfig", "tableIndexConfig"]
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org