Package org.apache.drill.common.exceptions

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


    try {
      Get get = new Get(row(key));
      get.addColumn(family, QUALIFIER);
      return value(table.get(get));
    } catch (IOException e) {
      throw new DrillRuntimeException("Caught error while getting row '" + key + "' from for table:" + Bytes.toString(table.getTableName()), e);
    }
  }
View Full Code Here


    try {
      Put put = new Put(row(key));
      put.add(family, QUALIFIER, bytes(value));
      table.put(put);
    } catch (IOException e) {
      throw new DrillRuntimeException("Caught error while putting row '" + key + "' from for table:" + Bytes.toString(table.getTableName()), e);
    }
  }
View Full Code Here

    try {
      Put put = new Put(row(key));
      put.add(FAMILY, QUALIFIER, bytes(value));
      return table.checkAndPut(put.getRow(), FAMILY, QUALIFIER, null /*absent*/, put);
    } catch (IOException e) {
      throw new DrillRuntimeException("Caught error while putting row '" + key + "' from for table:" + Bytes.toString(table.getTableName()), e);
    }
  }
View Full Code Here

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

  private V value(Result result) {
    try {
      return config.getSerializer().deserialize(result.value());
    } catch (IOException e) {
      throw new DrillRuntimeException(e);
    }
  }
View Full Code Here

  private void delete(byte[] row) {
    try {
      Delete del = new Delete(row);
      table.delete(del);
    } catch (IOException e) {
      throw new DrillRuntimeException("Caught error while deleting row '" + Bytes.toStringBinary(row)
          + "' from for table:" + Bytes.toString(table.getTableName()), e);
    }
  }
View Full Code Here

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

    }
    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

      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

        List<ChunkInfo> chunksList = Lists.newArrayList();
        chunksList.add(chunkInfo);
        chunksInverseMapping.put(address.getHost(), chunksList);
      }
    } catch (UnknownHostException e) {
      throw new DrillRuntimeException(e.getMessage(), e);
    } finally {
      if (client != null) {
        client.close();
      }
    }
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.