Преглед на файлове

ZOOKEEPER-1580: QuorumPeer.setRunning is not used

- more details in [JIRA:ZOOKEEPER-1580](https://issues.apache.org/jira/browse/ZOOKEEPER-1580)
- I forget fetching the upstream codes, make a mistake in the origin [PR-446] (https://github.com/apache/zookeeper/pull/446) which includes some review history,so I close it and open a new one

Author: maoling <maoling199210191@sina.com>

Reviewers: Patrick Hunt <phunt@apache.org>, Andor Molnár <andor@cloudera.com>, Abraham Fine <afine@apache.org>

Closes #452 from maoling/ZOOKEEPER-1580 and squashes the following commits:

29a5aba1e [maoling] remove the setter and return back to setting the running field directly
28de1e88f [maoling] ZOOKEEPER-1580:QuorumPeer.setRunning is not used
maoling преди 7 години
родител
ревизия
d1b07d588e
променени са 1 файла, в които са добавени 1 реда и са изтрити 5 реда
  1. 1 5
      src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java

+ 1 - 5
src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java

@@ -479,7 +479,7 @@ public class QuorumPeer extends ZooKeeperThread implements QuorumStats.Provider
         currentVote = v;
     }
 
-    volatile boolean running = true;
+    private volatile boolean running = true;
 
     /**
      * The number of milliseconds of each tick
@@ -1750,10 +1750,6 @@ public class QuorumPeer extends ZooKeeperThread implements QuorumStats.Provider
     public synchronized void initConfigInZKDatabase() {   
         if (zkDb != null) zkDb.initConfigInZKDatabase(getQuorumVerifier());
     }
-    
-    public void setRunning(boolean running) {
-        this.running = running;
-    }
 
     public boolean isRunning() {
         return running;