Package org.jclouds.blobstore

Examples of org.jclouds.blobstore.BlobStoreContextFactory


        return result;
    }


    public void write(String bucket, String blobName, Object object) {
        context = new BlobStoreContextFactory().createContext(provider, accessKeyId, secretKey);
        if (context != null) {
            BlobStore blobStore = context.getBlobStore();
            Blob blob = blobStore.blobBuilder(blobName).build();

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here


      if (threadcount != null)
         overrides.setProperty("jclouds.mpu.parallel.degree", threadcount); // without setting,
      // default is 4 threads
      overrides.setProperty(provider + ".identity", identity);
      overrides.setProperty(provider + ".credential", credential);
      BlobStoreContext context = new BlobStoreContextFactory().createContext(provider, MODULES, overrides);

      try {
         long start = System.currentTimeMillis();
         // Create Container
         AsyncBlobStore blobStore = context.getAsyncBlobStore(); // it can be changed to sync
View Full Code Here

      if (threadcount != null)
         overrides.setProperty("jclouds.mpu.parallel.degree", threadcount); // without setting,
      // default is 4 threads
      overrides.setProperty(provider + ".identity", identity);
      overrides.setProperty(provider + ".credential", credential);
      BlobStoreContext context = new BlobStoreContextFactory().createContext(provider, HDFS_MODULES, overrides);

      try {
         long start = System.currentTimeMillis();
         Configuration conf = getConf();
         if (conf == null) {
View Full Code Here

    }

    public Object read(String bucket, String blobName) {
        Object result = null;
        ObjectInputStream ois = null;
        context = new BlobStoreContextFactory().createContext(provider, accessKeyId, secretKey);
        if (context != null) {
            BlobStore blobStore = context.getBlobStore();
            blobStore.createContainerInLocation(null, bucket);

            InputStream is = blobStore.getBlob(bucket, blobName).getPayload().getInput();
View Full Code Here

        return result;
    }


    public void write(String bucket, String blobName, Object object) {
        context = new BlobStoreContextFactory().createContext(provider, accessKeyId, secretKey);
        if (context != null) {
            BlobStore blobStore = context.getBlobStore();
            Blob blob = blobStore.blobBuilder(blobName).build();

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

    /**
     * Strategy to perform any pre setup, before {@link org.apache.camel.CamelContext} is created
     */
    @Override
    protected void doPreSetup() throws Exception {
        BlobStoreContextFactory contextFactory = new BlobStoreContextFactory();
        BlobStoreContext blobStoreContext = contextFactory.createContext("transient", "identity", "credential");
        BlobStore blobStore = blobStoreContext.getBlobStore();
        blobStore.createContainerInLocation(null, TEST_CONTAINER);
        blobStore.clearContainer(TEST_CONTAINER);
    }
View Full Code Here

    /**
     * Strategy to perform any pre setup, before {@link org.apache.camel.CamelContext} is created
     */
    @Override
    protected void doPreSetup() throws Exception {
        BlobStoreContextFactory contextFactory = new BlobStoreContextFactory();
        BlobStoreContext blobStoreContext = contextFactory.createContext("transient", "identity", "credential");
        BlobStore blobStore = blobStoreContext.getBlobStore();
        blobStore.createContainerInLocation(null, TEST_CONTAINER);
        blobStore.clearContainer(TEST_CONTAINER);
    }
View Full Code Here

TOP

Related Classes of org.jclouds.blobstore.BlobStoreContextFactory

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.