@Override public TakeSnapshotHandler prepare() throws Exception { super.prepare(); // after this, you should ensure to release this lock in case of exceptions this.tableLock.acquire(); try { this.htd = loadTableDescriptor(); // check that .tableinfo is present } catch (Exception e) { this.tableLock.release(); throw e; } return this; }
public TakeSnapshotHandler prepare() throws Exception { super.prepare(); this.tableLock.acquire(); // after this, you should ensure to release this lock in // case of exceptions boolean success = false; try { this.htd = loadTableDescriptor(); // check that .tableinfo is present success = true; } finally { if (!success) { releaseTableLock(); } } return this; }