Metaspace.createUserSpace()
Signature
Object createUserSpace (String metaSpaceName, String spaceName, String[] fieldNames, String[] dataTypes, Object ... variableArgs)
Description
Creates a user space using the provided field definitions
Parameters
Name | Type | Description |
metaSpaceName | String | Metaspace name |
spaceName | String | Unqualified Space name |
fieldNames | String[] | String array containing names of the fields. The first field is assumed to be the key field (unless explicitly specified through optional arguments). |
dataTypes | String[] | String array containing data types of the fields (such as string, integer, boolean, long, blob etc.) |
variableArgs | Object ... | Optional arguments: SpaceDef object, followed key fields (String[]), and finally distribution fields (String[]) |
Returns
Type | Description |
Object | newly created or existing space |
Example
Metaspace.createUserSpace("ms", "order", String[]{"OrderId","Name","Items"}, String[]{"long","string","string"}, null, String[]{"OrderId","Name"}, String[]{"Name"})