Skip to content

Reorganise packages and classes in searchable snapshots plugin#70814

Merged
tlrx merged 3 commits intoelastic:masterfrom
tlrx:reorganise-searchable-snapshots-plugin
Mar 25, 2021
Merged

Reorganise packages and classes in searchable snapshots plugin#70814
tlrx merged 3 commits intoelastic:masterfrom
tlrx:reorganise-searchable-snapshots-plugin

Conversation

@tlrx
Copy link
Copy Markdown
Member

@tlrx tlrx commented Mar 24, 2021

Note: I'm opening this PR as a suggestion, I'm fine with closing it straight away or hold it as long as more important changes required to be merged.

Searchable snapshots classes have been spread over multiple packages since the creation of the plugin's project (mea culpa). With the addition of the shared cache and other factorization of IndexInput's code it becomes less obvious to navigate the plugin codebase (at least for me).

This pull request reorganizes the classes to be structured like this:

.
└── org
    └── elasticsearch
        └── xpack
            └── searchablesnapshots
                ├── SearchableSnapshots.java
                ├── action
                │   ├── cache
                │   │   ├── FrozenCacheInfoAction.java
                │   │   ├── FrozenCacheInfoNodeAction.java
                │   │   ├── FrozenCacheInfoResponse.java
                │   │   └── TransportSearchableSnapshotCacheStoresAction.java
                │   ├── AbstractTransportSearchableSnapshotsAction.java
                │   ├── ClearSearchableSnapshotsCacheAction.java
                │   ├── ClearSearchableSnapshotsCacheRequest.java
                │   ├── ClearSearchableSnapshotsCacheResponse.java
                │   ├── SearchableSnapshotsInfoTransportAction.java
                │   ├── SearchableSnapshotsStatsAction.java
                │   ├── SearchableSnapshotsStatsRequest.java
                │   ├── SearchableSnapshotsStatsResponse.java
                │   ├── SearchableSnapshotsUsageTransportAction.java
                │   ├── TransportClearSearchableSnapshotsCacheAction.java
                │   ├── TransportMountSearchableSnapshotAction.java
                │   └── TransportSearchableSnapshotsStatsAction.java
                ├── allocation
                │   ├── decider
                │   │   ├── HasFrozenCacheAllocationDecider.java
                │   │   ├── SearchableSnapshotAllocationDecider.java
                │   │   └── SearchableSnapshotEnableAllocationDecider.java
                │   ├── FailShardsOnInvalidLicenseClusterListener.java
                │   ├── SearchableSnapshotAllocator.java
                │   ├── SearchableSnapshotIndexEventListener.java
                │   └── SearchableSnapshotIndexFoldersDeletionListener.java
                ├── cache
                │   ├── blob
                │   │   ├── BlobStoreCacheService.java
                │   │   └── CachedBlob.java
                │   ├── common
                │   │   ├── ByteRange.java
                │   │   ├── CacheFile.java
                │   │   ├── CacheKey.java
                │   │   ├── ProgressListenableActionFuture.java
                │   │   └── SparseFileTracker.java
                │   ├── full
                │   │   ├── CacheService.java
                │   │   └── PersistentCache.java
                │   └── shared
                │       ├── FrozenCacheInfoService.java
                │       ├── FrozenCacheService.java
                │       └── SharedBytes.java
                ├── recovery
                │   └── SearchableSnapshotRecoveryState.java
                ├── rest
                │   ├── RestClearSearchableSnapshotsCacheAction.java
                │   ├── RestMountSearchableSnapshotAction.java
                │   └── RestSearchableSnapshotsStatsAction.java
                └── store
                    ├── IndexInputStats.java
                    ├── InMemoryNoOpCommitDirectory.java
                    ├── input
                    │   ├── BaseSearchableSnapshotIndexInput.java
                    │   ├── CachedBlobContainerIndexInput.java
                    │   ├── ChecksumBlobContainerIndexInput.java
                    │   ├── DirectBlobContainerIndexInput.java
                    │   ├── FrozenIndexInput.java
                    │   └── MetadataCachingIndexInput.java
                    └── SearchableSnapshotDirectory.java

Files are only moved (not renamed), and only few methods and interfaces in CacheFile and TestUtils were made public. Unit and integration tests have been reorganized to follow the same package hierarchy.

@tlrx tlrx added >non-issue :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.0.0 v7.13.0 v7.12.1 labels Mar 24, 2021
@elasticmachine elasticmachine added the Team:Distributed Meta label for distributed team. label Mar 24, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

Copy link
Copy Markdown
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

tlrx added a commit to tlrx/elasticsearch that referenced this pull request Mar 25, 2021
Searchable snapshots classes have been spread over
multiple packages since the creation of the plugin's
project (mea culpa). With the addition of the shared
cache and other factorization of IndexInput's code
it becomes less obvious to navigate the plugin
codebase.

Backport of elastic#70814 for 7.x
tlrx added a commit to tlrx/elasticsearch that referenced this pull request Mar 25, 2021
Searchable snapshots classes have been spread over
multiple packages since the creation of the plugin's
project (mea culpa). With the addition of the shared
cache and other factorization of IndexInput's code
it becomes less obvious to navigate the plugin
codebase.

Backport of elastic#70814 for 7.12
@tlrx tlrx merged commit 64dee7a into elastic:master Mar 25, 2021
tlrx added a commit that referenced this pull request Mar 25, 2021
…70851)

Searchable snapshots classes have been spread over
multiple packages since the creation of the plugin's
project (mea culpa). With the addition of the shared
cache and other factorization of IndexInput's code
it becomes less obvious to navigate the plugin
codebase.

Backport of #70814 for 7.x
tlrx added a commit that referenced this pull request Mar 25, 2021
…#70852)

Searchable snapshots classes have been spread over
multiple packages since the creation of the plugin's
project (mea culpa). With the addition of the shared
cache and other factorization of IndexInput's code
it becomes less obvious to navigate the plugin
codebase.

Backport of #70814 for 7.12
@tlrx tlrx deleted the reorganise-searchable-snapshots-plugin branch March 25, 2021 09:54
ywelsch pushed a commit to ywelsch/elasticsearch that referenced this pull request Mar 26, 2021
…lastic#70851)

Searchable snapshots classes have been spread over
multiple packages since the creation of the plugin's
project (mea culpa). With the addition of the shared
cache and other factorization of IndexInput's code
it becomes less obvious to navigate the plugin
codebase.

Backport of elastic#70814 for 7.x
ywelsch pushed a commit that referenced this pull request Mar 26, 2021
…#70850)

Searchable snapshots classes have been spread over
multiple packages since the creation of the plugin's
project (mea culpa). With the addition of the shared
cache and other factorization of IndexInput's code
it becomes less obvious to navigate the plugin
codebase.

Backport of #70814 for 7.12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >non-issue Team:Distributed Meta label for distributed team. v7.12.1 v7.13.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants