Package dovetaildb.bagindex

Examples of dovetaildb.bagindex.FsBlueSteelBagIndex


    try {
      BagIndexBridge b = new BagIndexBridge(tempDir);
      b.setBagIndexFactory(new BagEntryFactory() {
        public BagEntry makeBagEntry(String bagName) {
          //return new BagEntry(new TrivialBagIndex(), new DefaultTermEncoder(), 0);
          FsBlueSteelBagIndex index = new FsBlueSteelBagIndex(false);
          index.setHomedir(new File(tempDir, "bag_"+bagName).getAbsolutePath());
          //MemoryBlueSteelBagIndex index = new MemoryBlueSteelBagIndex();
          index.setTermTableDepth(3);
          return new BagEntry(index);
        }
      });
      ProcessTransactionMapper mapper = new ProcessTransactionMapper();
      mapper.addRevsForTxn(0, new HashMap<String,Long>());
View Full Code Here


      public DbService makeDbService(final File subDbServiceHome, DbService prevService) {
        BagIndexBridge b = new BagIndexBridge(subDbServiceHome);
        b.setBagIndexFactory(new BagEntryFactory() {
          public BagEntry makeBagEntry(String bagName) {
//            return new BagEntry(new MemoryBlueSteelBagIndex());
            FsBlueSteelBagIndex index = new FsBlueSteelBagIndex(false);
            index.setHomedir(new File(subDbServiceHome, "bag_"+bagName).getAbsolutePath());
            index.setTermTableDepth(3);
            return new BagEntry(index);
          }
        });
        ProcessTransactionMapper mapper = new ProcessTransactionMapper();
        mapper.addRevsForTxn(0, new HashMap<String,Long>());
View Full Code Here

      @Override
      public DbService makeDbService(final File subDbServiceHome, final DbService prevService) {
        BagIndexBridge b = new BagIndexBridge(subDbServiceHome);
        b.setBagIndexFactory(new BagEntryFactory() {
          public BagEntry makeBagEntry(String bagName) {
            BlueSteelBagIndex bsBagIndex = new FsBlueSteelBagIndex(sync);
            BagIndex bagIndex = bsBagIndex;
            bagIndex.setHomedir(new File(subDbServiceHome, "bag_"+bagName).getAbsolutePath());
            if (prevService != null) {
              BagIndex prevIndex = prevService.getBag(bagName);
              if (prevIndex != null) {
                Bytes[] table = PrefixCompressedBagIndex.determineCompressionTable(prevIndex, lengthToRowRatio);
                PrefixCompressedBagIndex pcBagIndex = new PrefixCompressedBagIndex(bsBagIndex, table);
                bagIndex = pcBagIndex;
                bsBagIndex.setTermTableDepth(pcBagIndex.getNumCompressedBytes());
              }
            }
            return new BagEntry(bagIndex);
          }
        });
View Full Code Here

//      } while (query.next());
    }
  }
 
  public FsTransactionMapper(File file, boolean sync) {
    map = new FsBlueSteelBagIndex(sync);
    File mapDir = new File(file, "txnmap");
    if (!mapDir.mkdir()) throw new RuntimeException("Cannot create transaction map");
    map.setHomedir(mapDir.getAbsolutePath());
  }
View Full Code Here

TOP

Related Classes of dovetaildb.bagindex.FsBlueSteelBagIndex

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.