Package org.apache.hadoop.hive.ql.processors

Examples of org.apache.hadoop.hive.ql.processors.CommandProcessor.run()


            ((Driver)proc).destroy();
            isHiveQuery = true;
            response = driver.run(cmd);
          } else {
            isHiveQuery = false;
            response = proc.run(cmd_1);
          }

          ret = response.getResponseCode();
          SQLState = response.getSQLState();
          errorMessage = response.getErrorMessage();
View Full Code Here


            double timeTaken = (end - start) / 1000.0;
            console.printInfo("Time taken: " + timeTaken + " seconds", null);
          }

        } else {
          ret = proc.run(cmd_1).getResponseCode();
        }
      }
    }

    return ret;
View Full Code Here

            } else {
              if (ss.getIsVerbose()) {
                ss.out.println(tokens[0] + " " + cmd_1);
              }
              ret = proc.run(cmd_1).getResponseCode();
            }
          }
        } catch (CommandNeedRetryException e) {
          console.printInfo("Retry query with a different approach...");
          tryCount++;
View Full Code Here

          } else {
            isHiveQuery = false;
            driver = null;
            // need to reset output for each non-Hive query
            setupSessionIO(session);
            response = proc.run(cmd_1);
          }

          ret = response.getResponseCode();
          SQLState = response.getSQLState();
          errorMessage = response.getErrorMessage();
View Full Code Here

          } finally {
            qp.close();
          }
        } else {
          try {
            queryRet.add(Integer.valueOf(proc.run(cmd_1).getResponseCode()));
          } catch (CommandNeedRetryException e) {
            // this should never happen if there is no bug
            l4j.error(getSessionName() + " Exception when executing", e);
          }
        }
View Full Code Here

            ret = response.getResponseCode();
            SQLState = response.getSQLState();
            errorMessage = response.getErrorMessage();
          } else {
            isHiveQuery = false;
            ret = proc.run(cmd_1);
          }
        }
      } catch (Exception e) {
        HiveServerException ex = new HiveServerException();
        ex.setMessage("Error running query: " + e.toString());
View Full Code Here

            l4j.error(this.getSessionName() + " getting results "
            + this.getResultFile() + " caused exception.", ex);
          }
          qp.close();
        } else {
          queryRet.add( new Integer(proc.run(cmd_1) ) );
        }
      } else {
        //processor was null
  l4j.error(this.getSessionName() +
  " query processor was not found for query "+ cmd );
View Full Code Here

            double timeTaken = (end - start) / 1000.0;
            console.printInfo("Time taken: " + timeTaken + " seconds", null);
          }

        } else {
          ret = proc.run(cmd_1).getResponseCode();
        }
      }
    }

    return ret;
View Full Code Here

          if (proc instanceof Driver) {
            isHiveQuery = true;
            ret = driver.run(cmd);
          } else {
            isHiveQuery = false;
            ret = proc.run(cmd_1);
          }
        }
      } catch (Exception e) {
        throw new HiveServerException("Error running query: " + e.toString());
      }
View Full Code Here

            double timeTaken = (double)(end-start)/1000.0;
            console.printInfo("Time taken: " + timeTaken + " seconds", null);
          }

        } else {
          ret = proc.run(cmd_1);
        }
      }
    }

    return ret;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.