Examples of AsyncOperationStatus


Examples of voldemort.server.protocol.admin.AsyncOperationStatus

    public void testNativeBackup() throws Exception {
        File backupToDir = File.createTempFile("bdb-storage", "bkp");
        backupToDir.delete();
        backupToDir.mkdir();
        try {
            store.nativeBackup(backupToDir, false, false, new AsyncOperationStatus(0, "dummy"));
            // Check that one file was copied
            assertArrayEquals(backupToDir.list(), new String[] { "00000000.jdb" });
            long backupFileModified = backupToDir.listFiles()[0].lastModified();

            store.nativeBackup(backupToDir, false, false, new AsyncOperationStatus(0, "dummy"));
            // Check that there are now two files, and the first one hasn't
            // changed
            String[] backedUp = backupToDir.list();
            Arrays.sort(backedUp);
            assertArrayEquals(backedUp, new String[] { "00000000.jdb", "00000001.jdb" });
View Full Code Here

Examples of voldemort.server.protocol.admin.AsyncOperationStatus

                                                                                              VAdminProto.AsyncOperationStatusResponse.newBuilder());

            if(response.hasError())
                helperOps.throwException(response.getError());

            AsyncOperationStatus status = new AsyncOperationStatus(response.getRequestId(),
                                                                   response.getDescription());
            status.setStatus(response.getStatus());
            status.setComplete(response.getComplete());

            return status;
        }
View Full Code Here

Examples of voldemort.server.protocol.admin.AsyncOperationStatus

            String description = null;
            String oldStatus = "";
            while(System.currentTimeMillis() < waitUntil) {
                try {
                    AsyncOperationStatus status = getAsyncRequestStatus(nodeId, requestId);
                    if(!status.getStatus().equalsIgnoreCase(oldStatus)) {
                        logger.info("Status from node " + nodeId + " (" + status.getDescription()
                                    + ") - " + status.getStatus());
                    }
                    oldStatus = status.getStatus();

                    if(higherStatus != null) {
                        higherStatus.setStatus("Status from node " + nodeId + " ("
                                               + status.getDescription() + ") - "
                                               + status.getStatus());
                    }
                    description = status.getDescription();
                    if(status.hasException())
                        throw status.getException();

                    if(status.isComplete())
                        return status.getStatus();

                    if(delay < adminClientConfig.getMaxBackoffDelayMs())
                        delay <<= 1;

                    try {
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.