Implement HDFS partitioned parquet storage for SS #102
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes and provide context
This PR introduces a new
parquetstorage backend for thesspackage. The primary goal is to significantly optimize MVCC-based queries, particularlydebug_tracequeries from RPC nodes, by leveraging Parquet's columnar format and HDFS-style partitioning.Key features include:
version(block height) andaccount owner(version={height}/owner={account}/data_{version}.parquet), enabling efficient data pruning and targeted access.OptimizedQuery,GetAccountHistory,GetVersionSnapshot, andBulkQueryare implemented to take advantage of partitioning, columnar storage, predicate pushdown, and parallel processing for faster data retrieval.types.StateStoreinterface, includingGet,Has,Iterator,ReverseIterator,ApplyChangeset, andImport/RawImportwith write buffering and MVCC semantics.This new backend aims to make historical data queries, especially for debugging purposes, much faster and more resource-efficient.
Testing performed to validate your change
TestOptimizedQuery,TestGetAccountHistory,TestBulkQuery) were added to validate the functionality and optimizations of the new query methods.Example_debugTraceQuerydemonstrates the usage and performance benefits of the optimized queries.sstest.StorageTestSuiteis used to run a comprehensive suite of tests against theparquetbackend, ensuring full compliance with thetypes.StateStoreinterface and expected behavior.parquet-golibrary and existing codebase.