Package org.apache.drill.common.exceptions

Examples of org.apache.drill.common.exceptions.DrillRuntimeException


        Scan scan = new Scan(tableNameStartKey, tableNameStopKey);
        scan.addColumn(FAMILY, QUALIFIER);
        scan.setCaching(100);
        scanner = table.getScanner(scan);
      } catch (IOException e) {
        throw new DrillRuntimeException("Caught error while creating HBase scanner for table:" + Bytes.toString(table.getTableName()), e);
      }
    }
View Full Code Here


          if ((current = scanner.next()) == null) {
            done = true;
            scanner.close();
          }
        } catch (IOException e) {
          throw new DrillRuntimeException("Caught error while fetching rows from for table:" + Bytes.toString(table.getTableName()), e);
        }
      }
      return (current != null);
    }
View Full Code Here

              operatorContext.getStats().stopWait();
            }
          }
        }
      } catch (IOException e) {
        throw new DrillRuntimeException(e);
      }
      if (result == null) {
        break done;
      }
View Full Code Here

        getColumns().add(column);
        familyVectorMap.put(familyName, v);
      }
      return v;
    } catch (SchemaChangeException e) {
      throw new DrillRuntimeException(e);
    }
  }
View Full Code Here

        desc.addFamily(new HColumnDescriptor(FAMILY_BLOB).setMaxVersions(1));
        admin.createTable(desc);
      } else {
        HTableDescriptor desc = admin.getTableDescriptor(Bytes.toBytes(storeTableName));
        if (!desc.hasFamily(FAMILY) || !desc.hasFamily(FAMILY_BLOB)) {
          throw new DrillRuntimeException("The HBase table " + storeTableName
              + " specified as persistent store exists but does not contain column family: "
              + (desc.hasFamily(FAMILY) ? Bytes.toString(FAMILY_BLOB) : Bytes.toString(FAMILY)));
        }
      }
    }
View Full Code Here

      AvaticaStatement statement = connection.createStatement();
      statement.execute(s);
      return statement.getResultSet();

    } catch (Exception e) {
      throw new DrillRuntimeException("Failure while attempting to get DatabaseMetadata.", e);
    }

  }
View Full Code Here

        if (args.size() != 3) {
            StringBuilder err = new StringBuilder();
            for (int i = 0; i < args.size(); i++) {
                err.append("arg" + i + ": " + args.get(i).getMajorType().getMinorType());
            }
            throw new DrillRuntimeException("Decimal cast function invoked with incorect arguments" + err);
        }

        int scale = (int) ((ValueExpressions.LongExpression)(args.get(args.size() - 1))).getLong();
        int precision = (int) ((ValueExpressions.LongExpression)(args.get(args.size() - 2))).getLong();
        return (TypeProtos.MajorType.newBuilder().setMinorType(returnValue.type.getMinorType()).setScale(scale).setPrecision(precision).setMode(mode).build());
View Full Code Here

    } else if ((firstByte & 0xF0) == 0xE0) { // 3-byte char. First byte is 1110xxxx
      return 3;
    } else if ((firstByte & 0xF8) == 0xF0) { //4-byte char. First byte is 11110xxx
      return 4;
    }
    throw new DrillRuntimeException("Unexpected byte 0x" + Integer.toString((int)firstByte & 0xff, 16)
        + " at position " + idx + " encountered while decoding UTF8 string.");
  }
View Full Code Here

      return 3;
    }
    else if ((currentByte & 0xF8) == 0xF0) {    //4-byte char. First byte is 11110xxx
      return 4;
    }
    throw new DrillRuntimeException("Unexpected byte 0x" + Integer.toString((int)currentByte & 0xff, 16) + " encountered while decoding UTF8 string.");
  }
View Full Code Here

    if (args.size() == 1) {
      return args.get(0);
    }

    if (args.size() - 1 != opTypes.size()) {
      throw new DrillRuntimeException("Must receive one more expression then the provided number of operators.");
    }

    LogicalExpression first = args.get(0);
    for (int i = 0; i < opTypes.size(); i++) {
      List<LogicalExpression> l2 = new ArrayList<LogicalExpression>();
View Full Code Here

TOP

Related Classes of org.apache.drill.common.exceptions.DrillRuntimeException

Copyright © 2018 www.massapicom. 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.