in hbase-oss/src/main/java/org/apache/hadoop/hbase/oss/sync/TreeLockManager.java [61:81]
public static synchronized TreeLockManager get(FileSystem fs)
throws IOException {
Configuration conf = fs.getConf();
Class<? extends TreeLockManager> impl = conf.getClass(
Constants.SYNC_IMPL, ZKTreeLockManager.class, TreeLockManager.class);
TreeLockManager instance = null;
Exception cause = null;
try {
instance = impl.newInstance();
} catch (Exception e) {
cause = e;
}
if (instance == null) {
throw new IOException("Class referred to by "
+ Constants.SYNC_IMPL + ", " + impl.getName()
+ ", is not a valid implementation of "
+ TreeLockManager.class.getName(), cause);
}
instance.initialize(fs);
return instance;
}