feat: remove OpenSearch, add ClickHouse admin page
Remove all OpenSearch code, dependencies, configuration, deployment manifests, and CI/CD references. Replace the OpenSearch admin page with a ClickHouse admin page showing cluster status, table sizes, performance metrics, and indexer pipeline stats. - Delete 11 OpenSearch Java files (config, search impl, admin controller, DTOs, tests) - Delete 3 OpenSearch frontend files (admin page, CSS, query hooks) - Delete deploy/opensearch.yaml K8s manifest - Remove opensearch Maven dependencies from pom.xml - Remove opensearch config from application.yml, Dockerfile, docker-compose - Remove opensearch from CI workflow (secrets, deploy, cleanup steps) - Simplify ThresholdConfig (remove OpenSearch thresholds, database-only) - Change default search backend from opensearch to clickhouse - Add ClickHouseAdminController with /status, /tables, /performance, /pipeline - Add ClickHouseAdminPage with StatCards, pipeline ProgressBar, tables DataTable - Update CLAUDE.md, HOWTO.md, and source comments Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
package com.cameleer3.server.core.admin;
|
||||
|
||||
public record ThresholdConfig(
|
||||
DatabaseThresholds database,
|
||||
OpenSearchThresholds opensearch
|
||||
DatabaseThresholds database
|
||||
) {
|
||||
public record DatabaseThresholds(
|
||||
int connectionPoolWarning,
|
||||
@@ -15,22 +14,7 @@ public record ThresholdConfig(
|
||||
}
|
||||
}
|
||||
|
||||
public record OpenSearchThresholds(
|
||||
String clusterHealthWarning,
|
||||
String clusterHealthCritical,
|
||||
int queueDepthWarning,
|
||||
int queueDepthCritical,
|
||||
int jvmHeapWarning,
|
||||
int jvmHeapCritical,
|
||||
int failedDocsWarning,
|
||||
int failedDocsCritical
|
||||
) {
|
||||
public static OpenSearchThresholds defaults() {
|
||||
return new OpenSearchThresholds("YELLOW", "RED", 100, 500, 75, 90, 1, 10);
|
||||
}
|
||||
}
|
||||
|
||||
public static ThresholdConfig defaults() {
|
||||
return new ThresholdConfig(DatabaseThresholds.defaults(), OpenSearchThresholds.defaults());
|
||||
return new ThresholdConfig(DatabaseThresholds.defaults());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,8 +59,7 @@ public record SearchRequest(
|
||||
"durationMs", "executionId", "applicationId"
|
||||
);
|
||||
|
||||
/** Maps camelCase API sort field names to OpenSearch field names.
|
||||
* Text fields use .keyword subfield; date/numeric fields are used directly. */
|
||||
/** Maps camelCase API sort field names to storage column names. */
|
||||
private static final java.util.Map<String, String> SORT_FIELD_TO_COLUMN = java.util.Map.ofEntries(
|
||||
java.util.Map.entry("startTime", "start_time"),
|
||||
java.util.Map.entry("durationMs", "duration_ms"),
|
||||
@@ -80,7 +79,7 @@ public record SearchRequest(
|
||||
if (!"asc".equalsIgnoreCase(sortDir)) sortDir = "desc";
|
||||
}
|
||||
|
||||
/** Returns the snake_case column name for OpenSearch/DB ORDER BY. */
|
||||
/** Returns the snake_case column name for ORDER BY. */
|
||||
public String sortColumn() {
|
||||
return SORT_FIELD_TO_COLUMN.getOrDefault(sortField, "start_time");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user