chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r765791 - in /hadoop/chukwa: branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java trunk/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
Date Thu, 16 Apr 2009 22:14:24 GMT
Author: eyang
Date: Thu Apr 16 22:14:24 2009
New Revision: 765791

URL: http://svn.apache.org/viewvc?rev=765791&view=rev
Log:
CHUKWA-136.  Changed duplicate detection with indexOf. (Cheng Zhang via Eric Yang)

Modified:
    hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
    hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java

Modified: hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java?rev=765791&r1=765790&r2=765791&view=diff
==============================================================================
--- hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
(original)
+++ hadoop/chukwa/branches/chukwa-0.1/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
Thu Apr 16 22:14:24 2009
@@ -310,7 +310,7 @@
       long adaptorID;
       synchronized (adaptorsByNumber) {
         for (Map.Entry<Long, Adaptor> a : adaptorsByNumber.entrySet()) {
-          if (params.intern() == a.getValue().getStreamName().intern()) {
+          if (params.indexOf(a.getValue().getStreamName())!=-1) {
             log.warn(params + " already exist, skipping.");
             return -1;
           }

Modified: hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
URL: http://svn.apache.org/viewvc/hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java?rev=765791&r1=765790&r2=765791&view=diff
==============================================================================
--- hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
(original)
+++ hadoop/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
Thu Apr 16 22:14:24 2009
@@ -310,7 +310,7 @@
       long adaptorID;
       synchronized (adaptorsByNumber) {
         for (Map.Entry<Long, Adaptor> a : adaptorsByNumber.entrySet()) {
-          if (params.intern() == a.getValue().getStreamName().intern()) {
+          if (params.indexOf(a.getValue().getStreamName())!=-1) {
             log.warn(params + " already exist, skipping.");
             return -1;
           }



Mime
View raw message