private List<Function> convertToFunctions(List<MFunction> mfuncs) { if (mfuncs == null) { return null; } List<Function> functions = new ArrayList<>(); for (MFunction mfunc : mfuncs) { functions.add(convertToFunction(mfunc)); } return functions; }
@Override public Function getFunction(String catName, String dbName, String funcName) throws MetaException { boolean commited = false; Function func = null; Query query = null; try { openTransaction(); func = convertToFunction(getMFunction(catName, dbName, funcName)); commited = commitTransaction(); } finally { rollbackAndCleanup(commited, query); } return func; }
private List<Function> convertToFunctions(List<MFunction> mfuncs) { if (mfuncs == null) { return null; } List<Function> functions = new ArrayList<>(); for (MFunction mfunc : mfuncs) { functions.add(convertToFunction(mfunc)); } return functions; }
@Override public Function getFunction(String dbName, String funcName) throws MetaException { boolean commited = false; Function func = null; try { openTransaction(); func = convertToFunction(getMFunction(dbName, funcName)); commited = commitTransaction(); } finally { if (!commited) { rollbackTransaction(); } } return func; }
@Override public Function getFunction(String catName, String dbName, String funcName) throws MetaException { boolean commited = false; Function func = null; Query query = null; try { openTransaction(); func = convertToFunction(getMFunction(catName, dbName, funcName)); commited = commitTransaction(); } finally { rollbackAndCleanup(commited, query); } return func; }
@Override public Function getFunction(String dbName, String funcName) throws MetaException { boolean commited = false; Function func = null; try { openTransaction(); func = convertToFunction(getMFunction(dbName, funcName)); commited = commitTransaction(); } finally { if (!commited) { rollbackTransaction(); } } return func; }