private void processGlobalInitFile() { IHiveFileProcessor processor = new GlobalHivercFileProcessor(); try { String hiverc = sessionConf.getVar(ConfVars.HIVE_SERVER2_GLOBAL_INIT_FILE_LOCATION); if (hiverc != null) { File hivercFile = new File(hiverc); if (hivercFile.isDirectory()) { hivercFile = new File(hivercFile, SessionManager.HIVERCFILE); } if (hivercFile.isFile()) { LOG.info("Running global init file: " + hivercFile); int rc = processor.processFile(hivercFile.getAbsolutePath()); if (rc != 0) { LOG.error("Failed on initializing global .hiverc file"); } } else { LOG.debug("Global init file " + hivercFile + " does not exist"); } } } catch (IOException e) { LOG.warn("Failed on initializing global .hiverc file", e); } }
private void processGlobalInitFile() { IHiveFileProcessor processor = new GlobalHivercFileProcessor(); try { String hiverc = hiveConf.getVar(ConfVars.HIVE_SERVER2_GLOBAL_INIT_FILE_LOCATION); if (hiverc != null) { File hivercFile = new File(hiverc); if (hivercFile.isDirectory()) { hivercFile = new File(hivercFile, SessionManager.HIVERCFILE); } if (hivercFile.isFile()) { LOG.info("Running global init file: " + hivercFile); int rc = processor.processFile(hivercFile.getAbsolutePath()); if (rc != 0) { LOG.error("Failed on initializing global .hiverc file"); } } else { LOG.debug("Global init file " + hivercFile + " does not exist"); } } } catch (IOException e) { LOG.warn("Failed on initializing global .hiverc file", e); } }
private void processGlobalInitFile() { IHiveFileProcessor processor = new GlobalHivercFileProcessor(); try { String hiverc = hiveConf.getVar(ConfVars.HIVE_SERVER2_GLOBAL_INIT_FILE_LOCATION); if (hiverc != null) { File hivercFile = new File(hiverc); if (hivercFile.isDirectory()) { hivercFile = new File(hivercFile, SessionManager.HIVERCFILE); } if (hivercFile.isFile()) { LOG.info("Running global init file: " + hivercFile); int rc = processor.processFile(hivercFile.getAbsolutePath()); if (rc != 0) { LOG.error("Failed on initializing global .hiverc file"); } } else { LOG.debug("Global init file " + hivercFile + " does not exist"); } } } catch (IOException e) { LOG.warn("Failed on initializing global .hiverc file", e); } }
private void processGlobalInitFile() { IHiveFileProcessor processor = new GlobalHivercFileProcessor(); try { String hiverc = hiveConf.getVar(ConfVars.HIVE_SERVER2_GLOBAL_INIT_FILE_LOCATION); if (hiverc != null) { File hivercFile = new File(hiverc); if (hivercFile.isDirectory()) { hivercFile = new File(hivercFile, SessionManager.HIVERCFILE); } if (hivercFile.isFile()) { LOG.info("Running global init file: " + hivercFile); int rc = processor.processFile(hivercFile.getAbsolutePath()); if (rc != 0) { LOG.error("Failed on initializing global .hiverc file"); } } else { LOG.debug("Global init file " + hivercFile + " does not exist"); } } } catch (IOException e) { LOG.warn("Failed on initializing global .hiverc file", e); } }
private void processGlobalInitFile() { IHiveFileProcessor processor = new GlobalHivercFileProcessor(); try { String hiverc = sessionConf.getVar(ConfVars.HIVE_SERVER2_GLOBAL_INIT_FILE_LOCATION); if (hiverc != null) { File hivercFile = new File(hiverc); if (hivercFile.isDirectory()) { hivercFile = new File(hivercFile, SessionManager.HIVERCFILE); } if (hivercFile.isFile()) { LOG.info("Running global init file: " + hivercFile); int rc = processor.processFile(hivercFile.getAbsolutePath()); if (rc != 0) { LOG.error("Failed on initializing global .hiverc file"); } } else { LOG.debug("Global init file " + hivercFile + " does not exist"); } } } catch (IOException e) { LOG.warn("Failed on initializing global .hiverc file", e); } }
private void processGlobalInitFile() { IHiveFileProcessor processor = new GlobalHivercFileProcessor(); try { String hiverc = hiveConf.getVar(ConfVars.HIVE_SERVER2_GLOBAL_INIT_FILE_LOCATION); if (hiverc != null) { File hivercFile = new File(hiverc); if (hivercFile.isDirectory()) { hivercFile = new File(hivercFile, SessionManager.HIVERCFILE); } if (hivercFile.isFile()) { LOG.info("Running global init file: " + hivercFile); int rc = processor.processFile(hivercFile.getAbsolutePath()); if (rc != 0) { LOG.error("Failed on initializing global .hiverc file"); } } else { LOG.debug("Global init file " + hivercFile + " does not exist"); } } } catch (IOException e) { LOG.warn("Failed on initializing global .hiverc file", e); } }