Examples of BadKey


Examples of voldemort.utils.ConsistencyFix.BadKey

        badKeyWriterService.submit(badKeyWriter);

        // Enqueue stuff for bad key writer to write
        try {
            for(int i = 0; i < 100; ++i) {
                BadKey badKey = new BadKey(Integer.toHexString(i), Integer.toHexString(i) + "\n");

                bq.put(new BadKeyStatus(badKey, ConsistencyFix.Status.REPAIR_EXCEPTION));
            }
            // Poison bad key writer
            bq.put(new BadKeyStatus());
View Full Code Here

Examples of voldemort.utils.ConsistencyFix.BadKey

        badKeyReaderHelper(true);
    }

    @Test
    public void testBadKeyResult() {
        BadKey badKey = new BadKey("0101", "0101\n");
        ConsistencyFix.BadKeyStatus bkr1 = new BadKeyStatus(badKey, ConsistencyFix.Status.SUCCESS);
        assertFalse(bkr1.isPoison());
        assertEquals(bkr1.getBadKey().getKeyInHexFormat(), "0101");
        assertEquals(bkr1.getBadKey().getReaderInput(), "0101\n");
        assertEquals(bkr1.getStatus(), ConsistencyFix.Status.SUCCESS);
View Full Code Here

Examples of voldemort.utils.ConsistencyFix.BadKey

    public void testRepair(int putNodes[], boolean orphan) {
        byte[] bKey = TestUtils.randomBytes(10);
        String hexKey = ByteUtils.toHexString(bKey);
        ByteArray baKey = new ByteArray(bKey);

        BadKey badKey;
        QueryKeyResult queryKeyResult;
        if(!orphan) {
            badKey = new BadKey(hexKey, hexKey + "\n");
            queryKeyResult = null;
        } else {
            StringBuilder orphanInput = new StringBuilder();
            orphanInput.append(hexKey + "," + "1\n");
            List<Versioned<byte[]>> values = new ArrayList<Versioned<byte[]>>(0);
            int arbitraryNodeId = 2;
            Versioned<byte[]> versioned = TestUtils.getVersioned(TestUtils.randomBytes(25),
                                                                 arbitraryNodeId);
            orphanInput.append(ByteUtils.toHexString(versioned.getValue()));
            orphanInput.append("," + versioned.toString() + "\n");
            values.add(versioned);

            badKey = new BadKey(hexKey, orphanInput.toString());
            queryKeyResult = new QueryKeyResult(baKey, values);
        }

        Versioned<byte[]> value = TestUtils.getVersioned(TestUtils.randomBytes(25), 0);
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.