Refine storage-extention.md (#6885)
This commit is contained in:
parent
f3175ec517
commit
63ea62f210
|
|
@ -1,10 +1,10 @@
|
|||
# Extend storage
|
||||
SkyWalking has already provided several storage solutions. In this document, you could
|
||||
learn how to implement a new storage easily.
|
||||
learn how to easily implement a new storage.
|
||||
|
||||
## Define your storage provider
|
||||
1. Define a class extends `org.apache.skywalking.oap.server.library.module.ModuleProvider`.
|
||||
2. Set this provider targeting to Storage module.
|
||||
1. Define class extension `org.apache.skywalking.oap.server.library.module.ModuleProvider`.
|
||||
2. Set this provider targeting to storage module.
|
||||
```java
|
||||
@Override
|
||||
public Class<? extends ModuleDefine> module() {
|
||||
|
|
@ -13,7 +13,7 @@ public Class<? extends ModuleDefine> module() {
|
|||
```
|
||||
|
||||
## Implement all DAOs
|
||||
Here is the list of all DAO interfaces in storage
|
||||
Here's a list of all DAO interfaces in storage:
|
||||
1. IServiceInventoryCacheDAO
|
||||
1. IServiceInstanceInventoryCacheDAO
|
||||
1. IEndpointInventoryCacheDAO
|
||||
|
|
@ -40,12 +40,11 @@ Here is the list of all DAO interfaces in storage
|
|||
1. IProfileThreadSnapshotQueryDAO
|
||||
1. UITemplateManagementDAO
|
||||
## Register all service implementations
|
||||
In `public void prepare()`, use `this#registerServiceImplementation` method to do register binding your implementation with the above interfaces.
|
||||
In `public void prepare()`, use `this#registerServiceImplementation` method to register and bind with your implementation of the above interfaces.
|
||||
|
||||
## Example
|
||||
Take `org.apache.skywalking.oap.server.storage.plugin.elasticsearch.StorageModuleElasticsearchProvider`
|
||||
or `org.apache.skywalking.oap.server.storage.plugin.jdbc.mysql.MySQLStorageProvider` as a good example.
|
||||
`org.apache.skywalking.oap.server.storage.plugin.elasticsearch.StorageModuleElasticsearchProvider` and `org.apache.skywalking.oap.server.storage.plugin.jdbc.mysql.MySQLStorageProvider` are good examples.
|
||||
|
||||
## Redistribution with new storage implementation.
|
||||
You don't have to clone the main repo just for implementing the storage. You could just easy depend our Apache releases.
|
||||
## Redistribution with new storage implementation
|
||||
To implement the storage, you don't have to clone the main repo. Simply use our Apache releases.
|
||||
Take a look at [SkyAPM/SkyWalking-With-Es5x-Storage](https://github.com/SkyAPM/SkyWalking-With-Es5x-Storage) repo, SkyWalking v6 redistribution with ElasticSearch 5 TCP connection storage implementation.
|
||||
|
|
|
|||
Loading…
Reference in New Issue