Skip to content

Commit

Permalink
Merge pull request #2 from griddb/5.3-rc
Browse files Browse the repository at this point in the history
Update for 5.3
  • Loading branch information
AnggaSuherman authored Jul 4, 2023
2 parents 3188da1 + 3e1739d commit 1121a2b
Show file tree
Hide file tree
Showing 32 changed files with 2,214 additions and 2,020 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Building and program execution are checked in the environment below.

OS: CentOS 7.9 (x64)
Java: Java™ SE Development Kit 8
GridDB Server: V4.6.1/V5.0 CE (Community Edition)
GridDB Java Client: V4.6.1 CE (Community Edition)
GridDB JDBC: V4.6.0 CE (Community Edition)
GridDB Server: V4.6.1/V5.3.0 CE (Community Edition)
GridDB Java Client: V4.6.1/V5.3.0 CE (Community Edition)
GridDB JDBC: V4.6.0/V5.3.0 CE (Community Edition)

## Quick start - Build and Run

Expand Down
309 changes: 198 additions & 111 deletions Specification_en.md

Large diffs are not rendered by default.

278 changes: 182 additions & 96 deletions Specification_ja.md

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion bin/gs_expimp.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ jdbcLoginTimeout=10

storeBlockSize=64KB
maxJobBufferSize=512
load.input.threadNum=1
load.output.threadNum=1

# for debug
restAddress=127.0.0.1
restPort=10040
maxJobSize=2
maxJobSize=2
# for intervals option
intervalTimeZone=GMT
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sourceSets {
}
}

def gridstoreVersion = '4.6.1'
def gridstoreVersion = '5.3.0'

dependencies {
implementation 'commons-io:commons-io:2.4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

package com.toshiba.mwcloud.gs.tools.common;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -755,6 +757,8 @@ public Boolean call() throws Exception {
int countService = 0;
boolean result = true;
boolean initFlag = true;
// Get list of node in the cluster as IP Address (get from configuration file)
List<NodeKey> nodesIPAddress = getNodesWithIPAddress(cluster.getNodes());

// ノードごとのステータス数などの計算
for ( T obj : cluster.getNodes() ){
Expand Down Expand Up @@ -790,7 +794,8 @@ public Boolean call() throws Exception {
.convertValue(followers, NodeKey[].class);

for ( NodeKey nkey : followerKeys ){
if ( cluster.getNode(nkey) == null ){
// Check node information get from API "/node/host" with node information get from configuration file
if (!nodesIPAddress.contains(nkey)) {
// 定義には含まれていない
List<GSNode> undefNodes = clStat.getUndefinedNodes();
if ( undefNodes == null ){
Expand Down Expand Up @@ -838,6 +843,44 @@ public Boolean call() throws Exception {
return result;
}

/**
* Convert the address of NodeKey from host name to IPAddress
*
* @param nodeKey node with host name
* @return nodeKey node with IP Address
* @throws GridStoreCommandException if host name and IP Address not found in the /etc/hosts
*/
private static NodeKey convertHostnameToIPAddress(NodeKey nodeKey) throws GridStoreCommandException {
InetAddress inet = null;
NodeKey nodeKeyWithIPAddress = null;
try {
inet = InetAddress.getByName(nodeKey.getAddress());
nodeKeyWithIPAddress = new NodeKey(inet.getHostAddress(), nodeKey.getPort());
} catch (UnknownHostException e) {
throw new GridStoreCommandException("D10137: Failed to get node status. ("+e.getMessage()+")", e);
}
return nodeKeyWithIPAddress;
}

/**
* Get list of node in the cluster as IP Address
*
* @param <T> generic type
* @param nodes list of nodes in the config file
* @return list of node in the cluster with IP Address
* @throws GridStoreCommandException
*/
private static <T> List<NodeKey> getNodesWithIPAddress(List<T> nodes) throws GridStoreCommandException {
List<NodeKey> nodesIPAddress = new ArrayList<NodeKey>();
for (T obj : nodes) {
GSNode node = (GSNode) obj;
NodeKey nodeKey = new NodeKey(node.getAddress(), node.getPort());
nodesIPAddress.add(convertHostnameToIPAddress(nodeKey));
}
return nodesIPAddress;
}


/**
* Get cluster configuration information.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ public static class PartitionInfo {
/**
* Maximum Log Sequence Number.
*/
public int maxLsn;
public long maxLsn;
}

/**
Expand All @@ -415,7 +415,7 @@ public static class NodeKeyPartition {
/**
* Log Sequence Number.
*/
public int lsn;
public long lsn;
/**
* Node port.
*/
Expand Down
Loading

0 comments on commit 1121a2b

Please sign in to comment.