Skip to content

Commit

Permalink
Merge pull request #4 from griddb/5.7-rc
Browse files Browse the repository at this point in the history
Update for 5.7
  • Loading branch information
AnggaSuherman authored Nov 25, 2024
2 parents 38944a2 + c3cc49b commit b1ecbdd
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 15 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ The GridDB CLI provides command line interface tool to manage GridDB cluster ope

Building and program execution are checked in the environment below.

OS: CentOS 7.9(x64), Ubuntu 20.04 (x64)
GridDB Server: V5.6 CE(Community Edition)
OS: Ubuntu 22.04 (x64)
GridDB Server: V5.7 CE(Community Edition)
Java: OpenJDK 1.8.0

## Quick start from CLI Source Code
Expand Down Expand Up @@ -47,33 +47,33 @@ and the following file is created under `release/` folder.
$ 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
$ java -Xmx1024m -Dlogback.configurationFile=gs_sh_logback.xml -classpath "$CP:$CLASSPATH" com.toshiba.mwcloud.gs.tools.shell.GridStoreShell $*
gs> version
gs_sh-ce version 5.6.0
gs_sh-ce version 5.7.0

Run GridDB CLI after build with gradle:

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

## Quick start from CLI Package


```
(CentOS)
(Rocky Linux)
$ rpm -ivh griddb-X.X.X-linux.x86_64.rpm
$ rpm -ivh griddb-ce-cli-X.X.X-linux.x86_64.rpm
$ gs_sh
gs> version
gs_sh-ce version 5.6.0
gs_sh-ce version 5.7.0
(Ubuntu)
$ dpkg -i griddb_x.x.x_amd64.deb
$ dpkg -i griddb-cli_X.X.X_amd64.deb
$ gs_sh
gs> version
gs_sh-ce version 5.6.0
gs_sh-ce version 5.7.0
Note: - X.X.X is the GridDB version.
- {release} is the GridDB release version.
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ sourceSets {
}
}

def gridstoreVersion = '5.6.0'
def gridstoreJdbcVersion = '5.6.0'
def gridstoreVersion = '5.7.0'
def gridstoreJdbcVersion = '5.7.0'

repositories {
mavenCentral()
Expand Down
6 changes: 4 additions & 2 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ repositories{
mavenCentral()
}

sourceCompatibility = '1.8'

sourceSets {
main {
java {
Expand All @@ -12,8 +14,8 @@ sourceSets {
}
}

def gridstoreVersion = '5.6.0'
def gridstoreJdbcVersion = '5.6.0'
def gridstoreVersion = '5.7.0'
def gridstoreJdbcVersion = '5.7.0'

dependencies {
implementation 'commons-io:commons-io:2.15.1'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=gs_sh version 5.6.0
version=gs_sh version 5.7.0

help.version=Show version
help.help=Show this help
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=gs_sh version 5.6.0
version=gs_sh version 5.7.0

help.version=Show version
help.help=Show this help
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
import javax.script.ScriptContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.OutOfMemoryError;

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

return rowNo;

} catch (OutOfMemoryError oome) {
removeResultTable();
throw new ShellException(getMessage("error.outOfMemory"));
} catch (ShellException e) {
throw e;
} catch (Exception e) {
Expand All @@ -3225,6 +3229,7 @@ private int getRowSQL(Integer count, boolean replaceNull, String[] vals) {
}

protected void displayAsTable() {};
protected void removeResultTable() {};

/**
* 検索結果1件を取得し、カラム値を取得します。(NoSQL)
Expand Down Expand Up @@ -3304,7 +3309,9 @@ protected void displayAsTable() {
this.resultTable.display();
}
}

protected void removeResultTable() {
this.resultTable = null;
}
};

int gotCount = 0;
Expand Down Expand Up @@ -5348,7 +5355,7 @@ private void outputPlanJson(ExplainResult explainResult, String fileName) {
for (JsonNode explainJson : explainJsonList) {
explains.add(explainJson);
}
root.put("nodeList", explains);
root.set("nodeList", explains);

String outputStr = "";
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ error.tooManyVariables=D20438: The number of variables specified is greater than
error.getvalExplain=D20439: The result of an EXPLAIN statement cannot be defined in a variable.
error.getrowval=D20440: An unexpected error occurred while getting results.
error.longVariableName=D20441: Specify the variable name within 256 bytes.
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.
error.invalidVarName=D20106: {0} can not be used as a variable name.
error.illegalEnum=D20407: This argument {0} is incorrect. An acceptable argument is {1}.
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ error.tooManyVariables=D20438: \u6307\u5B9A\u3055\u308C\u305F\u5909\u6570\u306E\
error.getvalExplain=D20439: EXPLAIN\u6587\u306E\u7D50\u679C\u306F\u5909\u6570\u306B\u5B9A\u7FA9\u3067\u304D\u307E\u305B\u3093\u3002
error.getrowval=D20440: \u691C\u7D22\u7D50\u679C\u306E\u53D6\u5F97\u3067\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
error.longVariableName=D20441: \u5909\u6570\u540D\u306F256\u6587\u5B57\u4EE5\u5185\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002
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

error.invalidVarName=D20106: {0} \u306F\u5909\u6570\u540D\u3068\u3057\u3066\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
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 comments on commit b1ecbdd

Please sign in to comment.