IHiveFileProcessor.processFile
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.apache.hadoop.hive.common.cli.IHiveFileProcessor.processFile (Showing top 6 results out of 315)

  • Common ways to obtain IHiveFileProcessor
private void myMethod () {
IHiveFileProcessor i =
  • new GlobalHivercFileProcessor()
  • Smart code suggestions by Codota
}
origin: apache/hive

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);
 }
}
origin: org.spark-project.hive/hive-service

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);
 }
}
origin: org.apache.hive/hive-service

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);
 }
}
origin: org.apache.spark/spark-hive-thriftserver

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);
 }
}
origin: org.apache.spark/spark-hive-thriftserver_2.11

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);
 }
}
origin: com.github.hyukjinkwon/hive-service

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);
 }
}
org.apache.hadoop.hive.common.cliIHiveFileProcessorprocessFile

Javadoc

Parse the file and execute the Hive commands in it.

Popular methods of IHiveFileProcessor

    Popular in Java

    • Making http requests using okhttp
    • scheduleAtFixedRate (ScheduledExecutorService)
    • scheduleAtFixedRate (Timer)
    • getResourceAsStream (ClassLoader)
      Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
    • BorderLayout (java.awt)
      A border layout lays out a container, arranging and resizing its components to fit in five regions:
    • FileInputStream (java.io)
      An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
    • RandomAccessFile (java.io)
      Allows reading from and writing to a file in a random-access manner. This is different from the uni-
    • MalformedURLException (java.net)
      This exception is thrown when a program attempts to create an URL from an incorrect specification.
    • Properties (java.util)
      A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
    • Logger (org.slf4j)
      The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin

    For IntelliJ IDEA,
    Android Studio or Eclipse

    • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
    • EnterpriseFAQAboutBlogContact Us
    • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
    Add Codota to your IDE (free)