Details
-
Sub-task
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
3.0.0-alpha1
-
None
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