Skip to content

Commit 90c7d53

Browse files
Merge pull request #11 from griddb/5.7-rc
Update for 5.7
2 parents 17d76e7 + 4f30bac commit 90c7d53

25 files changed

Lines changed: 2032 additions & 498 deletions

GridDB_Web_API_Reference.md

Lines changed: 542 additions & 152 deletions
Large diffs are not rendered by default.

GridDB_Web_API_Reference_ja.md

Lines changed: 431 additions & 61 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ GridDB WebAPI is developed using GridDB Java Client and [Spring Boot](https://sp
77
## Operating environment
88

99
Building of the library and execution of the sample programs have been checked in the following environment.
10-
- OS: CentOS 7.9(x64)
11-
- [GridDB Server](https://github.com/griddb/griddb): 5.6
10+
- OS: Ubuntu 22.04(x64)
11+
- [GridDB Server](https://github.com/griddb/griddb): 5.7
1212

1313
## QuickStart
1414

@@ -85,19 +85,23 @@ GridDB Server need to be started in advance.
8585
#Request http://[host]:[port]/griddb/v2/[clusterName]/dbs/public/sql/select
8686
$ curl -X POST -u admin:admin -H "Content-type:application/json; charset=UTF-8"
8787
-d '[{"stmt":"select * from test"}]'
88-
http://127.0.0.1:8081/griddb/v2/mycluster/dbs/public/sql/select
88+
http://127.0.0.1:8081/griddb/v2/mycluster/dbs/public/sql/dml/query
8989
--> [{"columns":[{"name":"col1","type":"STRING"},{"name":"col2","type":"INTEGER"},
9090
{"name":"col3","type":"BOOL"}],"results":[["value",1,true]]}]
9191

92+
Note: "/:cluster/dbs/:database/sql/select" style is not recommended.
93+
9294
6. Update with SQL
9395

9496
#Request http://[host]:[port]/griddb/v2/[clusterName]/dbs/public/sql/update
9597
$ curl -X POST -u admin:admin -H "Content-type:application/json; charset=UTF-8"
9698
-d '[{"stmt":"update test set col3 = false where col2 = 1"}]'
97-
http://127.0.0.1:8081/griddb/v2/mycluster/dbs/public/sql/update
99+
http://127.0.0.1:8081/griddb/v2/mycluster/dbs/public/sql/dml/update
98100
--> [{"status":1, "updatedRows":1,
99101
"stmt":"update test set col3 = false where col2 = 1", "message":null}]
100102

103+
Note: "/:cluster/dbs/:database/sql/update" style is not recommended.
104+
101105
Please refer to the file below for more detailed information.
102106
- [WebAPI Reference (en)](GridDB_Web_API_Reference.md)
103107
- [WebAPI Reference (ja)](GridDB_Web_API_Reference_ja.md)

common/build.gradle

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'java'
22

3-
repositories{
4-
jcenter()
3+
repositories {
4+
mavenCentral()
55
}
66

77
sourceSets {
@@ -13,25 +13,26 @@ sourceSets {
1313
}
1414

1515
def gridstoreVersion = '5.6.0'
16+
sourceCompatibility = 1.8
1617

1718
dependencies {
18-
compile group: 'commons-io', name: 'commons-io', version: '2.15.1'
19+
implementation group: 'commons-io', name: 'commons-io', version: '2.15.1'
1920

20-
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.16.1'
21+
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.16.1'
2122

22-
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.16.1'
23+
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.16.1'
2324

24-
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.16.1'
25+
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.16.1'
2526

26-
compile group: 'javax.json', name: 'javax.json-api', version: '1.0'
27+
implementation group: 'javax.json', name: 'javax.json-api', version: '1.0'
2728

28-
compile group: 'com.sun.jersey', name: 'jersey-client', version: '1.17.1'
29+
implementation group: 'com.sun.jersey', name: 'jersey-client', version: '1.17.1'
2930

30-
//compile group: 'com.sun.jersey', name: 'jersey-core', version: '1.17.1'
31+
//implementation group: 'com.sun.jersey', name: 'jersey-core', version: '1.17.1'
3132

32-
compile files('../3rd_party/orion-ssh2/orion-ssh2-214.jar')
33+
implementation files('../3rd_party/orion-ssh2/orion-ssh2-214.jar')
3334

34-
compile group: 'com.github.griddb', name: 'gridstore', version: "${gridstoreVersion}"
35+
implementation group: 'com.github.griddb', name: 'gridstore', version: "${gridstoreVersion}"
3536
}
3637

3738
compileJava.options.encoding = 'UTF-8'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

service/griddb-webapi.service

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[Unit]
2+
Description=GridDB Webapi.
3+
4+
[Service]
5+
WorkingDirectory=/usr/griddb-webapi
6+
EnvironmentFile=-/etc/environment
7+
ExecStart=/bin/bash -c '/usr/bin/java -Xmx1024m -jar ${GS_COMMON_JVM_ARGS} /usr/griddb-webapi/griddb-webapi.jar'
8+
RemainAfterExit=true
9+
RestartSec=30
10+
Restart=on-failure
11+
SuccessExitStatus=143
12+
13+
[Install]
14+
WantedBy=multi-user.target

service/logback.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<configuration>
3+
<appender name="Console"
4+
class="ch.qos.logback.core.ConsoleAppender">
5+
<layout class="ch.qos.logback.classic.PatternLayout">
6+
<Pattern>
7+
%black(%d{ISO8601}) %highlight(%-5level) [%blue(%t)] %yellow(%C{1.}): %msg%n%throwable
8+
</Pattern>
9+
</layout>
10+
</appender>
11+
12+
<appender name="RollingFile"
13+
class="ch.qos.logback.core.rolling.RollingFileAppender">
14+
<file>/var/lib/gridstore/webapi/log/gs_webapi.log</file>
15+
<encoder
16+
class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
17+
<Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
18+
</encoder>
19+
20+
<rollingPolicy
21+
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
22+
<fileNamePattern>/var/lib/gridstore/webapi/log/gs_webapi-%d{yyyyMMdd}.%i.log
23+
</fileNamePattern>
24+
<timeBasedFileNamingAndTriggeringPolicy
25+
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
26+
<maxFileSize>1MB</maxFileSize>
27+
</timeBasedFileNamingAndTriggeringPolicy>
28+
</rollingPolicy>
29+
</appender>
30+
31+
<!-- LOG everything at INFO level -->
32+
<root level="info">
33+
<appender-ref ref="RollingFile" />
34+
<appender-ref ref="Console" />
35+
</root>
36+
37+
</configuration>

webapi-ce/build.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ apply plugin: 'org.springframework.boot'
1616
apply plugin: 'io.spring.dependency-management'
1717

1818
group = 'com.toshiba.mwcloud.gs.tools'
19-
version = '5.6.0'
19+
version = '5.7.0'
2020
sourceCompatibility = 1.8
2121

2222
def gridstoreVersion = '5.6.0'
@@ -32,11 +32,12 @@ dependencies {
3232
runtimeOnly('org.springframework.boot:spring-boot-devtools')
3333
testImplementation('org.springframework.boot:spring-boot-starter-test')
3434

35-
compile group: 'com.mashape.unirest', name: 'unirest-java', version: '1.4.9'
36-
compile group: 'com.github.griddb', name: 'gridstore', version: "${gridstoreVersion}"
37-
compile group: 'com.github.griddb', name: 'gridstore-jdbc', version: "${gridstoreJdbcVersion}"
35+
implementation group: 'com.mashape.unirest', name: 'unirest-java', version: '1.4.9'
36+
implementation group: 'com.github.griddb', name: 'gridstore', version: "${gridstoreVersion}"
37+
implementation group: 'com.github.griddb', name: 'gridstore-jdbc', version: "${gridstoreJdbcVersion}"
38+
implementation group: 'commons-io', name: 'commons-io', version: '2.15.1'
3839

39-
compile project(":griddb-tools-common")
40+
implementation project(":griddb-tools-common")
4041
}
4142

4243
bootJar {
@@ -47,3 +48,4 @@ bootJar {
4748

4849
exclude("slf4j-jdk14-1.7.36.jar", "jackson-core-2.16.1.jar", "jackson-databind-2.16.1.jar", "jackson-annotations-2.16.1.jar")
4950
}
51+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)