Refine storage-extention.md (#6885)
This commit is contained in:
parent
f3175ec517
commit
63ea62f210
|
|
@ -1,10 +1,10 @@
|
||||||
# Extend storage
|
# Extend storage
|
||||||
SkyWalking has already provided several storage solutions. In this document, you could
|
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
|
## Define your storage provider
|
||||||
1. Define a class extends `org.apache.skywalking.oap.server.library.module.ModuleProvider`.
|
1. Define class extension `org.apache.skywalking.oap.server.library.module.ModuleProvider`.
|
||||||
2. Set this provider targeting to Storage module.
|
2. Set this provider targeting to storage module.
|
||||||
```java
|
```java
|
||||||
@Override
|
@Override
|
||||||
public Class<? extends ModuleDefine> module() {
|
public Class<? extends ModuleDefine> module() {
|
||||||
|
|
@ -13,7 +13,7 @@ public Class<? extends ModuleDefine> module() {
|
||||||
```
|
```
|
||||||
|
|
||||||
## Implement all DAOs
|
## 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. IServiceInventoryCacheDAO
|
||||||
1. IServiceInstanceInventoryCacheDAO
|
1. IServiceInstanceInventoryCacheDAO
|
||||||
1. IEndpointInventoryCacheDAO
|
1. IEndpointInventoryCacheDAO
|
||||||
|
|
@ -40,12 +40,11 @@ Here is the list of all DAO interfaces in storage
|
||||||
1. IProfileThreadSnapshotQueryDAO
|
1. IProfileThreadSnapshotQueryDAO
|
||||||
1. UITemplateManagementDAO
|
1. UITemplateManagementDAO
|
||||||
## Register all service implementations
|
## 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
|
## Example
|
||||||
Take `org.apache.skywalking.oap.server.storage.plugin.elasticsearch.StorageModuleElasticsearchProvider`
|
`org.apache.skywalking.oap.server.storage.plugin.elasticsearch.StorageModuleElasticsearchProvider` and `org.apache.skywalking.oap.server.storage.plugin.jdbc.mysql.MySQLStorageProvider` are good examples.
|
||||||
or `org.apache.skywalking.oap.server.storage.plugin.jdbc.mysql.MySQLStorageProvider` as a good example.
|
|
||||||
|
|
||||||
## Redistribution with new storage implementation.
|
## 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.
|
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.
|
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