Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
zddr committed Nov 21, 2024
1 parent 6abcd8c commit 84cf2f8
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,8 @@ public List<Long> getAllTabletIds() {
for (Partition partition : getPartitions()) {
for (MaterializedIndex index : partition.getMaterializedIndices(IndexExtState.ALL)) {
tabletIds.addAll(index.getTablets().stream()
.map(tablet -> tablet.getId())
.collect(Collectors.toList()));
.map(tablet -> tablet.getId())
.collect(Collectors.toList()));
}
}
} catch (Exception e) {
Expand Down Expand Up @@ -695,7 +695,6 @@ public Column getVisibleColumn(String columnName) {
/**
* This function is for statistics collection only. To get all the index ids that contains the given columnName.
* For base index, return -1 as its id, this is for compatibility with older version of column stats.
*
* @param columnName
* @return index id list that contains the given columnName.
*/
Expand Down Expand Up @@ -738,7 +737,7 @@ public void renameColumnNamePrefix(long idxId) {
* Reset properties to correct values.
*/
public void resetPropertiesForRestore(boolean reserveDynamicPartitionEnable, boolean reserveReplica,
ReplicaAllocation replicaAlloc, boolean isBeingSynced) {
ReplicaAllocation replicaAlloc, boolean isBeingSynced) {
if (tableProperty != null) {
tableProperty.resetPropertiesForRestore(reserveDynamicPartitionEnable, reserveReplica, replicaAlloc);
}
Expand All @@ -751,7 +750,7 @@ public void resetPropertiesForRestore(boolean reserveDynamicPartitionEnable, boo

/**
* Set the related properties when is_being_synced properties is true.
* <p>
*
* Some properties, like storage_policy, colocate_with, are not supported by the ccr syncer.
*/
public void setBeingSyncedProperties() {
Expand Down Expand Up @@ -1804,7 +1803,7 @@ public void readFields(DataInput in) throws IOException {
// the MaterializedIndexMeta correctly.
if (indexMeta.getIndexId() != indexId) {
LOG.warn("HACK: the index id {} in materialized index meta of {} is not equals"
+ " to the index saved in table {} ({}), reset it to {}",
+ " to the index saved in table {} ({}), reset it to {}",
indexMeta.getIndexId(), indexName, name, id, indexId);
indexMeta.resetIndexIdForRestore(indexId, null, null);
}
Expand Down Expand Up @@ -1914,7 +1913,7 @@ public void gsonPostProcess() throws IOException {
MaterializedIndexMeta indexMeta = entry.getValue();
if (indexMeta.getIndexId() != indexId) {
LOG.warn("HACK: the index id {} in materialized index meta of {} is not equals"
+ " to the index saved in table {} ({}), reset it to {}",
+ " to the index saved in table {} ({}), reset it to {}",
indexMeta.getIndexId(), indexNameToId.get(indexId), name, id, indexId);
indexMeta.resetIndexIdForRestore(indexId, null, null);
}
Expand All @@ -1926,7 +1925,7 @@ public void gsonPostProcess() throws IOException {
}

if (Env.getCurrentEnvJournalVersion() >= FeMetaVersion.VERSION_124
&& autoIncrementGenerator != null) {
&& autoIncrementGenerator != null) {
autoIncrementGenerator.setEditLog(Env.getCurrentEnv().getEditLog());
}
if (isAutoBucket()) {
Expand Down Expand Up @@ -2363,7 +2362,7 @@ public void setTTLSeconds(long ttlSeconds) {
tableProperty = new TableProperty(new HashMap<>());
}
tableProperty.modifyTableProperties(PropertyAnalyzer.PROPERTIES_FILE_CACHE_TTL_SECONDS,
Long.valueOf(ttlSeconds).toString());
Long.valueOf(ttlSeconds).toString());
tableProperty.buildTTLSeconds();
}

Expand Down Expand Up @@ -2537,7 +2536,7 @@ public String getCompactionPolicy() {
public void setTimeSeriesCompactionGoalSizeMbytes(long timeSeriesCompactionGoalSizeMbytes) {
TableProperty tableProperty = getOrCreatTableProperty();
tableProperty.modifyTableProperties(PropertyAnalyzer.PROPERTIES_TIME_SERIES_COMPACTION_GOAL_SIZE_MBYTES,
Long.valueOf(timeSeriesCompactionGoalSizeMbytes).toString());
Long.valueOf(timeSeriesCompactionGoalSizeMbytes).toString());
tableProperty.buildTimeSeriesCompactionGoalSizeMbytes();
}

Expand All @@ -2551,7 +2550,7 @@ public Long getTimeSeriesCompactionGoalSizeMbytes() {
public void setTimeSeriesCompactionFileCountThreshold(long timeSeriesCompactionFileCountThreshold) {
TableProperty tableProperty = getOrCreatTableProperty();
tableProperty.modifyTableProperties(PropertyAnalyzer.PROPERTIES_TIME_SERIES_COMPACTION_FILE_COUNT_THRESHOLD,
Long.valueOf(timeSeriesCompactionFileCountThreshold).toString());
Long.valueOf(timeSeriesCompactionFileCountThreshold).toString());
tableProperty.buildTimeSeriesCompactionFileCountThreshold();
}

Expand All @@ -2565,8 +2564,8 @@ public Long getTimeSeriesCompactionFileCountThreshold() {
public void setTimeSeriesCompactionTimeThresholdSeconds(long timeSeriesCompactionTimeThresholdSeconds) {
TableProperty tableProperty = getOrCreatTableProperty();
tableProperty.modifyTableProperties(PropertyAnalyzer
.PROPERTIES_TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS,
Long.valueOf(timeSeriesCompactionTimeThresholdSeconds).toString());
.PROPERTIES_TIME_SERIES_COMPACTION_TIME_THRESHOLD_SECONDS,
Long.valueOf(timeSeriesCompactionTimeThresholdSeconds).toString());
tableProperty.buildTimeSeriesCompactionTimeThresholdSeconds();
}

Expand All @@ -2580,7 +2579,7 @@ public Long getTimeSeriesCompactionTimeThresholdSeconds() {
public void setTimeSeriesCompactionEmptyRowsetsThreshold(long timeSeriesCompactionEmptyRowsetsThreshold) {
TableProperty tableProperty = getOrCreatTableProperty();
tableProperty.modifyTableProperties(PropertyAnalyzer.PROPERTIES_TIME_SERIES_COMPACTION_EMPTY_ROWSETS_THRESHOLD,
Long.valueOf(timeSeriesCompactionEmptyRowsetsThreshold).toString());
Long.valueOf(timeSeriesCompactionEmptyRowsetsThreshold).toString());
tableProperty.buildTimeSeriesCompactionEmptyRowsetsThreshold();
}

Expand All @@ -2594,7 +2593,7 @@ public Long getTimeSeriesCompactionEmptyRowsetsThreshold() {
public void setTimeSeriesCompactionLevelThreshold(long timeSeriesCompactionLevelThreshold) {
TableProperty tableProperty = getOrCreatTableProperty();
tableProperty.modifyTableProperties(PropertyAnalyzer.PROPERTIES_TIME_SERIES_COMPACTION_LEVEL_THRESHOLD,
Long.valueOf(timeSeriesCompactionLevelThreshold).toString());
Long.valueOf(timeSeriesCompactionLevelThreshold).toString());
tableProperty.buildTimeSeriesCompactionLevelThreshold();
}

Expand Down Expand Up @@ -3413,7 +3412,7 @@ public boolean autoAnalyzeEnabled() {
Map<String, String> properties = tableProperty.getProperties();
if (properties == null || !properties.containsKey(PropertyAnalyzer.PROPERTIES_AUTO_ANALYZE_POLICY)
|| properties.get(PropertyAnalyzer.PROPERTIES_AUTO_ANALYZE_POLICY)
.equalsIgnoreCase(PropertyAnalyzer.USE_CATALOG_AUTO_ANALYZE_POLICY)) {
.equalsIgnoreCase(PropertyAnalyzer.USE_CATALOG_AUTO_ANALYZE_POLICY)) {
return super.autoAnalyzeEnabled();
}
return properties.get(PropertyAnalyzer.PROPERTIES_AUTO_ANALYZE_POLICY)
Expand Down

0 comments on commit 84cf2f8

Please sign in to comment.