createDefaultDB(); createDefaultRoles(); addAdminUsers();
private boolean init() throws MetaException { rawStoreClassName = hiveConf.get("hive.metastore.rawstore.impl"); checkForDefaultDb = hiveConf.getBoolean( "hive.metastore.checkForDefaultDb", true); String alterHandlerName = hiveConf.get("hive.metastore.alter.impl", HiveAlterHandler.class.getName()); alterHandler = (AlterHandler) ReflectionUtils.newInstance(getClass( alterHandlerName, AlterHandler.class), hiveConf); wh = new Warehouse(hiveConf); retryInterval = HiveConf.getIntVar(hiveConf, HiveConf.ConfVars.METASTOREINTERVAL); retryLimit = HiveConf.getIntVar(hiveConf, HiveConf.ConfVars.METASTOREATTEMPTS); // Using the hook on startup ensures that the hook always has priority // over settings in *.xml. We can use hiveConf as only a single thread // will be calling the constructor. updateConnectionURL(hiveConf, null); createDefaultDB(); if (hiveConf.getBoolean("hive.metastore.metrics.enabled", false)) { try { Metrics.init(); } catch (Exception e) { // log exception, but ignore inability to start LOG.error("error in Metrics init: " + e.getClass().getName() + " " + e.getMessage()); MetaStoreUtils.printStackTrace(e); } } return true; }
createDefaultDB(); createDefaultRoles(); addAdminUsers();
createDefaultDB(); createDefaultRoles(); addAdminUsers();
wh = new Warehouse(hiveConf); createDefaultDB();
createDefaultDB(); createDefaultRoles(); addAdminUsers();