Skip to content

Commit

Permalink
[dingo-release] bump release version to dingo-v0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
astor-oss committed Oct 12, 2022
1 parent 01cd577 commit bc2d304
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 29 deletions.
1 change: 1 addition & 0 deletions dingo-dist/bin/start-coordinator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
JAR_PATH=$(find $ROOT -name dingo-*-coordinator-*.jar)
JAVA_OPTS="-Xms1g -Xmx1g -XX:+AlwaysPreTouch -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC -XX:+HeapDumpOnOutOfMemoryError"

nohup java ${JAVA_OPTS} \
-Dlogback.configurationFile=file:${ROOT}/conf/logback-coordinator.xml \
Expand Down
1 change: 1 addition & 0 deletions dingo-dist/bin/start-executor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
JAR_PATH=$(find $ROOT -name dingo-*-executor-*.jar)
STORE_JAR_PATH=$(find $ROOT -name dingo-store*.jar)
JAVA_OPTS="-Xms1g -Xmx1g -XX:+AlwaysPreTouch -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC -XX:+HeapDumpOnOutOfMemoryError"

nohup java ${JAVA_OPTS} \
-Dlogback.configurationFile=file:${ROOT}/conf/logback-executor.xml \
Expand Down
95 changes: 80 additions & 15 deletions dingo-driver-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,26 @@ plugins {
id 'maven-publish'
}

apply plugin: 'maven'
apply plugin: 'signing'

dependencies {
implementation group: 'org.apache.calcite.avatica', name: 'avatica-core', version: 'avatica'.v()
implementation project(':dingo-common')
implementation project(':dingo-net-api')
implementation project(':dingo-net-netty')
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

task fatJar(type: Jar) {
classifier 'all'
from(
Expand All @@ -40,10 +53,6 @@ task fatJar(type: Jar) {
exclude "META-INF/*.RSA"
}

tasks.named("build") { x ->
x.finalizedBy("fatJar")
}

fatJar.dependsOn([
':dingo-common:jar',
':dingo-net-api:jar',
Expand All @@ -53,21 +62,20 @@ fatJar.dependsOn([
':dingo-expr:dingo-expr-json-runtime:jar'
])

tasks.named("build") { x ->
x.finalizedBy("fatJar")
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/dingodb/dingo")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
maven {
name = "OSSRH"
def releasesRepoUrl = "https://s01.oss.sonatype.org/content/repositories/releases/"
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
/**
* will manually release the artifactory
*/
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : "";
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_TOKEN")
Expand All @@ -79,7 +87,64 @@ publishing {
maven(MavenPublication) {
groupId = 'io.dingodb'
artifactId = 'dingo-driver-client'
artifacts = [ fatJar ]
artifacts = [ fatJar, sourcesJar, javadocJar ]
}
}
}

artifacts {
archives javadocJar, sourcesJar
}

project.gradle.taskGraph.whenReady { graph ->
project.tasks.findAll().forEach { task ->
if (task.name.contains("signArchives")) {
task.enabled = false
}
}
}

signing {
sign configurations.archives
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'dingo-driver-client'
packaging 'jar'
// optionally artifactId can be defined here
description 'A driver client for dingo cluster'
url 'http://www.dingodb.datacanvas.com/'

scm {
connection 'scm:svn:http://foo.googlecode.com/svn/trunk/'
developerConnection 'scm:svn:https://foo.googlecode.com/svn/trunk/'
url 'http://foo.googlecode.com/svn/trunk/'
}

licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id 'dingodb'
name 'DingoDB develop team'
email 'dingodb@zetyun.com'
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,16 @@ public static void scanAllRecords(String tableName) throws Exception {
}

public static void delete(String tableName) throws Exception {
long startTime = System.currentTimeMillis();
for (int i = 0; i < insertTotalCnt; i++) {
Object[] key = new Object[]{i};
System.out.println("delete key: " + Arrays.toString(key));
long endTime = System.currentTimeMillis();
if (i != 0 && i % 10000 == 0) {
System.out.println("AvgTimeCost:" + (endTime - startTime) * 1.0 / i
+ ", LoopCnt:" + i
+ ", TotalCost:" + (endTime - startTime) / 1000 + "s"
);
}
dingoClient.delete(tableName, key);
}
}
Expand Down
89 changes: 77 additions & 12 deletions dingo-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ plugins {
id 'maven-publish'
}

apply plugin: 'maven'
apply plugin: 'signing'

dependencies {
implementation group: 'org.projectlombok', name: 'lombok', version: 'lombok'.v()
implementation group: 'org.apache.commons', name: 'commons-lang3', version: 'commons-lang3'.v()
Expand Down Expand Up @@ -58,23 +61,44 @@ tasks.named("build") { x ->
x.finalizedBy("fatJar")
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/dingodb/dingo")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives javadocJar, sourcesJar
}

project.gradle.taskGraph.whenReady { graph ->
project.tasks.findAll().forEach { task ->
if (task.name.contains("signArchives")) {
task.enabled = false
}
}
}

signing {
sign configurations.archives
}

publishing {
repositories {
maven {
name = "OSSRH"
def releasesRepoUrl = "https://s01.oss.sonatype.org/content/repositories/releases/"
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl

/**
* will manually release the artifactory
*/
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : "";

credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_TOKEN")
Expand All @@ -86,7 +110,48 @@ publishing {
maven(MavenPublication) {
groupId = 'io.dingodb'
artifactId = 'dingo-sdk'
artifacts = [ fatJar ]
artifacts = [ fatJar, javadocJar, sourcesJar ]
}
}
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'dingo-sdk'
packaging 'jar'
// optionally artifactId can be defined here
description 'A sdk library to do operation on dingo cluster'
url 'http://www.dingodb.datacanvas.com/'

scm {
connection 'scm:svn:http://foo.googlecode.com/svn/trunk/'
developerConnection 'scm:svn:https://foo.googlecode.com/svn/trunk/'
url 'http://foo.googlecode.com/svn/trunk/'
}

licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id 'dingodb'
name 'DingoDB develop team'
email 'dingodb@zetyun.com'
}
}
}
}
}
}
13 changes: 12 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ org.gradle.jvmargs=-Xms2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryErro
# Dingo group & version
#
GROUP=io.dingodb
VERSION=0.4.0-SNAPSHOT
VERSION=0.4.1


#
# For Release script
#
ossrhUsername=dingodb
ossrhPassword=xxxxxx
signing.keyId=keyId
signing.password=password
signing.secretKeyRingFile=./

#
# Library versions
#
Expand Down

0 comments on commit bc2d304

Please # to comment.