@Test public void testRangeRequestStitchDifferentSizedBlobsSegments() throws Exception { if (metadataContentVersion > MessageFormatRecord.Metadata_Content_Version_V2) { router = getNonBlockingRouter(); String blobId = createStitchBlob(LARGE_BLOB_SIZE); for (int i = 0; i < NUM_STITCHED_CHUNKS; i++) { int chunkSize = (int) chunkInfos.get(i).getChunkSizeInBytes(); this.options = new GetBlobOptionsBuilder().blobSegment(i).range(ByteRanges.fromOffsetRange(0, chunkSize - 1)).build(); getBlobAndCompareContent(blobId, chunkSize); this.options = new GetBlobOptionsBuilder().blobSegment(i).range(ByteRanges.fromOffsetRange(0, chunkSize)).build(); getBlobAndCompareContent(blobId, chunkSize); this.options = new GetBlobOptionsBuilder().blobSegment(i).range(ByteRanges.fromOffsetRange(0, chunkSize + 100)).build(); getBlobAndCompareContent(blobId, chunkSize); this.options = new GetBlobOptionsBuilder().blobSegment(i).range(ByteRanges.fromLastNBytes(100)).build(); getBlobAndCompareContent(blobId, chunkSize); int end = new Random().nextInt(chunkSize / 2) + chunkSize / 2; this.options = new GetBlobOptionsBuilder().blobSegment(i).range(ByteRanges.fromOffsetRange(chunkSize / 2, end)).build(); getBlobAndCompareContent(blobId, chunkSize); this.options = new GetBlobOptionsBuilder().blobSegment(i).range(ByteRanges.fromOffsetRange(0, 0)).build(); getBlobAndCompareContent(blobId, chunkSize); } this.options = new GetBlobOptionsBuilder().operationType(GetBlobOptions.OperationType.BlobInfo).build(); getBlobAndCompareContent(blobId, -1); router.close(); } else { router = getNonBlockingRouter(); router.close(); } }
void close() { for (GetOperation op : getOperations) { removeAndAbort(op, new RouterException("Aborted operation because Router is closed", RouterErrorCode.RouterClosed)); } }
GetManager { void close() { for (GetOperation op : getOperations) { removeAndAbort(op, new RouterException("Aborted operation because Router is closed", RouterErrorCode.RouterClosed)); } } }
GetManager { void close() { for (GetOperation op : getOperations) { removeAndAbort(op, new RouterException("Aborted operation because Router is closed", RouterErrorCode.RouterClosed)); } } GetManager(ClusterMap clusterMap, ResponseHandler responseHandler, RouterConfig routerConfig,
      NonBlockingRouterMetrics routerMetrics, RouterCallback routerCallback, KeyManagementService kms,
      CryptoService cryptoService, CryptoJobHandler cryptoJobHandler, Time time); }
GetManager { void close() { for (GetOperation op : getOperations) { removeAndAbort(op, new RouterException("Aborted operation because Router is closed", RouterErrorCode.RouterClosed)); } } GetManager(ClusterMap clusterMap, ResponseHandler responseHandler, RouterConfig routerConfig,
      NonBlockingRouterMetrics routerMetrics, RouterCallback routerCallback, KeyManagementService kms,
      CryptoService cryptoService, CryptoJobHandler cryptoJobHandler, Time time);  }
GetManager { void close() { for (GetOperation op : getOperations) { removeAndAbort(op, new RouterException("Aborted operation because Router is closed", RouterErrorCode.RouterClosed)); } } GetManager(ClusterMap clusterMap, ResponseHandler responseHandler, RouterConfig routerConfig,
      NonBlockingRouterMetrics routerMetrics, RouterCallback routerCallback, KeyManagementService kms,
      CryptoService cryptoService, CryptoJobHandler cryptoJobHandler, Time time);   }