Examples of RecordException


Examples of com.hp.hpl.jena.tdb.base.record.RecordException

    protected BufferBase(ByteBuffer bb, int slotLen, int num)
    {
        if ( CheckBuffer )
        {
            if ( ! bb.order().equals(NetworkOrder) || !bb.hasArray() )
                throw new RecordException("Duff buffer (byte order is not network order)") ;
            if ( bb.limit() == 0 )
                throw new RecordException("Duff buffer (zero length byte buffer)") ;
            int size = bb.limit() ;
            int slots = size/slotLen  ;
            if ( size%slotLen != 0 )
                throw new RecordException(format("Misalinged buffer: size=%d, keyLen=%d",size, slotLen)) ;
            if ( slots < num )
                throw new RecordException(format("Wrong size: slots=%d, len=%d", slots, num)) ;
        }
        this.bb = bb ;
        this.slotLen = slotLen ;
        this.numSlot = num ;
        this.maxSlot = bb.limit()/slotLen ;
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.record.RecordException

        if ( dst.numSlot < dstIdx-1 )
            // Allow copy to be just off the end of dst.
            throw new IllegalArgumentException(format("copy: Out of bounds: dstIdx=%d, dst size=%d", dstIdx, dst.numSlot)) ;
        if ( src.slotLen != dst.slotLen )
            throw new RecordException(format("copy: records of differnt sizes: %d, %d",src.slotLen, dst.slotLen)) ;
       
        // How do we set the numRec in dst? max(dstIdx+len, old count) 
        ByteBufferLib.bbcopy(src.bb, srcIdx, dst.bb, dstIdx, len, slotLen) ;
        dst.numSlot = Math.max(dstIdx+len, dst.numSlot) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.record.RecordException

        int vLen = record.getValue() == null ? 0 : record.getValue().length ;
        if ( recordFactory == null )
            recordFactory = new RecordFactory(kLen, vLen) ;
        int N = colMap.length() ;
        if ( kLen%N != 0 )
            throw new RecordException("Key length is not a multiple of the number of slots") ;
        int itemLen = kLen/N ;
        Record record2 = recordFactory.create() ;
        byte[] k = record2.getKey() ;
        for ( int i = 0 ; i < N ; i++ )
        {
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.record.RecordException

        int vLen = record.getValue() == null ? 0 : record.getValue().length ;
        if ( recordFactory == null )
            recordFactory = new RecordFactory(kLen, vLen) ;
        int N = colMap.length() ;
        if ( kLen%N != 0 )
            throw new RecordException("Key length is not a multiple of the number of slots") ;
        int itemLen = kLen/N ;
        Record record2 = recordFactory.create() ;
        byte[] k = record2.getKey() ;
        for ( int i = 0 ; i < N ; i++ )
        {
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.record.RecordException

       
        @Override
        public RecordBufferPage createFromBlock(Block block, BlockType blkType)
        {
            if ( blkType != BlockType.RECORD_BLOCK )
                throw new RecordException("Not RECORD_BLOCK: "+blkType) ;
            // Initially empty
            RecordBufferPage rb = RecordBufferPage.createBlank(block, factory) ;
            return rb ;
        }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.record.RecordException

        @Override
        public HashBucket createFromBlock(Block block, BlockType blkType)
        {
            // No need to additionally sync - this is a triggered by write operations so only one writer.
            if ( blkType != BlockType.RECORD_BLOCK )
                throw new RecordException("Not RECORD_BLOCK: "+blkType) ;
            // Initially empty
            HashBucket bucket = HashBucket.createBlank(block, factory) ; // NO_ID, -1, -1, block, factory, 0) ;
            return bucket ;
        }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.record.RecordException

    protected BufferBase(ByteBuffer bb, int slotLen, int num)
    {
        if ( CheckBuffer )
        {
            if ( ! bb.order().equals(NetworkOrder) || !bb.hasArray() )
                throw new RecordException("Duff buffer (byte order is not network order)") ;
            if ( bb.limit() == 0 )
                throw new RecordException("Duff buffer (zero length byte buffer)") ;
            int size = bb.limit() ;
            int slots = size/slotLen  ;
            if ( size%slotLen != 0 )
                throw new RecordException(format("Misalinged buffer: size=%d, keyLen=%d",size, slotLen)) ;
            if ( slots < num )
                throw new RecordException(format("Wrong size: slots=%d, len=%d", slots, num)) ;
        }
        this.bb = bb ;
        this.slotLen = slotLen ;
        this.numSlot = num ;
        this.maxSlot = bb.limit()/slotLen ;
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.record.RecordException

        if ( dst.numSlot < dstIdx-1 )
            // Allow copy to be just off the end of dst.
            throw new IllegalArgumentException(format("copy: Out of bounds: dstIdx=%d, dst size=%d", dstIdx, dst.numSlot)) ;
        if ( src.slotLen != dst.slotLen )
            throw new RecordException(format("copy: records of differnt sizes: %d, %d",src.slotLen, dst.slotLen)) ;
       
        // How do we set the numRec in dst? max(dstIdx+len, old count) 
        ByteBufferLib.bbcopy(src.bb, srcIdx, dst.bb, dstIdx, len, slotLen) ;
        dst.numSlot = Math.max(dstIdx+len, dst.numSlot) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.record.RecordException

        if ( CheckBuffer )
        {
            // It is a IntBuffer with associated ByteBuffer
            if ( iBuff.position() != 0 || bb.order() != SystemTDB.NetworkOrder )
                throw new RecordException("Duff pointer buffer") ;
        }
    }
View Full Code Here

Examples of org.apache.drill.exec.ref.exceptions.RecordException

public abstract class BaseMapValue extends BaseDataValue implements ContainerValue,
    Iterable<Map.Entry<CharSequence, DataValue>> {

  @Override
  public void addValue(PathSegment segment, DataValue v) {
    if(v == null) throw new RecordException("You attempted to add a null value to a map.", null);
    if (segment.isArray())
      throw new RecordException(
          "You're attempted to save something at a particular array location while the location of that setting was a Map.", null);

    CharSequence name = segment.getNameSegment().getPath();
    DataValue current = getByNameNoNulls(name);
    if (!segment.isLastPath() && current != DataValue.NULL_VALUE) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.