in hbase-oss/src/main/java/org/apache/hadoop/hbase/oss/LockedCreateFileBuilder.java [92:102]
public FSDataOutputStream build() throws IOException {
LOG.debug("Building output stream for {}", path);
AutoLock lock = sync.lockWrite(path);
try {
FSDataOutputStream stream = getWrapped().build();
return new AutoLock.LockedFSDataOutputStream(stream, lock);
} catch (IOException e) {
lock.close();
throw e;
}
}