Package com.hp.hpl.jena.tdb.store.bulkloader2

Examples of com.hp.hpl.jena.tdb.store.bulkloader2.CmdNodeTableBuilder$NodeTableBuilder


  public static void main(String[] args) throws IOException {
    if ( ( args.length != 1 ) && ( args.length !=2 ) ) { print_usage(); }
    if ( ( args.length == 2 ) && (!"--dump".equals(args[0])) ) { print_usage(); }

    ProgressLogger monitor = new ProgressLogger(log, "Data (1/2)", BulkLoader.DataTickPoint,BulkLoader.superTick) ;
    log.info("Data (1/2)...");
    Location location = new Location(args.length==1?args[0]:args[1]);
    monitor.start();
    NodeTableRewriter.fixNodeTable2(location, log, monitor);
        long time = monitor.finish() ;

        long total = monitor.getTicks() ;
        float elapsedSecs = time/1000F ;
        float rate = (elapsedSecs!=0) ? total/elapsedSecs : 0 ;
        String str =  String.format("Total: %,d RDF nodes : %,.2f seconds : %,.2f nodes/sec [%s]", total, elapsedSecs, rate, nowAsString()) ;
        log.info(str);
   
View Full Code Here


        }
    }
  }

  public static void fixNodeTable2(Location location) throws IOException {
      ProgressLogger monitor = new ProgressLogger(log, "Data (1/2)", BulkLoader.DataTickPoint,BulkLoader.superTick) ;
      log.info("Data (1/2)...");
      monitor.start();
      NodeTableRewriter.fixNodeTable2(location, log, monitor);
      long time = monitor.finish() ;
        long total = monitor.getTicks() ;
        float elapsedSecs = time/1000F ;
        float rate = (elapsedSecs!=0) ? total/elapsedSecs : 0 ;
        String str =  String.format("Total: %,d RDF nodes : %,.2f seconds : %,.2f nodes/sec [%s]", total, elapsedSecs, rate, nowAsString()) ;
        log.info(str);
  }
View Full Code Here

    }
    objects.sync();
    objects.close();   
   
        // output
    final ProgressLogger monitor2 = new ProgressLogger(log, "Data (2/2)", BulkLoader.DataTickPoint,BulkLoader.superTick);
    log.info("Data (2/2)...");
    monitor2.start();

    final RecordFactory recordFactory = new RecordFactory(LenNodeHash, SizeOfNodeId) ;
    Transform<Pair<byte[],Long>, Record> transformPair2Record = new Transform<Pair<byte[],Long>, Record>() {
        @Override public Record convert(Pair<byte[],Long> pair) {
            monitor2.tick();
            return recordFactory.create(pair.getLeft(), Bytes.packLong(pair.getRight()));
        }
    };

    int order = BPlusTreeParams.calcOrder(SystemTDB.BlockSize, recordFactory) ;
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.tdb.store.bulkloader2.CmdNodeTableBuilder$NodeTableBuilder

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.