Details

    • Type: Sub-task
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: None
    • Component/s: hdfs-client
    • Labels:

      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. Stack

        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

            • Assignee:
              xieliang007 Liang Xie
              Reporter:
              xieliang007 Liang Xie
            • Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated: