Package net.yacy.kelondro.blob

Examples of net.yacy.kelondro.blob.MapDataMining


        if (!parentDir.exists()) {
      if(!parentDir.mkdirs())
        Log.logWarning("yacySeedDB", "could not create directories for "+ seedDBFile.getParent());
    }
        try {
            return new MapDataMining(seedDBFile, Word.commonHashLength, Base64Order.enhancedCoder, 1024 * 512, 500, sortFields, longaccFields, doubleaccFields, this);
        } catch (final Exception e) {
            // try again
            FileUtils.deletedelete(seedDBFile);
            try {
                return new MapDataMining(seedDBFile, Word.commonHashLength, Base64Order.enhancedCoder, 1024 * 512, 500, sortFields, longaccFields, doubleaccFields, this);
            } catch (IOException e1) {
                Log.logException(e1);
                System.exit(-1);
                return null;
            }
View Full Code Here


            final File yacyDBPath = new File(homePath, "DATA/INDEX/freeworld/NETWORK");

            final String[] dbFileNames = {"seed.new.db","seed.old.db","seed.pot.db"};
            for (final String dbFileName : dbFileNames) {
                final File dbFile = new File(yacyDBPath,dbFileName);
                final MapDataMining db = new MapDataMining(dbFile, Word.commonHashLength, Base64Order.enhancedCoder, 1024 * 512, 500, yacySeedDB.sortFields, yacySeedDB.longaccFields, yacySeedDB.doubleaccFields, null);

                MapDataMining.mapIterator it;
                it = db.maps(true, false);
                while (it.hasNext()) {
                    final Map<String, String> dna = it.next();
                    String peerHash = dna.get("key");
                    if (peerHash.length() < Word.commonHashLength) {
                        final String peerName = dna.get("Name");
                        final String peerIP = dna.get("IP");
                        final String peerPort = dna.get("Port");

                        while (peerHash.length() < Word.commonHashLength) { peerHash = peerHash + "_"; }
                        System.err.println("Invalid Peer-Hash found in '" + dbFileName + "': " + peerName + ":" +  peerHash + ", http://" + peerIP + ":" + peerPort);
                    }
                }
                db.close();
            }
        } catch (final Exception e) {
            Log.logException(e);
        }
    }
View Full Code Here

            final File yacyDBPath = new File(homePath, "DATA/INDEX/freeworld/NETWORK");

            final String[] dbFileNames = {"seed.new.db","seed.old.db","seed.pot.db"};
            for (final String dbFileName : dbFileNames) {
                final File dbFile = new File(yacyDBPath,dbFileName);
                final MapDataMining db = new MapDataMining(dbFile, Word.commonHashLength, Base64Order.enhancedCoder, 1024 * 512, 500, SeedDB.sortFields, SeedDB.longaccFields, SeedDB.doubleaccFields, null);

                MapDataMining.mapIterator it;
                it = db.maps(true, false);
                while (it.hasNext()) {
                    final Map<String, String> dna = it.next();
                    String peerHash = dna.get("key");
                    if (peerHash.length() < Word.commonHashLength) {
                        final String peerName = dna.get("Name");
                        final String peerIP = dna.get("IP");
                        final String peerPort = dna.get("Port");

                        while (peerHash.length() < Word.commonHashLength) { peerHash = peerHash + "_"; }
                        System.err.println("Invalid Peer-Hash found in '" + dbFileName + "': " + peerName + ":" +  peerHash + ", http://" + peerIP + ":" + peerPort);
                    }
                }
                db.close();
            }
        } catch (final Exception e) {
            Log.logException(e);
        }
    }
View Full Code Here

        if (!parentDir.exists()) {
      if(!parentDir.mkdirs())
        Log.logWarning("yacySeedDB", "could not create directories for "+ seedDBFile.getParent());
    }
        try {
            return new MapDataMining(seedDBFile, Word.commonHashLength, Base64Order.enhancedCoder, 1024 * 512, 500, sortFields, longaccFields, doubleaccFields, this);
        } catch (final Exception e) {
            // try again
            FileUtils.deletedelete(seedDBFile);
            try {
                return new MapDataMining(seedDBFile, Word.commonHashLength, Base64Order.enhancedCoder, 1024 * 512, 500, sortFields, longaccFields, doubleaccFields, this);
            } catch (final IOException e1) {
                Log.logException(e1);
                System.exit(-1);
                return null;
            }
View Full Code Here

TOP

Related Classes of net.yacy.kelondro.blob.MapDataMining

Copyright © 2018 www.massapicom. 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.