This is an automated email from the ASF dual-hosted git repository.
imesha pushed a commit to branch development
in repository https://gitbox.apache.org/repos/asf/oodt.git
The following commit(s) were added to refs/heads/development by this push:
new b25d470 add host to InetSocketAddress creation
new 564cb93 Merge pull request #106 from yasithmilinda/OODT-1020
b25d470 is described below
commit b25d470a34712c6adffe061ff2dfd2bf0f05bf04
Author: yasith <[email protected]>
AuthorDate: Tue Aug 20 16:39:28 2019 -0400
add host to InetSocketAddress creation
---
.../src/main/java/org/apache/oodt/pcs/tools/PCSHealthMonitor.java | 2 +-
.../org/apache/oodt/cas/resource/batchmgr/AvroRpcBatchMgrProxy.java | 6 +++---
.../org/apache/oodt/cas/resource/system/AvroRpcResourceManager.java | 2 +-
.../oodt/cas/resource/system/AvroRpcResourceManagerClient.java | 2 +-
.../oodt/cas/workflow/system/AvroRpcWorkflowManagerClient.java | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git
a/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSHealthMonitor.java
b/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSHealthMonitor.java
index c9d338a..58b1e8c 100644
--- a/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSHealthMonitor.java
+++ b/pcs/core/src/main/java/org/apache/oodt/pcs/tools/PCSHealthMonitor.java
@@ -620,7 +620,7 @@ public final class PCSHealthMonitor implements CoreMetKeys,
NettyTransceiver client;
AvroRpcBatchStub proxy;
try {
- client = new NettyTransceiver(new
InetSocketAddress(node.getIpAddr().getPort()));
+ client = new NettyTransceiver(new
InetSocketAddress(node.getIpAddr().getHost(), node.getIpAddr().getPort()));
proxy = (AvroRpcBatchStub)
SpecificRequestor.getClient(AvroRpcBatchStub.class, client);
return proxy.isAlive();
} catch (IOException e) {
diff --git
a/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/AvroRpcBatchMgrProxy.java
b/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/AvroRpcBatchMgrProxy.java
index 704eec6..b526af3 100644
---
a/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/AvroRpcBatchMgrProxy.java
+++
b/resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/AvroRpcBatchMgrProxy.java
@@ -57,7 +57,7 @@ public class AvroRpcBatchMgrProxy extends Thread implements
Runnable {
public boolean nodeAlive() {
try {
- this.client = new NettyTransceiver(new
InetSocketAddress(remoteHost.getIpAddr().getPort()));
+ this.client = new NettyTransceiver(new
InetSocketAddress(remoteHost.getIpAddr().getHost(),
remoteHost.getIpAddr().getPort()));
this.proxy = (AvroRpcBatchStub)
SpecificRequestor.getClient(AvroRpcBatchStub.class, client);
} catch (IOException e) {
e.printStackTrace();
@@ -80,7 +80,7 @@ public class AvroRpcBatchMgrProxy extends Thread implements
Runnable {
public boolean killJob() {
try {
- this.client = new NettyTransceiver(new
InetSocketAddress(remoteHost.getIpAddr().getPort()));
+ this.client = new NettyTransceiver(new
InetSocketAddress(remoteHost.getIpAddr().getHost(),
remoteHost.getIpAddr().getPort()));
this.proxy = (AvroRpcBatchStub)
SpecificRequestor.getClient(AvroRpcBatchStub.class, client);
} catch (IOException e) {
LOG.log(Level.SEVERE, "Failed connection with the server.", e);
@@ -104,7 +104,7 @@ public class AvroRpcBatchMgrProxy extends Thread implements
Runnable {
public void run() {
try {
- this.client = new NettyTransceiver(new
InetSocketAddress(remoteHost.getIpAddr().getPort()));
+ this.client = new NettyTransceiver(new
InetSocketAddress(remoteHost.getIpAddr().getHost(),
remoteHost.getIpAddr().getPort()));
this.proxy = (AvroRpcBatchStub)
SpecificRequestor.getClient(AvroRpcBatchStub.class, client);
} catch (IOException e) {
LOG.log(Level.SEVERE, "Failed connection with the server.", e);
diff --git
a/resource/src/main/java/org/apache/oodt/cas/resource/system/AvroRpcResourceManager.java
b/resource/src/main/java/org/apache/oodt/cas/resource/system/AvroRpcResourceManager.java
index fc3e2ae..9d9c0f9 100644
---
a/resource/src/main/java/org/apache/oodt/cas/resource/system/AvroRpcResourceManager.java
+++
b/resource/src/main/java/org/apache/oodt/cas/resource/system/AvroRpcResourceManager.java
@@ -466,7 +466,7 @@ public class AvroRpcResourceManager implements
org.apache.oodt.cas.resource.stru
try {
this.scheduler.getMonitor().getNodeById(nodeId).setCapacity(capacity);
} catch (MonitorException e) {
- logger.warn("Exception setting capacity on node {}: ", nodeId,
e.getMessage());
+ logger.warn("Exception setting capacity on node {}: {}", nodeId,
e.getMessage());
return false;
}
return true;
diff --git
a/resource/src/main/java/org/apache/oodt/cas/resource/system/AvroRpcResourceManagerClient.java
b/resource/src/main/java/org/apache/oodt/cas/resource/system/AvroRpcResourceManagerClient.java
index dc6e3a6..b248362 100644
---
a/resource/src/main/java/org/apache/oodt/cas/resource/system/AvroRpcResourceManagerClient.java
+++
b/resource/src/main/java/org/apache/oodt/cas/resource/system/AvroRpcResourceManagerClient.java
@@ -73,7 +73,7 @@ public class AvroRpcResourceManagerClient implements
ResourceManagerClient {
}
try {
- this.client = new NettyTransceiver(new
InetSocketAddress(url.getPort()));
+ this.client = new NettyTransceiver(new
InetSocketAddress(url.getHost(), url.getPort()));
proxy = (ResourceManager)
SpecificRequestor.getClient(ResourceManager.class, client);
} catch (IOException e) {
e.printStackTrace();
diff --git
a/workflow/src/main/java/org/apache/oodt/cas/workflow/system/AvroRpcWorkflowManagerClient.java
b/workflow/src/main/java/org/apache/oodt/cas/workflow/system/AvroRpcWorkflowManagerClient.java
index ac765f4..a4114c6 100644
---
a/workflow/src/main/java/org/apache/oodt/cas/workflow/system/AvroRpcWorkflowManagerClient.java
+++
b/workflow/src/main/java/org/apache/oodt/cas/workflow/system/AvroRpcWorkflowManagerClient.java
@@ -240,7 +240,7 @@ public class AvroRpcWorkflowManagerClient implements
WorkflowManagerClient {
public void setWorkflowManagerUrl(URL workflowManagerUrl) {
this.workflowManagerUrl = workflowManagerUrl;
try {
- client = new NettyTransceiver(new
InetSocketAddress(workflowManagerUrl.getPort()));
+ client = new NettyTransceiver(new
InetSocketAddress(workflowManagerUrl.getHost(), workflowManagerUrl.getPort()));
proxy =
SpecificRequestor.getClient(org.apache.oodt.cas.workflow.struct.avrotypes.WorkflowManager.class,
client);
} catch (IOException e) {
logger.error("Error occurred when setting workflow manager url:
{}", workflowManagerUrl, e);