Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9756

Hard-Code value in DataTransferThrottler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 2.7.1
    • None
    • None
    • None

    Description

      In DataTransferThrottler, the period time is hard-code for 500 ms. Even though it has other construction method,

      /**
         * Constructor
         * @param period in milliseconds. Bandwidth is enforced over this
         *        period.
         * @param bandwidthPerSec bandwidth allowed in bytes per second. 
         */
        public DataTransferThrottler(long period, long bandwidthPerSec) {
          this.curPeriodStart = monotonicNow();
          this.period = period;
          this.curReserve = this.bytesPerPeriod = bandwidthPerSec*period/1000;
          this.periodExtension = period*3;
        }
      

      but it was only invoked by this method

      public DataTransferThrottler(long bandwidthPerSec) {
          this(500, bandwidthPerSec);  // by default throttling period is 500ms 
      }
      

      So the period is a hard-code. This value can also influence the data-transfering. If period time value set small, the number of times to waitting for next period will be increased and the total waitting-time also be increased. So the average bandwidth will be decreased.

      Attachments

        1. HDFS-9756.002.patch
          13 kB
          Yiqun Lin
        2. HDFS-9756.001.patch
          11 kB
          Yiqun Lin

        Activity

          People

            linyiqun Yiqun Lin
            linyiqun Yiqun Lin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: