Feature/kvdb See merge request jd-blockchain/jdchain!11tags/1.4.0^2
| @@ -1 +1 @@ | |||||
| Subproject commit c7f866ea614f8e25d23889842aca63b47cd32f8f | |||||
| Subproject commit 8a2bbf692aaa8a3136c19f8a00bbf70a8e59c25a | |||||
| @@ -1,99 +0,0 @@ | |||||
| <?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/xsd/maven-4.0.0.xsd"> | |||||
| <parent> | |||||
| <artifactId>deploy-root</artifactId> | |||||
| <groupId>com.jd.blockchain</groupId> | |||||
| <version>1.4.0-SNAPSHOT</version> | |||||
| </parent> | |||||
| <modelVersion>4.0.0</modelVersion> | |||||
| <artifactId>deploy-kvdb</artifactId> | |||||
| <version>1.0.1.RELEASE</version> | |||||
| <dependencies> | |||||
| <dependency> | |||||
| <groupId>com.jd.blockchain</groupId> | |||||
| <artifactId>kvdb-protocol</artifactId> | |||||
| <version>${kvdb.version}</version> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>com.jd.blockchain</groupId> | |||||
| <artifactId>kvdb-engine</artifactId> | |||||
| <version>${kvdb.version}</version> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>com.jd.blockchain</groupId> | |||||
| <artifactId>kvdb-server</artifactId> | |||||
| <version>${kvdb.version}</version> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>com.jd.blockchain</groupId> | |||||
| <artifactId>kvdb-cli</artifactId> | |||||
| <version>${kvdb.version}</version> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>com.jd.blockchain</groupId> | |||||
| <artifactId>kvdb-benchmark</artifactId> | |||||
| <version>${kvdb.version}</version> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>com.jd.blockchain</groupId> | |||||
| <artifactId>kvdb-client</artifactId> | |||||
| <version>${kvdb.version}</version> | |||||
| </dependency> | |||||
| </dependencies> | |||||
| <build> | |||||
| <plugins> | |||||
| <plugin> | |||||
| <groupId>org.apache.maven.plugins</groupId> | |||||
| <artifactId>maven-assembly-plugin</artifactId> | |||||
| <executions> | |||||
| <execution> | |||||
| <id>make-assembly</id> | |||||
| <phase>package</phase> | |||||
| <goals> | |||||
| <goal>single</goal> | |||||
| </goals> | |||||
| <configuration> | |||||
| <finalName>kvdb</finalName> | |||||
| <descriptors> | |||||
| <descriptor>src/main/resources/assembly.xml</descriptor> | |||||
| </descriptors> | |||||
| </configuration> | |||||
| </execution> | |||||
| </executions> | |||||
| </plugin> | |||||
| <!-- 生成SHA-256校验文件 --> | |||||
| <plugin> | |||||
| <groupId>net.nicoulaj.maven.plugins</groupId> | |||||
| <artifactId>checksum-maven-plugin</artifactId> | |||||
| <version>1.8</version> | |||||
| <executions> | |||||
| <execution> | |||||
| <goals> | |||||
| <goal>artifacts</goal> | |||||
| </goals> | |||||
| </execution> | |||||
| </executions> | |||||
| <configuration> | |||||
| <algorithms> | |||||
| <algorithm>SHA-256</algorithm> <!--采用SHA-256算法,还支持其他算法--> | |||||
| </algorithms> | |||||
| <file>${project.basedir}/target/deployment-kvdb-${project.version}.zip</file><!--给zip文件进行加密--> | |||||
| <xmlSummary>true</xmlSummary><!--生成XML格式的md5文件--> | |||||
| <xmlSummaryFile>${project.basedir}/target/SHA-256.xml</xmlSummaryFile> | |||||
| </configuration> | |||||
| </plugin> | |||||
| </plugins> | |||||
| </build> | |||||
| </project> | |||||
| @@ -1,54 +0,0 @@ | |||||
| <?xml version='1.0' encoding='UTF-8'?> | |||||
| <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" | |||||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||||
| xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 | |||||
| http://maven.apache.org/xsd/assembly-1.1.0.xsd"> | |||||
| <id>${project.version}</id> | |||||
| <formats> | |||||
| <format>zip</format> | |||||
| </formats> | |||||
| <includeBaseDirectory>false</includeBaseDirectory> | |||||
| <fileSets> | |||||
| <fileSet> | |||||
| <directory>src/main/resources/script</directory> | |||||
| <outputDirectory>bin</outputDirectory> | |||||
| <lineEnding>unix</lineEnding> | |||||
| </fileSet> | |||||
| <fileSet> | |||||
| <directory>src/main/resources/config</directory> | |||||
| <outputDirectory>config</outputDirectory> | |||||
| <lineEnding>unix</lineEnding> | |||||
| </fileSet> | |||||
| <fileSet> | |||||
| <directory>src/main/resources/system</directory> | |||||
| <outputDirectory>system</outputDirectory> | |||||
| <lineEnding>unix</lineEnding> | |||||
| </fileSet> | |||||
| </fileSets> | |||||
| <dependencySets> | |||||
| <dependencySet> | |||||
| <unpack>false</unpack> | |||||
| <useProjectArtifact>true</useProjectArtifact> | |||||
| <outputDirectory>libs</outputDirectory> | |||||
| </dependencySet> | |||||
| </dependencySets> | |||||
| <moduleSets> | |||||
| <moduleSet> | |||||
| <useAllReactorProjects>true</useAllReactorProjects> | |||||
| <includes> | |||||
| <include>com.jd.blockchain:kvdb-engine</include> | |||||
| <include>com.jd.blockchain:kvdb-benchmark</include> | |||||
| <include>com.jd.blockchain:kvdb-client</include> | |||||
| <include>com.jd.blockchain:kvdb-protocol</include> | |||||
| <include>com.jd.blockchain:kvdb-cli</include> | |||||
| <include>com.jd.blockchain:kvdb-server</include> | |||||
| </includes> | |||||
| <binaries> | |||||
| <outputDirectory>libs</outputDirectory> | |||||
| <unpack>false</unpack> | |||||
| </binaries> | |||||
| </moduleSet> | |||||
| </moduleSets> | |||||
| </assembly> | |||||
| @@ -1,11 +0,0 @@ | |||||
| # 数据库集群的分片数,每一个分片都赋予唯一的编号,分片编号最小为 0,所有分片的编号必须连续递增 | |||||
| #cluster.test1.partitions=2 | |||||
| # 数据库集群 ‘<name>’ 的第 1 个分片的数据库实例地址(URL格式); | |||||
| #cluster.test1.0=kvdb://localhost:7078/test1 | |||||
| # 数据库集群 ‘<name>’ 的第 2 个分片的数据库实例地址(URL格式); | |||||
| #cluster.test1.1=kvdb://localhost:7079/test1 | |||||
| # 指定多个不同的集群 | |||||
| #cluster.test2.partitions=2 | |||||
| #cluster.test2.0=kvdb://localhost:7078/test2 | |||||
| #cluster.test2.1=kvdb://localhost:7079/test2 | |||||
| @@ -1,15 +0,0 @@ | |||||
| # 数据库服务的本机监听地址; | |||||
| server.host=0.0.0.0 | |||||
| # 数据库服务的本机监听端口; | |||||
| server.port=7078 | |||||
| # 管理控制台的端口; | |||||
| # 注:管理控制台总是绑定到环回地址 127.0.0.1,只允许本机访问; | |||||
| manager.port=7060 | |||||
| # 数据库实例默认的根目录 | |||||
| dbs.rootdir=../dbs | |||||
| # 数据库实例默认的本地分区数 | |||||
| dbs.partitions=4 | |||||
| @@ -1,12 +0,0 @@ | |||||
| #!/bin/bash | |||||
| HOME=$(cd `dirname $0`;cd ../; pwd) | |||||
| KVDB=$(ls $HOME/libs | grep kvdb-benchmark) | |||||
| JVM_SET="-Xmx2g -Xms2g" | |||||
| LOG_SET="-Dlogging.path="$HOME/logs" -Dlogging.level=error" | |||||
| PROC_INFO=$HOME/libs/$KVDB | |||||
| if [ ! -n "$KVDB" ]; then | |||||
| echo "Can not find kvdb-benchmark !!!" | |||||
| else | |||||
| java -jar $LOG_SET $JVM_SET $PROC_INFO $* | |||||
| fi | |||||
| @@ -1,12 +0,0 @@ | |||||
| #!/bin/bash | |||||
| HOME=$(cd `dirname $0`;cd ../; pwd) | |||||
| KVDB=$(ls $HOME/libs | grep kvdb-cli) | |||||
| JVM_SET="-Xmx2g -Xms2g" | |||||
| LOG_SET="-Dlogging.path="$HOME/logs" -Dlogging.level.root=error" | |||||
| PROC_INFO=$HOME/libs/$KVDB | |||||
| if [ ! -n "$KVDB" ]; then | |||||
| echo "Can not find kvdb-cli !!!" | |||||
| else | |||||
| java -jar $LOG_SET $JVM_SET $PROC_INFO $* | |||||
| fi | |||||
| @@ -1,23 +0,0 @@ | |||||
| #!/bin/bash | |||||
| HOME=$(cd `dirname $0`;cd ../; pwd) | |||||
| KVDB=$(ls $HOME/libs | grep kvdb-server) | |||||
| JVM_SET="-Xmx2g -Xms2g" | |||||
| PROC_INFO=$HOME/libs/$KVDB" -home "$HOME | |||||
| LOG_SET="-Dlogging.path="$HOME/logs" -Dlogging.level=error" | |||||
| #echo $PROC_INFO | |||||
| #get PID | |||||
| PID=`ps -ef | grep "$PROC_INFO" | grep -v grep | awk '{print $2}'` | |||||
| #echo $PID | |||||
| if [[ ! -z $PID ]] | |||||
| then | |||||
| echo "process already exists,please check... If necessary, you should kill the process first." | |||||
| exit | |||||
| fi | |||||
| if [ ! -n "$KVDB" ]; then | |||||
| echo "Can not find kvdb-server !!!" | |||||
| else | |||||
| nohup java -jar $LOG_SET $JVM_SET $PROC_INFO $* >/dev/null 2>&1 & | |||||
| echo $! > $HOME/system/pid | |||||
| fi | |||||
| @@ -1,27 +0,0 @@ | |||||
| #!/bin/bash | |||||
| #启动Home路径 | |||||
| HOME=$(cd `dirname $0`;cd ../; pwd) | |||||
| #进程启动后PID.log所在路径 | |||||
| PID_LOG=$HOME/system/pid | |||||
| #从启动文件中读取PID | |||||
| if [ -f "$PID_LOG" ]; then | |||||
| # File exist | |||||
| echo "Read PID From File:[$PID_LOG] ..." | |||||
| PID=`sed -n '$p' $PID_LOG` | |||||
| #启动文件不存在则直接通过PS进行过滤 | |||||
| else | |||||
| PID=`ps -ef | grep $HOME/libs/kvdb-server | grep -v grep | awk '{print $2}'` | |||||
| fi | |||||
| #通过Kill命令将进程杀死 | |||||
| if [ -z "$PID" ]; then | |||||
| echo "Unable to find kvdb PID. stop aborted." | |||||
| else | |||||
| echo "Start to kill PID = $PID ..." | |||||
| kill -9 $PID | |||||
| echo "kvdb has been stopped ..." | |||||
| echo "" > $PID_LOG | |||||
| fi | |||||
| @@ -1,2 +0,0 @@ | |||||
| #通过配置enable为true可以在kvdb-server启动时创建或加载指定数据库 | |||||
| #db.test1.enable=true | |||||
| @@ -21,7 +21,6 @@ | |||||
| <module>../core</module> | <module>../core</module> | ||||
| <module>deploy-gateway</module> | <module>deploy-gateway</module> | ||||
| <module>deploy-peer</module> | <module>deploy-peer</module> | ||||
| <module>deploy-kvdb</module> | |||||
| </modules> | </modules> | ||||
| </project> | </project> | ||||
| @@ -1 +0,0 @@ | |||||
| Subproject commit 410de24918b6c7214bafe316f5cc734d87c5b433 | |||||
| @@ -13,7 +13,6 @@ | |||||
| <module>project</module> | <module>project</module> | ||||
| <module>framework</module> | <module>framework</module> | ||||
| <module>core</module> | <module>core</module> | ||||
| <module>kvdb</module> | |||||
| <module>deploy</module> | <module>deploy</module> | ||||
| <module>test</module> | <module>test</module> | ||||
| <module>samples</module> | <module>samples</module> | ||||
| @@ -11,7 +11,7 @@ | |||||
| <groupId>com.jd.blockchain</groupId> | <groupId>com.jd.blockchain</groupId> | ||||
| <artifactId>jdchain-samples</artifactId> | <artifactId>jdchain-samples</artifactId> | ||||
| <version>1.2.0.RELEASE</version> | |||||
| <version>1.2.1.RELEASE</version> | |||||
| <packaging>pom</packaging> | <packaging>pom</packaging> | ||||
| <properties> | <properties> | ||||