Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tiered storage] move offloader implementation to a separate module (#…
…2371) ### Motivation We need tiered storage implementation available for Pulsar SQL. And we need to use NAR plugin for packaging different offloaders to avoid version conflicts. ### Changes - Create `tiered-storage` and `tiered-storage/jcloud` modules. - Move `org.apache.pulsar.broker.offload` to `tiered-storage/jcloud`. - Add `TieredStorageConfigurationData` for all tiered storage related configuration ### NOTES This change is mainly for relocating files only.
- Loading branch information
Showing
26 changed files
with
292 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,58 @@ | |||
<!-- | |||
Licensed to the Apache Software Foundation (ASF) under one | |||
or more contributor license agreements. See the NOTICE file | |||
distributed with this work for additional information | |||
regarding copyright ownership. The ASF licenses this file | |||
to you under the Apache License, Version 2.0 (the | |||
"License"); you may not use this file except in compliance | |||
with the License. You may obtain a copy of the License at | |||
http://www.apache.org/licenses/LICENSE-2.0 | |||
Unless required by applicable law or agreed to in writing, | |||
software distributed under the License is distributed on an | |||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |||
KIND, either express or implied. See the License for the | |||
specific language governing permissions and limitations | |||
under the License. | |||
--> | |||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |||
<modelVersion>4.0.0</modelVersion> | |||
|
|||
<parent> | |||
<groupId>org.apache.pulsar</groupId> | |||
<artifactId>tiered-storage-parent</artifactId> | |||
<version>2.2.0-incubating-SNAPSHOT</version> | |||
<relativePath>..</relativePath> | |||
</parent> | |||
|
|||
<artifactId>tiered-storage-jcloud</artifactId> | |||
<name>Apache Pulsar :: Tiered Storage :: JCloud</name> | |||
|
|||
<dependencies> | |||
<dependency> | |||
<groupId>org.apache.pulsar</groupId> | |||
<artifactId>managed-ledger-original</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.pulsar</groupId> | |||
<artifactId>jclouds-shaded</artifactId> | |||
<version>${project.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.amazonaws</groupId> | |||
<artifactId>aws-java-sdk-core</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.apache.pulsar</groupId> | |||
<artifactId>managed-ledger-original</artifactId> | |||
<version>${project.version}</version> | |||
<type>test-jar</type> | |||
<scope>test</scope> | |||
</dependency> | |||
</dependencies> | |||
</project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
69 changes: 69 additions & 0 deletions
69
...jcloud/src/main/java/org/apache/pulsar/broker/offload/TieredStorageConfigurationData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,69 @@ | |||
/** | |||
* Licensed to the Apache Software Foundation (ASF) under one | |||
* or more contributor license agreements. See the NOTICE file | |||
* distributed with this work for additional information | |||
* regarding copyright ownership. The ASF licenses this file | |||
* to you under the Apache License, Version 2.0 (the | |||
* "License"); you may not use this file except in compliance | |||
* with the License. You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, | |||
* software distributed under the License is distributed on an | |||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |||
* KIND, either express or implied. See the License for the | |||
* specific language governing permissions and limitations | |||
* under the License. | |||
*/ | |||
package org.apache.pulsar.broker.offload; | |||
|
|||
import java.io.Serializable; | |||
import lombok.Data; | |||
|
|||
/** | |||
* Configuration for tiered storage. | |||
*/ | |||
@Data | |||
public class TieredStorageConfigurationData implements Serializable, Cloneable{ | |||
|
|||
/**** --- Ledger Offloading --- ****/ | |||
// Driver to use to offload old data to long term storage | |||
private String managedLedgerOffloadDriver = null; | |||
|
|||
// Maximum number of thread pool threads for ledger offloading | |||
private int managedLedgerOffloadMaxThreads = 2; | |||
|
|||
// For Amazon S3 ledger offload, AWS region | |||
private String s3ManagedLedgerOffloadRegion = null; | |||
|
|||
// For Amazon S3 ledger offload, Bucket to place offloaded ledger into | |||
private String s3ManagedLedgerOffloadBucket = null; | |||
|
|||
// For Amazon S3 ledger offload, Alternative endpoint to connect to (useful for testing) | |||
private String s3ManagedLedgerOffloadServiceEndpoint = null; | |||
|
|||
// For Amazon S3 ledger offload, Max block size in bytes. | |||
private int s3ManagedLedgerOffloadMaxBlockSizeInBytes = 64 * 1024 * 1024; // 64MB | |||
|
|||
// For Amazon S3 ledger offload, Read buffer size in bytes. | |||
private int s3ManagedLedgerOffloadReadBufferSizeInBytes = 1024 * 1024; // 1MB | |||
|
|||
// For Google Cloud Storage ledger offload, region where offload bucket is located. | |||
// reference this page for more details: https://cloud.google.com/storage/docs/bucket-locations | |||
private String gcsManagedLedgerOffloadRegion = null; | |||
|
|||
// For Google Cloud Storage ledger offload, Bucket to place offloaded ledger into | |||
private String gcsManagedLedgerOffloadBucket = null; | |||
|
|||
// For Google Cloud Storage ledger offload, Max block size in bytes. | |||
private int gcsManagedLedgerOffloadMaxBlockSizeInBytes = 64 * 1024 * 1024; // 64MB | |||
|
|||
// For Google Cloud Storage ledger offload, Read buffer size in bytes. | |||
private int gcsManagedLedgerOffloadReadBufferSizeInBytes = 1024 * 1024; // 1MB | |||
|
|||
// For Google Cloud Storage, path to json file containing service account credentials. | |||
// For more details, see the "Service Accounts" section of https://support.google.com/googleapi/answer/6158849 | |||
private String gcsManagedLedgerOffloadServiceAccountKeyFile = null; | |||
|
|||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.