private ReplChangeManager(Configuration conf) throws MetaException { try { if (!inited) { if (MetastoreConf.getBoolVar(conf, ConfVars.REPLCMENABLED)) { ReplChangeManager.enabled = true; ReplChangeManager.cmroot = new Path(MetastoreConf.getVar(conf, ConfVars.REPLCMDIR)); ReplChangeManager.conf = conf; FileSystem cmFs = cmroot.getFileSystem(conf); // Create cmroot with permission 700 if not exist if (!cmFs.exists(cmroot)) { cmFs.mkdirs(cmroot); cmFs.setPermission(cmroot, new FsPermission("700")); } UserGroupInformation usergroupInfo = UserGroupInformation.getCurrentUser(); msUser = usergroupInfo.getShortUserName(); msGroup = usergroupInfo.getPrimaryGroupName(); } inited = true; } } catch (IOException e) { throw new MetaException(StringUtils.stringifyException(e)); } }
LOG.error("Exception when clearing cmroot:" + StringUtils.stringifyException(e));
} catch (Exception e) { throw new MetaException( org.apache.hadoop.hive.metastore.utils.StringUtils.stringifyException(e));
@Override public List<FieldSchema> readSchema(Table tbl, EnvironmentContext envContext, Configuration conf) throws MetaException { ClassLoader orgHiveLoader = null; try { if (envContext != null) { String addedJars = envContext.getProperties().get("hive.added.jars.path"); if (org.apache.commons.lang.StringUtils.isNotBlank(addedJars)) { //for thread safe orgHiveLoader = conf.getClassLoader(); ClassLoader loader = org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.addToClassPath( orgHiveLoader, org.apache.commons.lang.StringUtils.split(addedJars, ",")); conf.setClassLoader(loader); } } Deserializer s = HiveMetaStoreUtils.getDeserializer(conf, tbl, false); return HiveMetaStoreUtils.getFieldsFromDeserializer(tbl.getTableName(), s); } catch (Exception e) { StringUtils.stringifyException(e); throw new MetaException(e.getMessage()); } finally { if (orgHiveLoader != null) { conf.setClassLoader(orgHiveLoader); } } } }
throw new MetaException(StringUtils.stringifyException(e));