private Stream<CloudBlob> getBlobs(String archiveName) throws IOException { return AzureUtilities.getBlobs(getDirectory(archiveName)); }
private Stream<CloudBlob> getBlobs(String archiveName) throws IOException { return AzureUtilities.getBlobs(getDirectory(archiveName)); }
public static void deleteAllEntries(CloudBlobDirectory directory) throws IOException { Stream<CloudBlob> blobs = getBlobs(directory); blobs.forEach(b -> { try { b.deleteIfExists(); } catch (StorageException e) { log.error("Can't delete blob {}", b.getUri().getPath(), e); } }); }
public static void deleteAllEntries(CloudBlobDirectory directory) throws IOException { Stream<CloudBlob> blobs = getBlobs(directory); blobs.forEach(b -> { try { b.deleteIfExists(); } catch (StorageException e) { log.error("Can't delete blob {}", b.getUri().getPath(), e); } }); }
AzureSegmentArchiveReader(CloudBlobDirectory archiveDirectory, IOMonitor ioMonitor) throws IOException { this.archiveDirectory = archiveDirectory; this.ioMonitor = ioMonitor; long length = 0; for (CloudBlob blob : AzureUtilities.getBlobs(archiveDirectory).collect(Collectors.toList())) { Map<String, String> metadata = blob.getMetadata(); if (AzureBlobMetadata.isSegment(metadata)) { AzureSegmentArchiveEntry indexEntry = AzureBlobMetadata.toIndexEntry(metadata, (int) blob.getProperties().getLength()); index.put(new UUID(indexEntry.getMsb(), indexEntry.getLsb()), indexEntry); } length += blob.getProperties().getLength(); } this.length = length; }
AzureSegmentArchiveReader(CloudBlobDirectory archiveDirectory, IOMonitor ioMonitor) throws IOException { this.archiveDirectory = archiveDirectory; this.ioMonitor = ioMonitor; long length = 0; for (CloudBlob blob : AzureUtilities.getBlobs(archiveDirectory).collect(Collectors.toList())) { Map<String, String> metadata = blob.getMetadata(); if (AzureBlobMetadata.isSegment(metadata)) { AzureSegmentArchiveEntry indexEntry = AzureBlobMetadata.toIndexEntry(metadata, (int) blob.getProperties().getLength()); index.put(new UUID(indexEntry.getMsb(), indexEntry.getLsb()), indexEntry); } length += blob.getProperties().getLength(); } this.length = length; }