Modify Cluster order is to refresh credits on a current group. In this section you can figure out how to add or adjust the credits of a bunch.
The accompanying assertion is the fundamental language structure of Alter Cluster order.
ALTER CLUSTER <cluster> <attribute-name> <attribute-value>
Following are the insights regarding the choices in the above language structure.
- <cluster> − Defines the bunch name.
- <attribute-name> − Defines the property you need to change.
- <attribute-value> − Defines the worth you need to set for this property.
The accompanying even configuration gives the rundown of upheld ascribes you can use alongside Alter group order.
Name | Type | Description |
---|---|---|
NAME | String | Changes the cluster name. |
STATUS | String | Changes the cluster status. Allowed values are ONLINE and OFFLINE. By default, clusters are online. |
COMPRESSION | String | Defines the compression type to use. Allowed values are NOTHING, SNAPPY, GZIP, and any other compression types registered in the OCompressionFactory class. |
USE_WAL | Boolean | Defines whether it uses the Journal when OrientDB operates against the cluster |
RECORD_GROW_FACTO R | Integer | Defines the grow factor to save more space on record creation. You may find this useful when you update the record with additional information. |
RECORD_OVERFLOW_GR OW_FACTOR | Integer | Defines grow factor on updates. When it reaches the size limit, is uses this setting to get more space, (factor > 1). |
CONFLICTSTRATEGY | String | Defines the strategy it uses to handle conflicts in the event that OrientDB MVCC finds an update or a delete operation it executes against an old record. |
The accompanying table gives the rundown of Conflict techniques.
Sr.No. | Strategy & Description |
---|---|
1 |
Version Throws an exception when versions are different. This is the default setting. |
2 |
Content In the event that the versions are different, it checks for changes in the content, otherwise it uses the highest version to avoid throwing an exception. |
3 |
Automerge Merges the changes. |
Example
Attempt the accompanying model inquiries to learn Alter bunch order.
Execute the accompanying order to change the name of a group from Employee to Employee2.
orientdb {db = demo}> ALTER CLUSTER Employee NAME Employee2
In the event that the above order is executed effectively, you will get the accompanying yield.
Cluster updated successfully
Execute the accompanying order to change the name of a bunch from Employee2 to Employee utilizing group ID.
orientdb {db = demo}> ALTER CLUSTER 12 NAME Employee
On the off chance that the above order is executed effectively, you will get the accompanying yield.
Cluster updated successfully
Execute the accompanying order to change the bunch struggle methodology to automerge.
orientdb {db = demo}> ALTER CLUSTER V CONFICTSTRATEGY automerge
On the off chance that the above order is executed effectively, you will get the accompanying yield.
Cluster updated successfully