Author: cwiklik
Date: Tue Jan 19 14:55:11 2016
New Revision: 1725539

URL: http://svn.apache.org/viewvc?rev=1725539&view=rev
Log:
UIMA-4761 Added PID to agent node metrics

Modified:
    
uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/NodeIdentity.java

Modified: 
uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/NodeIdentity.java
URL: 
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/NodeIdentity.java?rev=1725539&r1=1725538&r2=1725539&view=diff
==============================================================================
--- 
uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/NodeIdentity.java
 (original)
+++ 
uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/NodeIdentity.java
 Tue Jan 19 14:55:11 2016
@@ -24,21 +24,26 @@ import java.net.NetworkInterface;
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.List;
+import org.apache.uima.ducc.user.common.Utils;
 
 public class NodeIdentity implements Serializable {
        private static final long serialVersionUID = -3725003472985192870L;
        private String name;
        private String ip;
+        private String pid;
+
        private List<IIdentity> nodeIdentities = new ArrayList<IIdentity>();
        public NodeIdentity(String ip, String name) throws Exception {
                setName(name);
                setIp(ip);
+               setPid(Utils.getPID());
+
                nodeIdentities.add( new Identity(name, ip));
        }
        public NodeIdentity() throws Exception {
                setName(InetAddress.getLocalHost().getCanonicalHostName());
                setIp(InetAddress.getLocalHost().getHostAddress());
-               
+               setPid(Utils.getPID());
                Enumeration<NetworkInterface> netinterfaces = 
                                NetworkInterface.getNetworkInterfaces();
            while (netinterfaces.hasMoreElements()) {
@@ -50,6 +55,12 @@ public class NodeIdentity implements Ser
                }
            }
        }
+        private void setPid(String pid) {
+           this.pid = pid;
+        }
+        public String getPid() {
+           return pid;
+        }
        public List<IIdentity> getNodeIdentities() {
                return nodeIdentities;
        }


Reply via email to