feat(hbase): add HBase REST support

This commit is contained in:
zipg authored and GitHub committed 2026-07-28 11:28:02 +08:00
1 parent 1cdbf4fa3d
commit 44cb4acbb7
48 files changed
+2455 -19

No files matched your search

+9
View File
@@ -424,6 +424,15 @@ export const zookeeperGet = forward("zookeeperGet");
export const zookeeperPut = forward("zookeeperPut");
export const zookeeperDelete = forward("zookeeperDelete");
// HBase
export const hbaseGetTableSchema = forward("hbaseGetTableSchema");
export const hbaseScanRows = forward("hbaseScanRows");
export const hbaseGetRow = forward("hbaseGetRow");
export const hbasePutRow = forward("hbasePutRow");
export const hbaseDeleteRow = forward("hbaseDeleteRow");
export const hbaseCreateTable = forward("hbaseCreateTable");
export const hbaseDeleteTable = forward("hbaseDeleteTable");
// Message Queue
export const mqTestConnection = forward("mqTestConnection");
export const mqListTenants = forward("mqListTenants");
+32
View File
@@ -2295,6 +2295,38 @@ export async function nacosRawRequest(connectionId: string, req: NacosRawRequest
return post("/api/nacos/raw", { connectionId, req });
}
// ---------------------------------------------------------------------------
// HBase
// ---------------------------------------------------------------------------
export async function hbaseGetTableSchema(connectionId: string, namespace: string, table: string): Promise<import("@/types/hbase").HBaseTableSchema> {
return post("/api/hbase/table-schema", { connectionId, namespace, table });
}
export async function hbaseScanRows(connectionId: string, namespace: string, table: string, rowKeyPrefix: string | undefined, limit: number): Promise<import("@/types/hbase").HBaseScanResult> {
return post("/api/hbase/scan-rows", { connectionId, namespace, table, rowKeyPrefix, limit });
}
export async function hbaseGetRow(connectionId: string, namespace: string, table: string, rowKey: string, rowKeyEncoding?: import("@/types/hbase").HBaseValueEncoding): Promise<import("@/types/hbase").HBaseRow | null> {
return post("/api/hbase/get-row", { connectionId, namespace, table, rowKey, rowKeyEncoding });
}
export async function hbasePutRow(connectionId: string, namespace: string, table: string, input: import("@/types/hbase").HBasePutRowInput): Promise<void> {
return post("/api/hbase/put-row", { connectionId, namespace, table, input });
}
export async function hbaseDeleteRow(connectionId: string, namespace: string, table: string, rowKey: string, rowKeyEncoding?: import("@/types/hbase").HBaseValueEncoding): Promise<void> {
return post("/api/hbase/delete-row", { connectionId, namespace, table, rowKey, rowKeyEncoding });
}
export async function hbaseCreateTable(connectionId: string, namespace: string, table: string, columnFamilies: string[]): Promise<void> {
return post("/api/hbase/create-table", { connectionId, namespace, table, columnFamilies });
}
export async function hbaseDeleteTable(connectionId: string, namespace: string, table: string): Promise<void> {
return post("/api/hbase/delete-table", { connectionId, namespace, table });
}
// ---------------------------------------------------------------------------
// MongoDB
// ---------------------------------------------------------------------------
+29
View File
@@ -2062,6 +2062,35 @@ export async function zookeeperDelete(connectionId: string, key: string): Promis
return invoke("zookeeper_delete", { connectionId, key });
}
// --- HBase ---
export async function hbaseGetTableSchema(connectionId: string, namespace: string, table: string): Promise<import("@/types/hbase").HBaseTableSchema> {
return invoke("hbase_get_table_schema", { connectionId, namespace, table });
}
export async function hbaseScanRows(connectionId: string, namespace: string, table: string, rowKeyPrefix: string | undefined, limit: number): Promise<import("@/types/hbase").HBaseScanResult> {
return invoke("hbase_scan_rows", { connectionId, namespace, table, rowKeyPrefix, limit });
}
export async function hbaseGetRow(connectionId: string, namespace: string, table: string, rowKey: string, rowKeyEncoding?: import("@/types/hbase").HBaseValueEncoding): Promise<import("@/types/hbase").HBaseRow | null> {
return invoke("hbase_get_row", { connectionId, namespace, table, rowKey, rowKeyEncoding });
}
export async function hbasePutRow(connectionId: string, namespace: string, table: string, input: import("@/types/hbase").HBasePutRowInput): Promise<void> {
return invoke("hbase_put_row", { connectionId, namespace, table, input });
}
export async function hbaseDeleteRow(connectionId: string, namespace: string, table: string, rowKey: string, rowKeyEncoding?: import("@/types/hbase").HBaseValueEncoding): Promise<void> {
return invoke("hbase_delete_row", { connectionId, namespace, table, rowKey, rowKeyEncoding });
}
export async function hbaseCreateTable(connectionId: string, namespace: string, table: string, columnFamilies: string[]): Promise<void> {
return invoke("hbase_create_table", { connectionId, namespace, table, columnFamilies });
}
export async function hbaseDeleteTable(connectionId: string, namespace: string, table: string): Promise<void> {
return invoke("hbase_delete_table", { connectionId, namespace, table });
}
// --- Document stores ---
export interface DocumentQueryResult {
documents: any[];