Skip to content

Commit

Permalink
fix on the controller side
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Kurilov committed Jun 14, 2017
1 parent 3ab6ccf commit 9e5d443
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected FileIoConfig<T, C> getIoConfig(final AppConfig appConfig) {
protected DirectoryLoadBuilderSvc<T, C, W> resolve(final String serverAddr)
throws IOException {
DirectoryLoadBuilderSvc<T, C, W> rlb;
final String svcUri = "//" + serverAddr + '/' +
final String svcUri = "//" + serverAddr + ':' + ServiceUtil.REGISTRY_PORT + '/' +
getClass().getName().replace("client", "server").replace("Client", "Svc");
rlb = (DirectoryLoadBuilderSvc<T, C, W>) ServiceUtil.getRemoteSvc(svcUri);
rlb = (DirectoryLoadBuilderSvc<T, C, W>) ServiceUtil.getRemoteSvc(svcUri + rlb.fork());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public BasicFileLoadBuilderClient(final AppConfig appConfig)
protected FileLoadBuilderSvc<T, W> resolve(final String serverAddr)
throws IOException {
FileLoadBuilderSvc<T, W> rlb;
final String svcUri = "//" + serverAddr + '/' +
final String svcUri = "//" + serverAddr + ':' + ServiceUtil.REGISTRY_PORT + '/' +
getClass().getName().replace("client", "server").replace("Client", "Svc");
rlb = (FileLoadBuilderSvc<T, W>) ServiceUtil.getRemoteSvc(svcUri);
rlb = (FileLoadBuilderSvc<T, W>) ServiceUtil.getRemoteSvc(svcUri + rlb.fork());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected HttpRequestConfig getIoConfig(final AppConfig appConfig) {
protected HttpContainerLoadBuilderSvc<T, C, W> resolve(final String serverAddr)
throws IOException {
HttpContainerLoadBuilderSvc<T, C, W> rlb;
final String svcUri = "//" + serverAddr + '/' +
final String svcUri = "//" + serverAddr + ':' + ServiceUtil.REGISTRY_PORT + '/' +
getClass().getName().replace("client", "server").replace("Client", "Svc");
rlb = (HttpContainerLoadBuilderSvc<T, C, W>) ServiceUtil.getRemoteSvc(svcUri);
rlb = (HttpContainerLoadBuilderSvc<T, C, W>) ServiceUtil.getRemoteSvc(svcUri + rlb.fork());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public BasicHttpDataLoadBuilderClient(final AppConfig appConfig)
protected HttpDataLoadBuilderSvc<T, W> resolve(final String serverAddr)
throws IOException {
HttpDataLoadBuilderSvc<T, W> rlb;
final String svcUri = "//" + serverAddr + '/' +
final String svcUri = "//" + serverAddr + ':' + ServiceUtil.REGISTRY_PORT + '/' +
getClass().getName().replace("client", "server").replace("Client", "Svc");
rlb = (HttpDataLoadBuilderSvc<T, W>) ServiceUtil.getRemoteSvc(svcUri);
rlb = (HttpDataLoadBuilderSvc<T, W>) ServiceUtil.getRemoteSvc(svcUri + rlb.fork());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public BasicMixedFileLoadClient(
nextMixedLoadSvc = remoteLoadMap.get(svcAddr);
nextWrappedLoadSvcName = nextMixedLoadSvc.getWrappedLoadSvcNameFor(nextLoadType);
nextWrappedLoadSvc = (FileLoadSvc<F>) ServiceUtil
.getRemoteSvc("//" + svcAddr + "/" + nextWrappedLoadSvcName);
.getRemoteSvc("//" + svcAddr + ':' + ServiceUtil.REGISTRY_PORT + "/" + nextWrappedLoadSvcName);
nextRemoteLoadMap.put(svcAddr, nextWrappedLoadSvc);
}
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public BasicMixedHttpDataLoadClient(
nextMixedLoadSvc = remoteLoadMap.get(svcAddr);
nextWrappedLoadSvcName = nextMixedLoadSvc.getWrappedLoadSvcNameFor(nextLoadType);
nextWrappedLoadSvc = (HttpDataLoadSvc<T>) ServiceUtil
.getRemoteSvc("//" + svcAddr + "/" + nextWrappedLoadSvcName);
.getRemoteSvc("//" + svcAddr + ':' + ServiceUtil.REGISTRY_PORT + "/" + nextWrappedLoadSvcName);
nextRemoteLoadMap.put(svcAddr, nextWrappedLoadSvc);
}
//
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/emc/mongoose/common/net/ServiceUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public abstract class ServiceUtil {
//
private final static Logger LOG = LogManager.getLogger();
private static Registry REGISTRY = null;
private static int REGISTRY_PORT = Registry.REGISTRY_PORT;
public static int REGISTRY_PORT = Registry.REGISTRY_PORT;
private final static Lock REGISTRY_LOCK = new ReentrantLock();
private final static Map<String, Service> SVC_MAP = new ConcurrentHashMap<>();
private final static Map<Integer, MBeanServer> MBEAN_SERVERS = new ConcurrentHashMap<>();
Expand Down

0 comments on commit 9e5d443

Please sign in to comment.