Package org.apache.cassandra.thrift

Examples of org.apache.cassandra.thrift.NotFoundException$NotFoundExceptionStandardSchemeFactory


   * @return the Column that was requested if it exists.
   * @throws NotFoundException if the result doesn't exist (including if the value holds a tumbstone)
   */
    public static  IColumn validateAndGetColumn(List<Row> rows, ByteBuffer columnName) throws NotFoundException {
        if(rows.isEmpty())
            throw new NotFoundException();

        if(rows.size() > 1)
            throw new RuntimeException("Block id returned more than one row");

        Row row = rows.get(0);
        if(row.cf == null)
            throw new NotFoundException();

        IColumn col = row.cf.getColumn(columnName);

        if(col == null || !col.isLive())
            throw new NotFoundException();

        return col;
    }
View Full Code Here

TOP

Related Classes of org.apache.cassandra.thrift.NotFoundException$NotFoundExceptionStandardSchemeFactory

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.