Package org.apache.drill.common.exceptions

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


  static Filter parseFilterString(String filterString) {
    if (filterString == null) return null;
    try {
      return FILTER_PARSEER.parseFilterString(filterString);
    } catch (CharacterCodingException e) {
      throw new DrillRuntimeException("Error parsing filter string: " + filterString, e);
    }
  }
View Full Code Here


    if (filter == null) return null;
    try(ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(byteStream)) {
      HbaseObjectWritable.writeObject(out, filter, filter.getClass(), null);
      return byteStream.toByteArray();
    } catch (IOException e) {
      throw new DrillRuntimeException("Error serializing filter: " + filter, e);
    }
  }
View Full Code Here

  public static Filter deserializeFilter(byte[] filterBytes) {
    if (filterBytes == null) return null;
    try(DataInputStream dis = new DataInputStream(new ByteArrayInputStream(filterBytes));) {
      return (Filter) HbaseObjectWritable.readObject(dis, null);
    } catch (Exception e) {
      throw new DrillRuntimeException("Error deserializing filter: " + filterBytes, e);
    }
  }
View Full Code Here

        }
      }

      table.close();
    } catch (IOException e) {
      throw new DrillRuntimeException("Error getting region info for table: " + hbaseScanSpec.getTableName(), e);
    }
    verifyColumns();
  }
View Full Code Here

    try {
      DBObject delete = new BasicDBObject(1).append(ID, key);
      collection.remove(delete);
    } catch (Exception e) {
      logger.error(e.getMessage(), e);
      throw new DrillRuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

  private byte[] bytes(V value) {
    try {
      return config.getSerializer().serialize(value);
    } catch (IOException e) {
      throw new DrillRuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

  private V value(byte[] serialize) {
    try {
      return config.getSerializer().deserialize(serialize);
    } catch (IOException e) {
      throw new DrillRuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

      } else {
        return null;
      }
    } catch (Exception e) {
      logger.error(e.getMessage(), e);
      throw new DrillRuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

      putObj.put(ID, key);
      putObj.put(pKey, bytes(value));
      collection.insert(putObj);
    } catch (Exception e) {
      logger.error(e.getMessage(), e);
      throw new DrillRuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

      putObj.put(pKey, bytes(value));
      WriteResult wr = collection.update(check, putObj, true, false);
      return wr.getN() == 1 ? true : false;
    } catch (Exception e) {
      logger.error(e.getMessage(), e);
      throw new DrillRuntimeException(e.getMessage(), e);
    }
  }
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.