@Override public void downloadAttributes( OperationContext opContext) throws StorageException { getBlob().downloadAttributes(null, null, opContext); }
@Override public void downloadAttributes( OperationContext opContext) throws StorageException { getBlob().downloadAttributes(null, null, opContext); }
/** * Populates a blob's properties and metadata. * <p> * This method populates the blob's system properties and user-defined metadata. Before reading or modifying a * blob's properties or metadata, call this method or its overload to retrieve the latest values for the blob's * properties and metadata from the Microsoft Azure storage service. * * @throws StorageException * If a storage service error occurred. */ @DoesServiceRequest public final void downloadAttributes() throws StorageException { this.downloadAttributes(null /* accessCondition */, null /* options */, null /* opContext */); }
/** * Populates a blob's properties and metadata. * <p> * This method populates the blob's system properties and user-defined metadata. Before reading or modifying a * blob's properties or metadata, call this method or its overload to retrieve the latest values for the blob's * properties and metadata from the Microsoft Azure storage service. * * @throws StorageException * If a storage service error occurred. */ @DoesServiceRequest public final void downloadAttributes() throws StorageException { this.downloadAttributes(null /* accessCondition */, null /* options */, null /* opContext */); }
private static boolean waitForCopy(CloudBlob blob) throws StorageException, InterruptedException { boolean continueLoop = true; CopyStatus status = CopyStatus.PENDING; while (continueLoop) { blob.downloadAttributes(); status = blob.getCopyState().getStatus(); continueLoop = status == CopyStatus.PENDING; // Sleep if retry is needed if (continueLoop) { Thread.sleep(500); } } return status == CopyStatus.SUCCESS; }
/** * Sets up the original non page aligned size of the file from the PageBlob * from the meta-data. * * @throws StorageException */ private void setOriginalNonPageAlignedStreamSize() throws StorageException { try { pageBlob.downloadAttributes(); String size = pageBlob.getMetadata().get(ORIGINAL_SIZE_KEY); try { totalsize = Long.parseLong(size); sizeRemaining = totalsize; } catch (Exception e) { logger.error("Size meta-data missing."); } } catch (StorageException e) { this.lastError = new AzureIOException("Unable to download attributes from Page Blob.", e); throw e; } }
public String getNextName(String pp, long id) throws IOException { String pfx = pp + "/"; if (di == null) di = container.listBlobs(pp + "/").iterator(); while (di.hasNext()) { CloudBlob bi = (CloudBlob) di.next(); try { bi.downloadAttributes(); HashMap<String, String> md = bi.getMetadata(); boolean encrypt = Boolean.parseBoolean(md.get("encrypt")); String fname = EncyptUtils.decString(bi.getName().substring(pfx.length()), encrypt); return fname; /* * this.downloadFile(fname, new File(to.getPath() + File.separator + fname), * pp); */ } catch (Exception e) { throw new IOException(e); } } di = null; return null; }
while (it.hasNext()) { CloudBlob bi = (CloudBlob) it.next(); bi.downloadAttributes(); HashMap<String, String> md = bi.getMetadata(); SDFSLogger.getLog().debug("keysize=" + md.size());
try { CloudBlob bi = (CloudBlob) container.getBlockBlobReference(key); bi.downloadAttributes(); HashMap<String, String> md = bi.getMetadata(); byte[] nm = new byte[(int) bi.getProperties().getLength()]; StringTokenizer sht = new StringTokenizer(st, ","); CloudBlob nbi = (CloudBlob) container.getBlockBlobReference(this.getClaimName(sid)); nbi.downloadAttributes(); md = nbi.getMetadata(); boolean changed = false;
public static void waitForCopy(CloudBlob blob) throws StorageException, InterruptedException { boolean copyInProgress = true; while (copyInProgress) { blob.downloadAttributes(); copyInProgress = (blob.getCopyState().getStatus() == CopyStatus.PENDING) || (blob.getCopyState().getStatus() == CopyStatus.ABORTED); // One second sleep if retry is needed if (copyInProgress) { Thread.sleep(1000); } } }
.getBlobReferenceFromServer(containerService.getKey(file)); blob.downloadAttributes();
.getBlobReferenceFromServer(containerService.getKey(file)); blob.downloadAttributes(null, null, context); final Map<String, String> metadata = new HashMap<String, String>(blob.getMetadata()); final BlobProperties properties = blob.getProperties();
@NotNull private static BlobFile reloadBlob(@NotNull CloudBlob blob, @NotNull String containerName, @NotNull BlobFile blobFile) throws StorageException, URISyntaxException { blob.downloadAttributes();
blob.downloadAttributes(null, null, sendingRequestEventContext); assertEquals(4, callList.size());
.getBlobReferenceFromServer(containerService.getKey(file)); final BlobRequestOptions options = new BlobRequestOptions(); blob.downloadAttributes(AccessCondition.generateEmptyCondition(), options, context); final BlobProperties properties = blob.getProperties(); final PathAttributes attributes = new PathAttributes();
blobSnapshot.downloadAttributes();
blobSnapshot.downloadAttributes();
parentBlob.downloadAttributes(accessCondition, this.options, this.opContext);
parentBlob.downloadAttributes(accessCondition, this.options, this.opContext);
assertFalse(source.getProperties().getEtag().equals(destination.getProperties().getEtag())); source.downloadAttributes(); FileProperties prop1 = destination.getProperties(); BlobProperties prop2 = source.getProperties();