Package co.cask.cdap.api.dataset

Examples of co.cask.cdap.api.dataset.DataSetException


  public void delete(byte[] row, byte[] column) {
    try {
      table.delete(row, column);
    } catch (Exception e) {
      LOG.debug("delete failed for table: " + getTransactionAwareName() + ", row: " + Bytes.toStringBinary(row), e);
      throw new DataSetException("delete failed", e);
    }
  }
View Full Code Here


  public void delete(byte[] row, byte[][] columns) {
    try {
      table.delete(row, columns);
    } catch (Exception e) {
      LOG.debug("delete failed for table: " + getTransactionAwareName() + ", row: " + Bytes.toStringBinary(row), e);
      throw new DataSetException("delete failed", e);
    }
  }
View Full Code Here

    } catch (NumberFormatException e) {
      LOG.debug("increment failed for table: " + getTransactionAwareName() + ", row: " + Bytes.toStringBinary(row), e);
      throw e;
    } catch (Exception e) {
      LOG.debug("increment failed for table: " + getTransactionAwareName() + ", row: " + Bytes.toStringBinary(row), e);
      throw new DataSetException("increment failed", e);
    }
  }
View Full Code Here

    } catch (NumberFormatException e) {
      LOG.debug("increment failed for table: " + getTransactionAwareName() + ", row: " + Bytes.toStringBinary(row), e);
      throw e;
    } catch (Exception e) {
      LOG.debug("increment failed for table: " + getTransactionAwareName() + ", row: " + Bytes.toStringBinary(row), e);
      throw new DataSetException("increment failed", e);
    }
    // todo: define IncrementResult to make it more efficient
    return new Result(row, Maps.transformValues(incResult, new Function<Long, byte[]>() {
      @Nullable
      @Override
View Full Code Here

    try {
      table.increment(row, column, amount);
    } catch (Exception e) {
      LOG.debug("increment failed for table: " + getTransactionAwareName() +
                  ", row: " + Bytes.toStringBinary(row), e);
      throw new DataSetException("increment failed", e);
    }
  }
View Full Code Here

    try {
      table.increment(row, columns, amounts);
    } catch (Exception e) {
      LOG.debug("increment failed for table: " + getTransactionAwareName() +
                  ", row: " + Bytes.toStringBinary(row), e);
      throw new DataSetException("increment failed", e);
    }
  }
View Full Code Here

    try {
      return table.compareAndSwap(row, column, expectedValue, newValue);
    } catch (Exception e) {
      String msg = "compareAndSwap failed for table: " + getTransactionAwareName();
      LOG.debug(msg, e);
      throw new DataSetException(msg, e);
    }
  }
View Full Code Here

  public Scanner scan(byte[] startRow, byte[] stopRow) {
    try {
      return table.scan(startRow, stopRow);
    } catch (Exception e) {
      LOG.debug("scan failed for table: " + getTransactionAwareName(), e);
      throw new DataSetException("scan failed", e);
    }
  }
View Full Code Here

  public List<Split> getSplits(int numSplits, byte[] start, byte[] stop) {
    try {
      return table.getSplits(numSplits, start, stop);
    } catch (Exception e) {
      LOG.error("getSplits failed for table: " + getTransactionAwareName(), e);
      throw new DataSetException("getSplits failed", e);
    }
  }
View Full Code Here

      TableSplit tableSplit = (TableSplit) split;
      try {
        this.scanner = table.scan(tableSplit.getStart(), tableSplit.getStop());
      } catch (Exception e) {
        LOG.debug("scan failed for table: " + getTransactionAwareName(), e);
        throw new DataSetException("scan failed", e);
      }
    }
View Full Code Here

TOP

Related Classes of co.cask.cdap.api.dataset.DataSetException

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.