forked from brianfrankcooper/YCSB
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tablestore] Add binding for Alibaba Cloud's TableStore (brianfrankco…
- Loading branch information
Showing
10 changed files
with
460 additions
and
1 deletion.
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
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!-- | ||
Copyright (c) 2018 YCSB contributors. All rights reserved. | ||
Licensed 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. See accompanying | ||
LICENSE file. | ||
--> | ||
|
||
# Alibaba Cloud TableStore Driver for YCSB | ||
|
||
This driver provides a YCSB workload for Alibaba's hosted TableStore, a fully managed NoSQL cloud database service that enables storage of a massive amount of structured and semi-structured data. | ||
|
||
This binding is based on the Java SDK for TableStore. | ||
|
||
## Quick Start | ||
|
||
### Setup a TableStore Instance | ||
|
||
Login to the Alibaba Cloud Console and follow the [Create Instance](https://www.alibabacloud.com/help/doc-detail/55211.htm?spm=a2c63.p38356.b99.17.6822642crAxqTI). | ||
Make a note of the instance name. | ||
|
||
### Create a Table for YCSB Testing | ||
|
||
Follow the [Create Table](https://www.alibabacloud.com/help/doc-detail/55212.htm?spm=a2c63.p38356.b99.18.1e4e50b9dXCcmC). | ||
|
||
The primary key must be exactly one column; the type is 'String'. | ||
Make a note of the table name and primary key name. | ||
|
||
### `tablestore.properties` | ||
|
||
tablestore.properties is the file specifying information needed by TableStore binding. | ||
The minimal tablestore.properties should be look like: | ||
|
||
``` | ||
alibaba.cloud.tablestore.access_id = $access_id | ||
alibaba.cloud.tablestore.access_key = $access_key | ||
# the Instance Access URL in 'instance details' | ||
alibaba.cloud.tablestore.end_point = $end_point | ||
alibaba.cloud.tablestore.instance_name = $instance_name | ||
alibaba.cloud.tablestore.primary_key = $primary_key | ||
``` | ||
|
||
For access_id and access_key, please refer to [Java SDK: Configure an AccessKey](https://www.alibabacloud.com/help/doc-detail/43009.htm?spm=a2c63.p38356.b99.134.728966fcMpTYD1). | ||
|
||
### Load and Run a Workload | ||
|
||
```zsh | ||
table_name='table_name' | ||
|
||
bin/ycsb load tablestore -P workloads/workloada -P tablestore/conf/tablestore.properties -p table=$table_name -threads 2 | ||
bin/ycsb run tablestore -P workloads/workloada -P tablestore/conf/tablestore.properties -p table=$table_name -threads 2 | ||
``` |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright (c) 2018 YCSB contributors. All rights reserved. | ||
|
||
# Licensed 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. See accompanying | ||
# LICENSE file. | ||
|
||
alibaba.cloud.tablestore.access_id = | ||
alibaba.cloud.tablestore.access_key = | ||
alibaba.cloud.tablestore.end_point = | ||
alibaba.cloud.tablestore.instance_name = | ||
alibaba.cloud.tablestore.primary_key = | ||
|
||
# alibaba.cloud.tablestore.max_version = 1 | ||
|
||
# the following parameters provided by Java SDK can be tuned | ||
|
||
# max timeout in millisecond for open a http connection, default value in SDK is 15000 | ||
# alibaba.cloud.tablestore.connection_timeout = | ||
|
||
# max timeout in millisecond for transfering data with a connection, default value in SDK is 15000 | ||
# alibaba.cloud.tablestore.socket_timeout = | ||
|
||
# max http connections can be open, default value in SDK is 300 | ||
# alibaba.cloud.tablestore.max_connections = |
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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.yahoo.ycsb</groupId> | ||
<artifactId>binding-parent</artifactId> | ||
<version>0.16.0-SNAPSHOT</version> | ||
<relativePath>../binding-parent</relativePath> | ||
</parent> | ||
|
||
<artifactId>tablestore-binding</artifactId> | ||
<name>TableStore DB Binding</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.yahoo.ycsb</groupId> | ||
<artifactId>core</artifactId> | ||
<version>${project.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.aliyun.openservices</groupId> | ||
<artifactId>tablestore</artifactId> | ||
<version>${tablestore.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>log4j</groupId> | ||
<artifactId>log4j</artifactId> | ||
<version>1.2.17</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
Oops, something went wrong.