fix: MultiPointCooperationExecutor
This commit is contained in:
8
.gitmodules
vendored
8
.gitmodules
vendored
@@ -39,3 +39,11 @@
|
||||
path = agent-frontend
|
||||
url = https://gitea.internetapi.cn/bdware/bdcontract-web-ide.git
|
||||
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
|
||||
|
||||
Submodule agent-backend updated: f3f146b30a...b1bf67c802
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 "
|
||||
+ node.substring(0, 5)
|
||||
+ " not null "
|
||||
+ "org.bdware.consistency.plugin.ra.RequestAllExecutor 发送请求给 "
|
||||
+ "RequestAllExecutor 发送请求给 "
|
||||
+ node.substring(0, 5));
|
||||
networkManager.sendToAgent(node, sendStr);
|
||||
}
|
||||
@@ -137,9 +137,9 @@ public class MultiPointCooperationExecutor extends AbstractContextContractExecut
|
||||
// List<String> nodes = info.members;
|
||||
int validNode = 0;
|
||||
for (String node : nodes) {
|
||||
if (networkManager.hasAgentConnection(node)
|
||||
&& masterServerRecoverMechAction.getRecoverStatusMap().get(node).get(contractID)
|
||||
== RecoverFlag.Fine) {
|
||||
if (networkManager.hasAgentConnection(node)) {
|
||||
//&& masterServerRecoverMechAction.getRecoverStatusMap().get(node).get(contractID)
|
||||
// == RecoverFlag.Fine
|
||||
validNode++;
|
||||
}
|
||||
}
|
||||
@@ -151,7 +151,7 @@ public class MultiPointCooperationExecutor extends AbstractContextContractExecut
|
||||
|
||||
@Override
|
||||
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 函数名
|
||||
LOGGER.info("action is : " + req.getAction());
|
||||
req.setContractID(cmActions.getManager().getContractIDByName(req.getContractID()));
|
||||
@@ -208,13 +208,12 @@ public class MultiPointCooperationExecutor extends AbstractContextContractExecut
|
||||
|
||||
private int getJoinCount(JoinInfo joinInfo, String contractID) {
|
||||
if (joinInfo == null) return resultCount;
|
||||
if (joinInfo.joinCount.isJsonPrimitive() && joinInfo.joinCount.getAsJsonPrimitive().isNumber()) {
|
||||
return joinInfo.joinCount.getAsJsonPrimitive().getAsInt();
|
||||
}
|
||||
if (joinInfo != null) return joinInfo.joinCount;
|
||||
|
||||
try {
|
||||
ContractRequest cr = new ContractRequest();
|
||||
cr.setContractID(contractID);
|
||||
cr.setAction(joinInfo.joinCount.getAsString());
|
||||
cr.setAction("TODO");
|
||||
//TODO Arg需要好好设计一下。
|
||||
//TODO 又好用又简单的那种设计
|
||||
//TODO
|
||||
|
||||
Reference in New Issue
Block a user