HDFS-12380. Simplify dataQueue.wait condition logical operation in DataStreamer::run(). Contributed by liaoyuxiangqin
This commit is contained in:
parent
dcd0bedcc8
commit
36f33a1efb
|
@ -689,7 +689,6 @@ class DataStreamer extends Daemon {
|
|||
long now = Time.monotonicNow();
|
||||
while ((!shouldStop() && dataQueue.size() == 0 &&
|
||||
(stage != BlockConstructionStage.DATA_STREAMING ||
|
||||
stage == BlockConstructionStage.DATA_STREAMING &&
|
||||
now - lastPacket < halfSocketTimeout)) || doSleep) {
|
||||
long timeout = halfSocketTimeout - (now-lastPacket);
|
||||
timeout = timeout <= 0 ? 1000 : timeout;
|
||||
|
|
Loading…
Reference in New Issue