fix: MultiPointCooperationExecutor
This commit is contained in:
parent
604fdc80bd
commit
f5c849893f
8
.gitmodules
vendored
8
.gitmodules
vendored
@ -39,3 +39,11 @@
|
|||||||
path = agent-frontend
|
path = agent-frontend
|
||||||
url = https://gitea.internetapi.cn/bdware/bdcontract-web-ide.git
|
url = https://gitea.internetapi.cn/bdware/bdcontract-web-ide.git
|
||||||
branch = master
|
branch = master
|
||||||
|
[submodule "consistency-sdk"]
|
||||||
|
path = consistency-sdk
|
||||||
|
url = git@gitee.com:BDWare/consistency-sdk.git
|
||||||
|
branch = master
|
||||||
|
[submodule "custom-plugin"]
|
||||||
|
path = custom-plugin
|
||||||
|
url = git@gitee.com:BDWare/custom-plugin.git
|
||||||
|
branch = master
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit f3f146b30a222fcf099150614729a96fa6def236
|
Subproject commit b1bf67c802c8ff45bde76fe30735a106449381b2
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
consistency-sdk/build/libs/consistency-sdk-1.0-SNAPSHOT.jar
Normal file
BIN
consistency-sdk/build/libs/consistency-sdk-1.0-SNAPSHOT.jar
Normal file
Binary file not shown.
@ -0,0 +1,20 @@
|
|||||||
|
org/bdware/sdk/consistency/api/context/IMasterServerRecoverMechAction.java
|
||||||
|
org.bdware.sdk.consistency.api.context.IMasterServerRecoverMechAction
|
||||||
|
org/bdware/sdk/consistency/api/context/INetworkManager.java
|
||||||
|
org.bdware.sdk.consistency.api.context.INetworkManager
|
||||||
|
org/bdware/sdk/consistency/api/context/IMasterServerTCPAction.java
|
||||||
|
org.bdware.sdk.consistency.api.context.IMasterServerTCPAction
|
||||||
|
org/bdware/sdk/consistency/api/context/IGlobalConf.java
|
||||||
|
org.bdware.sdk.consistency.api.context.IGlobalConf
|
||||||
|
org/bdware/sdk/consistency/api/NotifiableResultMerger.java
|
||||||
|
org.bdware.sdk.consistency.api.NotifiableResultMerger
|
||||||
|
org/bdware/sdk/consistency/api/ContractExecutorFactory.java
|
||||||
|
org.bdware.sdk.consistency.api.ContractExecutorFactory
|
||||||
|
org/bdware/sdk/consistency/api/context/ISDKContext.java
|
||||||
|
org.bdware.sdk.consistency.api.context.ISDKContext
|
||||||
|
org/bdware/sdk/consistency/ConsistencyPluginManager.java
|
||||||
|
org.bdware.sdk.consistency.ConsistencyPluginManager
|
||||||
|
org.bdware.sdk.consistency.ConsistencyPluginManager$1
|
||||||
|
org.bdware.sdk.consistency.ConsistencyPluginManager$Inner
|
||||||
|
org/bdware/sdk/consistency/api/context/ICMActions.java
|
||||||
|
org.bdware.sdk.consistency.api.context.ICMActions
|
2
consistency-sdk/build/tmp/jar/MANIFEST.MF
Normal file
2
consistency-sdk/build/tmp/jar/MANIFEST.MF
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
custom-plugin/build/libs/custom-plugin.jar
Normal file
BIN
custom-plugin/build/libs/custom-plugin.jar
Normal file
Binary file not shown.
@ -0,0 +1,43 @@
|
|||||||
|
org/bdware/consistency/plugin/ra/RequestAllResponseHalfFactory.java
|
||||||
|
org.bdware.consistency.plugin.ra.RequestAllResponseHalfFactory
|
||||||
|
org/bdware/consistency/plugin/ro/ResponseOnceExecutorFactory.java
|
||||||
|
org.bdware.consistency.plugin.ro.ResponseOnceExecutorFactory
|
||||||
|
org/bdware/consistency/plugin/ro/RequestOnceExecutorFactory.java
|
||||||
|
org.bdware.consistency.plugin.ro.RequestOnceExecutorFactory
|
||||||
|
org/bdware/consistency/plugin/pbft/PBFTExecutorFactory.java
|
||||||
|
org.bdware.consistency.plugin.pbft.PBFTExecutorFactory
|
||||||
|
org/bdware/consistency/plugin/sharding/SelfAdaptiveShardingExecutorFactory.java
|
||||||
|
org.bdware.consistency.plugin.sharding.SelfAdaptiveShardingExecutorFactory
|
||||||
|
org/bdware/consistency/plugin/ra/RequestAllResponseAllFactory.java
|
||||||
|
org.bdware.consistency.plugin.ra.RequestAllResponseAllFactory
|
||||||
|
org/bdware/consistency/plugin/ra/RequestAllResponseFirstFactory.java
|
||||||
|
org.bdware.consistency.plugin.ra.RequestAllResponseFirstFactory
|
||||||
|
org/bdware/consistency/plugin/sharding/MultiPointCooperationExecutorFactory.java
|
||||||
|
org.bdware.consistency.plugin.sharding.MultiPointCooperationExecutorFactory
|
||||||
|
org/bdware/consistency/plugin/pbft/ContractCluster.java
|
||||||
|
org.bdware.consistency.plugin.pbft.ContractCluster
|
||||||
|
org/bdware/consistency/plugin/sharding/MultiPointCooperationExecutor.java
|
||||||
|
org.bdware.consistency.plugin.sharding.MultiPointCooperationExecutor
|
||||||
|
org.bdware.consistency.plugin.sharding.MultiPointCooperationExecutor$1
|
||||||
|
org.bdware.consistency.plugin.sharding.MultiPointCooperationExecutor$ResultMerger
|
||||||
|
org/bdware/consistency/plugin/pbft/PBFTExecutor.java
|
||||||
|
org.bdware.consistency.plugin.pbft.PBFTExecutor
|
||||||
|
org.bdware.consistency.plugin.pbft.PBFTExecutor$1
|
||||||
|
org.bdware.consistency.plugin.pbft.PBFTExecutor$1$1
|
||||||
|
org.bdware.consistency.plugin.pbft.PBFTExecutor$ResultMerger
|
||||||
|
org/bdware/consistency/plugin/common/AbstractContextContractExecutor.java
|
||||||
|
org.bdware.consistency.plugin.common.AbstractContextContractExecutor
|
||||||
|
org/bdware/consistency/plugin/single/SingleNodeExecutorFactory.java
|
||||||
|
org.bdware.consistency.plugin.single.SingleNodeExecutorFactory
|
||||||
|
org/bdware/consistency/plugin/ra/RequestAllExecutor.java
|
||||||
|
org.bdware.consistency.plugin.ra.RequestAllExecutor
|
||||||
|
org.bdware.consistency.plugin.ra.RequestAllExecutor$ResultMerger
|
||||||
|
org/bdware/consistency/plugin/sharding/SelfAdaptiveShardingExecutor.java
|
||||||
|
org.bdware.consistency.plugin.sharding.SelfAdaptiveShardingExecutor
|
||||||
|
org.bdware.consistency.plugin.sharding.SelfAdaptiveShardingExecutor$Block
|
||||||
|
org/bdware/consistency/plugin/ro/RequestOnceExecutor.java
|
||||||
|
org.bdware.consistency.plugin.ro.RequestOnceExecutor
|
||||||
|
org.bdware.consistency.plugin.ro.RequestOnceExecutor$1
|
||||||
|
org/bdware/consistency/plugin/ro/ResponseOnceExecutor.java
|
||||||
|
org.bdware.consistency.plugin.ro.ResponseOnceExecutor
|
||||||
|
org.bdware.consistency.plugin.ro.ResponseOnceExecutor$1
|
1
custom-plugin/build/tmp/jar/MANIFEST.MF
Normal file
1
custom-plugin/build/tmp/jar/MANIFEST.MF
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
@ -87,7 +87,7 @@ public class MultiPointCooperationExecutor extends AbstractContextContractExecut
|
|||||||
"[sendRequests] get cmNode "
|
"[sendRequests] get cmNode "
|
||||||
+ node.substring(0, 5)
|
+ node.substring(0, 5)
|
||||||
+ " not null "
|
+ " not null "
|
||||||
+ "org.bdware.consistency.plugin.ra.RequestAllExecutor 发送请求给 "
|
+ "RequestAllExecutor 发送请求给 "
|
||||||
+ node.substring(0, 5));
|
+ node.substring(0, 5));
|
||||||
networkManager.sendToAgent(node, sendStr);
|
networkManager.sendToAgent(node, sendStr);
|
||||||
}
|
}
|
||||||
@ -137,9 +137,9 @@ public class MultiPointCooperationExecutor extends AbstractContextContractExecut
|
|||||||
// List<String> nodes = info.members;
|
// List<String> nodes = info.members;
|
||||||
int validNode = 0;
|
int validNode = 0;
|
||||||
for (String node : nodes) {
|
for (String node : nodes) {
|
||||||
if (networkManager.hasAgentConnection(node)
|
if (networkManager.hasAgentConnection(node)) {
|
||||||
&& masterServerRecoverMechAction.getRecoverStatusMap().get(node).get(contractID)
|
//&& masterServerRecoverMechAction.getRecoverStatusMap().get(node).get(contractID)
|
||||||
== RecoverFlag.Fine) {
|
// == RecoverFlag.Fine
|
||||||
validNode++;
|
validNode++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ public class MultiPointCooperationExecutor extends AbstractContextContractExecut
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(String requestID, ContractRequest req, ResultCallback rc, OnHashCallback hcb) {
|
public void execute(String requestID, ContractRequest req, ResultCallback rc, OnHashCallback hcb) {
|
||||||
LOGGER.info("[org.bdware.consistency.plugin.sharding.MultiPointCooperationExecutor] execute " + JsonUtil.toJson(req));
|
LOGGER.info("[MultiPointCooperationExecutor] execute " + JsonUtil.toJson(req));
|
||||||
// 获得action 函数名
|
// 获得action 函数名
|
||||||
LOGGER.info("action is : " + req.getAction());
|
LOGGER.info("action is : " + req.getAction());
|
||||||
req.setContractID(cmActions.getManager().getContractIDByName(req.getContractID()));
|
req.setContractID(cmActions.getManager().getContractIDByName(req.getContractID()));
|
||||||
@ -208,13 +208,12 @@ public class MultiPointCooperationExecutor extends AbstractContextContractExecut
|
|||||||
|
|
||||||
private int getJoinCount(JoinInfo joinInfo, String contractID) {
|
private int getJoinCount(JoinInfo joinInfo, String contractID) {
|
||||||
if (joinInfo == null) return resultCount;
|
if (joinInfo == null) return resultCount;
|
||||||
if (joinInfo.joinCount.isJsonPrimitive() && joinInfo.joinCount.getAsJsonPrimitive().isNumber()) {
|
if (joinInfo != null) return joinInfo.joinCount;
|
||||||
return joinInfo.joinCount.getAsJsonPrimitive().getAsInt();
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
ContractRequest cr = new ContractRequest();
|
ContractRequest cr = new ContractRequest();
|
||||||
cr.setContractID(contractID);
|
cr.setContractID(contractID);
|
||||||
cr.setAction(joinInfo.joinCount.getAsString());
|
cr.setAction("TODO");
|
||||||
//TODO Arg需要好好设计一下。
|
//TODO Arg需要好好设计一下。
|
||||||
//TODO 又好用又简单的那种设计
|
//TODO 又好用又简单的那种设计
|
||||||
//TODO
|
//TODO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user