Package elephantdb.persistence

Examples of elephantdb.persistence.Coordinator


     * @param remotePath
     * @return
     * @throws java.io.IOException
     */
    public String downloadRemoteShard(String id, String remotePath) throws IOException {
        Coordinator coord = spec.getCoordinator();
        String returnDir = localTmpDir(id);
        if (remotePath == null || !fs.exists(new Path(remotePath))) {
            coord.createPersistence(returnDir, spec.getPersistenceOptions());
            if(reporter != null)
                reporter.progress();
        } else {
            fs.copyToLocalFile(new Path(remotePath), new Path(returnDir));
            if(reporter != null)
View Full Code Here


            if (lps.containsKey(shardIdx)) {
                lp = lps.get(shardIdx);
            } else {
                String localShard = localManager.downloadRemoteShard("" + shardIdx, null);

                Coordinator fact = args.spec.getCoordinator();
                lp = fact.openPersistenceForAppend(localShard, args.spec.getPersistenceOptions());

                lps.put(shardIdx, lp);
                progress();
            }
            return lp;
View Full Code Here

TOP

Related Classes of elephantdb.persistence.Coordinator

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.