Path tblPath = wh.getDnsPath(new Path(tbl.getSd().getLocation()));
if (tblPath == null) {
throw new MetaException("Temp table path not set for " + tbl.getTableName());
} else {
if (!wh.isDir(tblPath)) {
if (!wh.mkdirs(tblPath, true)) {
throw new MetaException(tblPath
+ " is not a directory or unable to create one");
}
}
// Make sure location string is in proper format