Package com.splout.db.common

Examples of com.splout.db.common.ThriftWriter


          public void run() {
            // I always succeed.
            try {
              // Create the necessary disk structures so this node's partition is promoted to Hazelcast
              getLocalStorageFolder("t1", 0, version).mkdirs();
              ThriftWriter writer = new ThriftWriter(getLocalMetadataFile("t1", 0, version));
              PartitionMetadata metadata = new PartitionMetadata();
              // we need to set expected replication factor, otherwise replica balancing will not trigger for this test
              metadata.setNReplicas(2);
              writer.write(metadata);
              writer.close();
              new File(getLocalStorageFolder("t1", 0, version), "0.db").createNewFile();
              // promote info to Hazelcast
              getDnodesRegistry().changeInfo(new DNodeInfo(config));
            } catch(IOException e) {
              e.printStackTrace();
View Full Code Here


    File metadataFile = getLocalMetadataFile(action.getTablespace(),
        action.getPartition(), version);
    if(!metadataFile.getParentFile().exists()) {
      metadataFile.getParentFile().mkdirs();
    }
    ThriftWriter writer = new ThriftWriter(metadataFile);
    writer.write(action.getMetadata());
    writer.close();
    // 2- Call the fetcher for fetching
    File fetchedContent = fetcher.fetch(action.getDataURI(), reporter);
    // If we reach this point then the fetch has been OK
    File dbFolder = getLocalStorageFolder(action.getTablespace(), action.getPartition(),
        version);
View Full Code Here

TOP

Related Classes of com.splout.db.common.ThriftWriter

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.