Details

    • Sub-task
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 3.0.0-alpha1
    • None
    • hdfs-client

    Description

      HBase prefers to invoke read() serving scan request, and invoke pread() serving get reqeust. Because pread() almost holds no lock.
      Let's image there's a read() running, because the definition is:

      public synchronized int read
      

      so no other read() request could run concurrently, this is known, but pread() also could not run... because:

        public int read(long position, byte[] buffer, int offset, int length)
          throws IOException {
          // sanity checks
          dfsClient.checkOpen();
          if (closed) {
            throw new IOException("Stream closed");
          }
          failures = 0;
          long filelen = getFileLength();
      

      the getFileLength() also needs lock. so we need to figure out a no lock impl for getFileLength() before HBase multi stream feature done. saint.ack@gmail.com

      Attachments

        1. HDFS-6698v3.txt
          3 kB
          Lars Hofhansl
        2. HDFS-6698v2.txt
          19 kB
          Michael Stack
        3. HDFS-6698v2.txt
          2 kB
          Michael Stack
        4. HDFS-6698.txt
          2 kB
          Michael Stack
        5. HDFS-6698.txt
          2 kB
          Liang Xie

        Activity

          People

            xieliang007 Liang Xie
            xieliang007 Liang Xie
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated: