Examples of decodeLong()


Examples of com.persistit.Key.decodeLong()

        Key key = new Key (null, 2047);
        customerKey.copyTo(key);
       
        key.indexTo(0);
        assertEquals (key.decodeInt(), ordinal("customer"));
        assertEquals (key.decodeLong(), 42);
    }
   
    @Test
    public void copyToKeyItem() {
        ValuesHKey key = createHKey("item");
View Full Code Here

Examples of com.persistit.Key.decodeLong()

        Key target = new Key (null, 2047);
        key.copyTo(target);
       
        target.indexTo(0);
        assertEquals(target.decodeInt(), ordinal("customer"));
        assertEquals(target.decodeLong(), 42);
        assertEquals(target.decodeInt(), ordinal("order"));
        assertEquals(target.decodeLong(), 51);
        assertEquals(target.decodeInt(), ordinal("item"));
    }
   
View Full Code Here

Examples of com.persistit.Key.decodeLong()

       
        target.indexTo(0);
        assertEquals(target.decodeInt(), ordinal("customer"));
        assertEquals(target.decodeLong(), 42);
        assertEquals(target.decodeInt(), ordinal("order"));
        assertEquals(target.decodeLong(), 51);
        assertEquals(target.decodeInt(), ordinal("item"));
    }
   
    @Test
    public void extendWithNull() {
View Full Code Here

Examples of com.salesforce.phoenix.schema.PDataType.PDataCodec.decodeLong()

                byte[] key = ByteUtil.copyKeyBytesIfNecessary(ptr);
                // No need to take into account column modifier, because ROUND
                // always forces the value to be in ascending order
                PDataCodec codec = getKeyRangeCodec(type);
                int offset = ByteUtil.isInclusive(op) ? 1 : 0;
                long value = codec.decodeLong(key, 0, null);
                byte[] nextKey = new byte[type.getByteSize()];
                switch (op) {
                case EQUAL:
                    // If the value isn't evenly divisible by the div amount, then it
                    // can't possibly be equal to any rounded value. For example, if you
View Full Code Here

Examples of org.apache.gora.accumulo.encoders.SignedBinaryEncoder.decodeLong()

   
    SignedBinaryEncoder encoder = new SignedBinaryEncoder();

    while (true) {
      byte[] enc = encoder.encodeLong(l);
      assertEquals(l, encoder.decodeLong(enc));
      Text current = new Text(enc);
      if (prev != null)
        assertTrue(prev.compareTo(current) < 0);
      prev = current;
      l++;
View Full Code Here

Examples of org.apache.gora.accumulo.encoders.SignedBinaryEncoder.decodeLong()

   
    SignedBinaryEncoder encoder = new SignedBinaryEncoder();

    while (true) {
      byte[] enc = encoder.encodeLong(l);
      Assert.assertEquals(l, encoder.decodeLong(enc));
      Text current = new Text(enc);
      if (prev != null)
        Assert.assertTrue(prev.compareTo(current) < 0);
      prev = current;
      l++;
View Full Code Here

Examples of org.apache.phoenix.schema.PDataType.PDataCodec.decodeLong()

                byte[] key = ByteUtil.copyKeyBytesIfNecessary(ptr);
                // No need to take into account SortOrder, because ROUND
                // always forces the value to be in ascending order
                PDataCodec codec = getKeyRangeCodec(type);
                int offset = ByteUtil.isInclusive(op) ? 1 : 0;
                long value = codec.decodeLong(key, 0, SortOrder.getDefault());
                byte[] nextKey = new byte[type.getByteSize()];
                switch (op) {
                case EQUAL:
                    // If the value isn't evenly divisible by the div amount, then it
                    // can't possibly be equal to any rounded value. For example, if you
View Full Code Here

Examples of org.apache.phoenix.schema.PDataType.PDataCodec.decodeLong()

                byte[] key = ByteUtil.copyKeyBytesIfNecessary(ptr);
                // No need to take into account column modifier, because ROUND
                // always forces the value to be in ascending order
                PDataCodec codec = type.getCodec();
                int offset = ByteUtil.isInclusive(op) ? 1 : 0;
                long value = codec.decodeLong(key, 0, null);
                byte[] nextKey = new byte[type.getByteSize()];
                switch (op) {
                case EQUAL:
                    // If the value isn't evenly divisible by the div amount, then it
                    // can't possibly be equal to any rounded value. For example, if you
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.