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