Skip to content

Add DefaultStorageBackendFactory and MockHBaseStorageBackend#192

Merged
em3s merged 14 commits intomainfrom
feat/storage-backend-hbase
Feb 9, 2026
Merged

Add DefaultStorageBackendFactory and MockHBaseStorageBackend#192
em3s merged 14 commits intomainfrom
feat/storage-backend-hbase

Conversation

@em3s
Copy link
Copy Markdown
Contributor

@em3s em3s commented Feb 9, 2026

Summary

  • Add DefaultStorageBackendFactory — creates StorageBackend instances from DatastoreUri (dispatches to Memory or HBase)
  • Add MockHBaseStorageBackend — lightweight mock for tests without HBase cluster
  • Add HBaseTestingStorageBackend — test fixture bridging StorageBackend to HBaseTestingClusterExtension
  • Update HBaseTestingClusterExtension — add getStorageBackend() for new storage abstraction

Storage backend series: PR #191 (merged) → PR #194 (merged) → this PR

Changed files

Type File
NEW DefaultStorageBackendFactory.kt
NEW MockHBaseStorageBackend.kt
NEW DefaultStorageBackendFactoryTest.kt
NEW HBaseTestingStorageBackend.kt (testFixtures)
MOD HBaseTestingClusterExtension.kt (testFixtures)

Test plan

  • ./gradlew :engine:build passes
  • CI passes

🤖 Generated with Claude Code

Introduce StorageBackend interface and supporting types as the foundation
for a pluggable storage layer, with an in-memory implementation for testing.

New types:
- StorageBackend: Interface for storage backend implementations
- StorageBucket: Interface for key-value operations (get, put, delete, scan, etc.)
- StorageBuckets: Data class holding edge and lock buckets
- DatastoreUri: Utility for parsing datastore:// URIs with input validation
- MemoryStorageBucket: In-memory StorageBucket backed by ByteArrayStore
- MemoryStorageBackend: In-memory StorageBackend with isolated stores per namespace

Tests:
- DatastoreUriTest: URI parsing and validation
- StorageBucketCompatibilityTest: Abstract test suite for StorageBucket contracts
- MemoryStorageBucketCompatibilityTest: Memory implementation passes all contracts
- MemoryStorageBackendTest: Backend-level isolation and lifecycle tests

Part of #173

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. module:engine labels Feb 9, 2026
em3s and others added 3 commits February 9, 2026 12:25
…eTables

- StorageBucket → StorageTable (matches table semantics: scan, get, put)
- StorageBuckets removed (edge/lock distinction is legacy, unused)
- StorageBackend.getBucket() → StorageBackend.open() → Mono<StorageTable>
- MemoryStorageBucket → MemoryStorageTable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add HBase-specific StorageBackend implementation and a factory for
creating storage backends based on configuration.

New types:
- HBaseStorageBucket: StorageBucket backed by HBase AsyncTable
- HBaseStorageBackend: StorageBackend for HBase clusters with Kerberos support
- MockHBaseStorageBackend: Mock HBase backend using MockHTable for testing
- DefaultStorageBackendFactory: Factory for creating backends (memory/embedded/hbase)

Test fixtures:
- HBaseTestingStorageBackend: Backend using HBase testing cluster
- HBaseTestingClusterExtension: Updated to initialize DefaultStorageBackendFactory

Tests:
- HBaseStorageBucketCompatibilityTest: HBase impl passes StorageBucket contract
- HBaseStorageBackendTest: Validation of create() parameters
- DefaultStorageBackendFactoryTest: Factory initialization and lifecycle

Part of #173

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align HBase implementation with the renamed StorageTable interface.

- HBaseStorageBucket → HBaseStorageTable
- getBucket() → open() across all StorageBackend implementations
- Remove StorageBuckets references (edge/lock distinction was unused)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@em3s em3s force-pushed the feat/storage-backend-hbase branch from 43f576c to 7c70670 Compare February 9, 2026 03:37
em3s and others added 9 commits February 9, 2026 12:49
open() implies close() semantics. getStorageTable() is more explicit
about what it does. URI overload becomes a default method.
Removed deprecated getTable() methods from interface.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Removes uppercase letters and hyphens from allowed characters in
datastore URI namespace and table names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Align HBase implementations with updated StorageBackend interface.
Remove deprecated getTable() methods and URI overloads (now default).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…bjectSource

- Rename package v2.engine.storage → engine.storage for new files
- Convert DatastoreUriTest to @ObjectSource (valid/invalid URI cases)
- Convert MemoryStorageBackendTest to @ObjectSource (getStorageTable cases)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…bjectSource

- Rename package v2.engine.storage → engine.storage for new files
- Convert HBaseStorageBackendTest to @ObjectSource (validation cases)
- Update all imports for package move

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@em3s em3s changed the base branch from feat/storage-backend-interfaces to main February 9, 2026 06:27
…hbase

# Conflicts:
#	engine/src/main/kotlin/com/kakao/actionbase/engine/storage/hbase/HBaseStorageBackend.kt
#	engine/src/main/kotlin/com/kakao/actionbase/engine/storage/hbase/HBaseStorageTable.kt
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Feb 9, 2026
@em3s em3s changed the title feat(engine): add HBase StorageBackend and DefaultStorageBackendFactory feat(engine): add DefaultStorageBackendFactory and MockHBaseStorageBackend Feb 9, 2026
@em3s
Copy link
Copy Markdown
Contributor Author

em3s commented Feb 9, 2026

DefaultHBaseCluster → DefaultStorageBackendFactory + HBaseStorageBackend

Splits DefaultHBaseCluster responsibilities into 3 layers.

DefaultHBaseCluster (v2) New structure (v3)
initialize(properties) — mock/HBase branching DefaultStorageBackendFactory.initialize() — dispatches by type (memory, embedded, hbase)
initialize(properties) — HBase connection logic HBaseStorageBackend.create() — dedicated HBase connection
embedded/mock branching MockHBaseStorageBackend + MemoryStorageBackend
getTable(namespace, name)HBaseTables StorageBackend.getStorageTable()StorageTable
INSTANCE (singleton) DefaultStorageBackendFactory.INSTANCE
close() DefaultStorageBackendFactory.close()

Key change: mock branching, connection management, and table access — previously all in one class — are now separated into Factory / Backend / StorageTable. Interface-based design allows MemoryStorageBackend to fulfill the same contract.

@em3s em3s merged commit 4878674 into main Feb 9, 2026
7 checks passed
@em3s em3s self-assigned this Feb 9, 2026
@em3s em3s changed the title feat(engine): add DefaultStorageBackendFactory and MockHBaseStorageBackend Add DefaultStorageBackendFactory and MockHBaseStorageBackend Feb 12, 2026
@em3s em3s deleted the feat/storage-backend-hbase branch March 1, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant