Package com.cloudera.cdk.data

Examples of com.cloudera.cdk.data.DatasetIOException


        get = getModifier.modifyGet(get);
      }
      try {
        return table.get(get);
      } catch (IOException e) {
        throw new DatasetIOException("Error performing get", e);
      }
    } finally {
      if (table != null) {
        try {
          table.close();
        } catch (IOException e) {
          throw new DatasetIOException("Error putting table back into pool",
              e);
        }
      }
    }
  }
View Full Code Here


    } finally {
      if (table != null) {
        try {
          table.close();
        } catch (IOException e) {
          throw new DatasetIOException("Error putting table back into pool",
              e);
        }
      }
    }
  }
View Full Code Here

      }
      try {
        return table.checkAndPut(put.getRow(), Constants.SYS_COL_FAMILY,
            Constants.VERSION_CHECK_COL_QUALIFIER, versionBytes, put);
      } catch (IOException e) {
        throw new DatasetIOException(
            "Error putting row from table with checkAndPut", e);
      }
    } else {
      try {
        table.put(put);
        return true;
      } catch (IOException e) {
        throw new DatasetIOException("Error putting row from table", e);
      }
    }
  }
View Full Code Here

    HTableInterface table = pool.getTable(tableName);
    Result result;
    try {
      result = table.increment(increment);
    } catch (IOException e) {
      throw new DatasetIOException("Error incrementing field.", e);
    }
    return entityMapper.mapFromIncrementResult(result, fieldName);

  }
View Full Code Here

        try {
          return table.checkAndDelete(delete.getRow(),
              Constants.SYS_COL_FAMILY, Constants.VERSION_CHECK_COL_QUALIFIER,
              versionBytes, delete);
        } catch (IOException e) {
          throw new DatasetIOException(
              "Error deleteing row from table with checkAndDelete", e);
        }
      } else {
        try {
          table.delete(delete);
          return true;
        } catch (IOException e) {
          throw new DatasetIOException("Error deleteing row from table", e);
        }
      }
    } finally {
      if (table != null) {
        try {
          table.close();
        } catch (IOException e) {
          throw new DatasetIOException("Error putting table back into pool",
              e);
        }
      }
    }
  }
View Full Code Here

    try {
      table = tablePool.getTable(tableName);
      try {
        resultScanner = table.getScanner(scan);
      } catch (IOException e) {
        throw new DatasetIOException("Failed to fetch scanner", e);
      }
    } finally {
      if (table != null) {
        try {
          table.close();
        } catch (IOException e) {
          throw new DatasetIOException("Error putting table back into pool",
              e);
        }
      }
    }
    iterator = resultScanner.iterator();
View Full Code Here

     * should be empty.
     */
    try {
      table.setWriteBufferSize(writeBufferSize);
    } catch (IOException e) {
      throw new DatasetIOException("Error flushing commits for table ["
          + table + "]", e);
    }
  }
View Full Code Here

        "Attempt to flush a writer in state:%s", state);

    try {
      table.flushCommits();
    } catch (IOException e) {
      throw new DatasetIOException("Error flushing commits for table ["
          + table + "]", e);
    }
  }
View Full Code Here

      try {
        table.flushCommits();
        table.setAutoFlush(true);
        table.close();
      } catch (IOException e) {
        throw new DatasetIOException("Error closing table [" + table + "]", e);
      }
      state = ReaderWriterState.CLOSED;
    }
  }
View Full Code Here

      for (List<KeyValue> keyValueList : familyMap.values()) {
        for (KeyValue keyValue : keyValueList) {
          try {
            put.add(new KeyValue(keyBytes, keyValue.getFamily(), keyValue.getQualifier(), keyValue.getTimestamp(), keyValue.getValue()));
          } catch (IOException e) {
            throw new DatasetIOException("Could not add KeyValue to put", e);
          }
        }
      }
    }
    return put;
View Full Code Here

TOP

Related Classes of com.cloudera.cdk.data.DatasetIOException

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.