Package org.voltdb.utils

Examples of org.voltdb.utils.VoltFile.listFiles()


    public static List<JSONObject> retrieveDigests(String path,
            String nonce, VoltLogger logger) throws Exception {
        VoltFile directoryWithDigest = new VoltFile(path);
        ArrayList<JSONObject> digests = new ArrayList<JSONObject>();
        if (directoryWithDigest.listFiles() == null) {
            return digests;
        }
        for (File f : directoryWithDigest.listFiles()) {
            if ( f.getName().equals(nonce + ".digest") || //old style digest name
                    (f.getName().startsWith(nonce + "-host_") && f.getName().endsWith(".digest"))) {//new style
View Full Code Here


        VoltFile directoryWithDigest = new VoltFile(path);
        ArrayList<JSONObject> digests = new ArrayList<JSONObject>();
        if (directoryWithDigest.listFiles() == null) {
            return digests;
        }
        for (File f : directoryWithDigest.listFiles()) {
            if ( f.getName().equals(nonce + ".digest") || //old style digest name
                    (f.getName().startsWith(nonce + "-host_") && f.getName().endsWith(".digest"))) {//new style
                JSONObject retval = CRCCheck(f, logger);
                if (retval != null) {
                    digests.add(retval);
View Full Code Here

        int maxConfigs,
        VoltLogger logger) throws IOException
   {
        VoltFile directory = new VoltFile(path);
        ArrayList<ByteBuffer> configs = new ArrayList<ByteBuffer>();
        if (directory.listFiles() == null) {
            return configs;
        }
        for (File file : directory.listFiles()) {
            if (file.getName().startsWith(nonce + "-host_") && file.getName().endsWith(HASH_EXTENSION)) {
                byte[] rawData = new byte[(int) file.length()];
View Full Code Here

        VoltFile directory = new VoltFile(path);
        ArrayList<ByteBuffer> configs = new ArrayList<ByteBuffer>();
        if (directory.listFiles() == null) {
            return configs;
        }
        for (File file : directory.listFiles()) {
            if (file.getName().startsWith(nonce + "-host_") && file.getName().endsWith(HASH_EXTENSION)) {
                byte[] rawData = new byte[(int) file.length()];
                FileInputStream fis = null;
                DataInputStream dis = null;
                try {
View Full Code Here

                return file.startsWith(fileNonce) && file.endsWith(".vpt");
            }
        };

        File save_dir = new VoltFile(filePath);
        File[] save_files = save_dir.listFiles(has_nonce);
        return save_files;
    }

    public static String didSnapshotRequestFailWithErr(VoltTable results[]) {
        if (results.length < 1) return "HAD NO RESULT TABLES";
View Full Code Here

                boolean status = dir.mkdirs();
                assert (status);
            }

            File dirFile = new VoltFile(testoutputdir);
            if (dirFile.listFiles() != null) {
                for (File f : dirFile.listFiles()) {
                    if (f.getName().startsWith(getName() + "-" + hostId)) {
                        f.delete();
                    }
                }
View Full Code Here

                assert (status);
            }

            File dirFile = new VoltFile(testoutputdir);
            if (dirFile.listFiles() != null) {
                for (File f : dirFile.listFiles()) {
                    if (f.getName().startsWith(getName() + "-" + hostId)) {
                        f.delete();
                    }
                }
            }
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.