Github user revans2 commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2502#discussion_r167325679
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/daemon/worker/WorkerTransfer.java ---
    @@ -0,0 +1,137 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License
    + */
    +
    +package org.apache.storm.daemon.worker;
    +
    +import org.apache.storm.Config;
    +import org.apache.storm.messaging.TaskMessage;
    +import org.apache.storm.policy.IWaitStrategy;
    +import org.apache.storm.serialization.ITupleSerializer;
    +import org.apache.storm.tuple.AddressedTuple;
    +import org.apache.storm.utils.JCQueue;
    +import org.apache.storm.utils.ObjectReader;
    +import org.apache.storm.utils.TransferDrainer;
    +import org.apache.storm.utils.Utils;
    +import org.apache.storm.utils.Utils.SmartThread;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.util.Map;
    +import java.util.Queue;
    +import java.util.concurrent.atomic.AtomicBoolean;
    +import java.util.concurrent.locks.ReentrantReadWriteLock;
    +
    +// Transfers messages destined to other workers
    +class WorkerTransfer implements JCQueue.Consumer {
    +    static final Logger LOG = 
LoggerFactory.getLogger(WorkerTransfer.class);
    +
    +    private final TransferDrainer drainer;
    +    private WorkerState workerState;
    +    private IWaitStrategy backPressureWaitStrategy;
    +
    +    JCQueue transferQueue; // [remoteTaskId] -> JCQueue. Some entries 
maybe null (if no emits to those tasksIds from this worker)
    +    AtomicBoolean[] remoteBackPressureStatus; // [[remoteTaskId] -> 
true/false : indicates if remote task is under BP.
    --- End diff --
    
    Same here for package private.


---

Reply via email to