Skip to content

Commit b1ecbdd

Browse files
Merge pull request #4 from griddb/5.7-rc
Update for 5.7
2 parents 38944a2 + c3cc49b commit b1ecbdd

File tree

8 files changed

+26
-15
lines changed

8 files changed

+26
-15
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ The GridDB CLI provides command line interface tool to manage GridDB cluster ope
1010

1111
Building and program execution are checked in the environment below.
1212

13-
OS: CentOS 7.9(x64), Ubuntu 20.04 (x64)
14-
GridDB Server: V5.6 CE(Community Edition)
13+
OS: Ubuntu 22.04 (x64)
14+
GridDB Server: V5.7 CE(Community Edition)
1515
Java: OpenJDK 1.8.0
1616

1717
## Quick start from CLI Source Code
@@ -47,33 +47,33 @@ and the following file is created under `release/` folder.
4747
$ CP=$CP:common/lib/commons-io-2.15.1.jar:release/griddb-cli.jar:common/lib/gridstore.jar:common/lib/gridstore-jdbc.jar:common/lib/jackson-annotations-2.16.1.jar:common/lib/jackson-core-2.16.1.jar:common/lib/jackson-databind-2.16.1.jar:common/lib/javax.json-1.0.jar:common/lib/jersey-client-1.17.1.jar:common/lib/jersey-core-1.17.1.jar:common/lib/orion-ssh2-214.jar:lib/commons-beanutils-1.9.4.jar:lib/commons-cli-1.6.0.jar:lib/commons-collections-3.2.2.jar:lib/commons-lang3-3.14.0.jar:lib/commons-logging-1.3.0.jar:lib/jline-3.21.0.jar:lib/logback-classic-1.2.13.jar:lib/logback-core-1.0.13.jar:lib/opencsv-3.9.jar:lib/slf4j-api-1.7.36.jar
4848
$ java -Xmx1024m -Dlogback.configurationFile=gs_sh_logback.xml -classpath "$CP:$CLASSPATH" com.toshiba.mwcloud.gs.tools.shell.GridStoreShell $*
4949
gs> version
50-
gs_sh-ce version 5.6.0
50+
gs_sh-ce version 5.7.0
5151

5252
Run GridDB CLI after build with gradle:
5353

5454
$ CP=.
5555
$ CP=$CP:release/griddb-cli.jar
5656
$ java -Xmx1024m -Dlogback.configurationFile=gs_sh_logback.xml -classpath "$CP:$CLASSPATH" com.toshiba.mwcloud.gs.tools.shell.GridStoreShell $*
5757
gs> version
58-
gs_sh-ce version 5.6.0
58+
gs_sh-ce version 5.7.0
5959

6060
## Quick start from CLI Package
6161

6262

6363
```
64-
(CentOS)
64+
(Rocky Linux)
6565
$ rpm -ivh griddb-X.X.X-linux.x86_64.rpm
6666
$ rpm -ivh griddb-ce-cli-X.X.X-linux.x86_64.rpm
6767
$ gs_sh
6868
gs> version
69-
gs_sh-ce version 5.6.0
69+
gs_sh-ce version 5.7.0
7070
7171
(Ubuntu)
7272
$ dpkg -i griddb_x.x.x_amd64.deb
7373
$ dpkg -i griddb-cli_X.X.X_amd64.deb
7474
$ gs_sh
7575
gs> version
76-
gs_sh-ce version 5.6.0
76+
gs_sh-ce version 5.7.0
7777
7878
Note: - X.X.X is the GridDB version.
7979
- {release} is the GridDB release version.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ sourceSets {
1515
}
1616
}
1717

18-
def gridstoreVersion = '5.6.0'
19-
def gridstoreJdbcVersion = '5.6.0'
18+
def gridstoreVersion = '5.7.0'
19+
def gridstoreJdbcVersion = '5.7.0'
2020

2121
repositories {
2222
mavenCentral()

common/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ repositories{
44
mavenCentral()
55
}
66

7+
sourceCompatibility = '1.8'
8+
79
sourceSets {
810
main {
911
java {
@@ -12,8 +14,8 @@ sourceSets {
1214
}
1315
}
1416

15-
def gridstoreVersion = '5.6.0'
16-
def gridstoreJdbcVersion = '5.6.0'
17+
def gridstoreVersion = '5.7.0'
18+
def gridstoreJdbcVersion = '5.7.0'
1719

1820
dependencies {
1921
implementation 'commons-io:commons-io:2.15.1'

src/com/toshiba/mwcloud/gs/tools/shell/GridStoreShellMessages.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=gs_sh version 5.6.0
1+
version=gs_sh version 5.7.0
22

33
help.version=Show version
44
help.help=Show this help

src/com/toshiba/mwcloud/gs/tools/shell/GridStoreShellMessages_ja.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=gs_sh version 5.6.0
1+
version=gs_sh version 5.7.0
22

33
help.version=Show version
44
help.help=Show this help

src/com/toshiba/mwcloud/gs/tools/shell/commands/DataCommandClass.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
import javax.script.ScriptContext;
114114
import org.slf4j.Logger;
115115
import org.slf4j.LoggerFactory;
116+
import java.lang.OutOfMemoryError;
116117

117118
/** Data command class contains some commands to execute data operation. */
118119
public class DataCommandClass extends AbstractCommandClass {
@@ -3211,6 +3212,9 @@ private int getRowSQL(Integer count, boolean replaceNull, String[] vals) {
32113212

32123213
return rowNo;
32133214

3215+
} catch (OutOfMemoryError oome) {
3216+
removeResultTable();
3217+
throw new ShellException(getMessage("error.outOfMemory"));
32143218
} catch (ShellException e) {
32153219
throw e;
32163220
} catch (Exception e) {
@@ -3225,6 +3229,7 @@ private int getRowSQL(Integer count, boolean replaceNull, String[] vals) {
32253229
}
32263230

32273231
protected void displayAsTable() {};
3232+
protected void removeResultTable() {};
32283233

32293234
/**
32303235
* 検索結果1件を取得し、カラム値を取得します。(NoSQL)
@@ -3304,7 +3309,9 @@ protected void displayAsTable() {
33043309
this.resultTable.display();
33053310
}
33063311
}
3307-
3312+
protected void removeResultTable() {
3313+
this.resultTable = null;
3314+
}
33083315
};
33093316

33103317
int gotCount = 0;
@@ -5348,7 +5355,7 @@ private void outputPlanJson(ExplainResult explainResult, String fileName) {
53485355
for (JsonNode explainJson : explainJsonList) {
53495356
explains.add(explainJson);
53505357
}
5351-
root.put("nodeList", explains);
5358+
root.set("nodeList", explains);
53525359

53535360
String outputStr = "";
53545361
try {

src/com/toshiba/mwcloud/gs/tools/shell/commands/DataCommandClassMessages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ error.tooManyVariables=D20438: The number of variables specified is greater than
495495
error.getvalExplain=D20439: The result of an EXPLAIN statement cannot be defined in a variable.
496496
error.getrowval=D20440: An unexpected error occurred while getting results.
497497
error.longVariableName=D20441: Specify the variable name within 256 bytes.
498+
error.outOfMemory=D20442: The standard output result exceeded the Java heap size of gs_sh. Please increase the Java heap size of /bin/gs_sh or output the result using the getcsv command.
498499
499500
error.invalidVarName=D20106: {0} can not be used as a variable name.
500501
error.illegalEnum=D20407: This argument {0} is incorrect. An acceptable argument is {1}.

src/com/toshiba/mwcloud/gs/tools/shell/commands/DataCommandClassMessages_ja.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ error.tooManyVariables=D20438: \u6307\u5B9A\u3055\u308C\u305F\u5909\u6570\u306E\
483483
error.getvalExplain=D20439: EXPLAIN\u6587\u306E\u7D50\u679C\u306F\u5909\u6570\u306B\u5B9A\u7FA9\u3067\u304D\u307E\u305B\u3093\u3002
484484
error.getrowval=D20440: \u691C\u7D22\u7D50\u679C\u306E\u53D6\u5F97\u3067\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
485485
error.longVariableName=D20441: \u5909\u6570\u540D\u306F256\u6587\u5B57\u4EE5\u5185\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002
486+
error.outOfMemory=D20442: \u6a19\u6e96\u51fa\u529b\u306e\u7d50\u679c\u304cgs_sh\u306eJava\u30d2\u30fc\u30d7\u30b5\u30a4\u30ba\u3092\u8d85\u3048\u307e\u3057\u305f\u3002\/bin\/gs_sh\u306eJava\u30d2\u30fc\u30d7\u30b5\u30a4\u30ba\u3092\u5897\u3084\u3059\u304b\u3001\u3082\u3057\u304f\u306fgetcsv\u30b3\u30de\u30f3\u30c9\u3067\u7d50\u679c\u3092\u51fa\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
486487

487488
error.invalidVarName=D20106: {0} \u306F\u5909\u6570\u540D\u3068\u3057\u3066\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
488489
error.illegalEnum=D20407: {0} \u306f\u5f15\u6570\u3068\u3057\u3066\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002{1}\u306e\u307f\u304c\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002

0 commit comments

Comments
 (0)