private static void runCommand(HiveClient hive, String command)
     throws HiveServerException, TException {
   int batchSize = 80;
   hive.execute(command);
   List<String> results;
   do {
     results = hive.fetchN(batchSize);
   } while (results.size() == batchSize);
 }
示例#2
0
 private static List<String> runCommand(HiveClient hive, String command)
     throws DataAccessException {
   try {
     hive.execute(command);
     return hive.fetchAll();
   } catch (Exception ex) {
     try {
       hive.clean();
     } catch (Exception exc) {
     }
     if (ex instanceof HiveServerException) {
       throw convert((HiveServerException) ex);
     }
     throw convert((TException) ex);
   }
 }