[Conf] Make default_storage_medium configurable (#2980)
Doris support choose medium when create table, and the cluster balance strategy is dependent between different storage medium, and most use will not specify the storage medium when create table, even they kown that they should choose a storage medium, they have no idea about the cluster's storage medium, so, I think we should make storage_medium and storage_cooldown_time configurable, and this should be the admin's responsibility. For Example, if the cluster's storage medium is HDD, but we need to change part of machines to SSD, if we change the machine, the tablets before change is stored in HDD and they can't find a dest path to migrate, and user will create table as usual, it will make all tablets stored in old machines and the new machines will only store a little tablets. Without this config the only way is admin need to traverse all partitions in cluster and change the property of storage_medium, it will increase operational and maintenance costs. So I add a FE config default_storage_medium, so that user can set the default storage medium.
This commit is contained in:
@ -214,7 +214,7 @@ public class CatalogTestUtil {
|
||||
|
||||
// table
|
||||
PartitionInfo partitionInfo = new SinglePartitionInfo();
|
||||
partitionInfo.setDataProperty(partitionId, DataProperty.DEFAULT_HDD_DATA_PROPERTY);
|
||||
partitionInfo.setDataProperty(partitionId, DataProperty.DEFAULT_DATA_PROPERTY);
|
||||
partitionInfo.setReplicationNum(partitionId, (short) 3);
|
||||
OlapTable table = new OlapTable(tableId, testTable1, columns, KeysType.AGG_KEYS, partitionInfo,
|
||||
distributionInfo);
|
||||
|
||||
@ -108,7 +108,7 @@ public class UnitTestUtil {
|
||||
|
||||
// table
|
||||
PartitionInfo partitionInfo = new SinglePartitionInfo();
|
||||
partitionInfo.setDataProperty(partitionId, DataProperty.DEFAULT_HDD_DATA_PROPERTY);
|
||||
partitionInfo.setDataProperty(partitionId, DataProperty.DEFAULT_DATA_PROPERTY);
|
||||
partitionInfo.setReplicationNum(partitionId, (short) 3);
|
||||
partitionInfo.setIsInMemory(partitionId, false);
|
||||
OlapTable table = new OlapTable(tableId, TABLE_NAME, columns,
|
||||
|
||||
@ -150,7 +150,7 @@ abstract public class DorisHttpTestCase {
|
||||
|
||||
// table
|
||||
PartitionInfo partitionInfo = new SinglePartitionInfo();
|
||||
partitionInfo.setDataProperty(testPartitionId, DataProperty.DEFAULT_HDD_DATA_PROPERTY);
|
||||
partitionInfo.setDataProperty(testPartitionId, DataProperty.DEFAULT_DATA_PROPERTY);
|
||||
partitionInfo.setReplicationNum(testPartitionId, (short) 3);
|
||||
OlapTable table = new OlapTable(testTableId, name, columns, KeysType.AGG_KEYS, partitionInfo,
|
||||
distributionInfo);
|
||||
@ -168,7 +168,7 @@ abstract public class DorisHttpTestCase {
|
||||
columns.add(k1);
|
||||
columns.add(k2);
|
||||
PartitionInfo partitionInfo = new SinglePartitionInfo();
|
||||
partitionInfo.setDataProperty(testPartitionId + 100, DataProperty.DEFAULT_HDD_DATA_PROPERTY);
|
||||
partitionInfo.setDataProperty(testPartitionId + 100, DataProperty.DEFAULT_DATA_PROPERTY);
|
||||
partitionInfo.setReplicationNum(testPartitionId + 100, (short) 3);
|
||||
EsTable table = null;
|
||||
Map<String, String> props = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user