@Test public void testIOErrorAndBlobNotFoundInOriginDc() throws Exception { assumeTrue(operationTrackerType.equals(AdaptiveOperationTracker.class.getSimpleName())); correlationIdToGetOperation.clear(); String newLocal = "DC1"; String oldLocal = localDcName; Properties props = getNonBlockingRouterProperties(true); props.setProperty("router.datacenter.name", newLocal); routerConfig = new RouterConfig(new VerifiableProperties(props)); for (MockServer server : mockServerLayout.getMockServers()) { if (server.getDataCenter().equals(oldLocal)) { server.setServerErrorForAllRequests(ServerErrorCode.Blob_Not_Found); } else { server.setServerErrorForAllRequests(ServerErrorCode.IO_Error); } } NonBlockingRouter.currentOperationsCount.incrementAndGet(); GetBlobInfoOperation op = new GetBlobInfoOperation(routerConfig, routerMetrics, mockClusterMap, responseHandler, blobId, options, null, routerCallback, kms, cryptoService, cryptoJobHandler, time, false); requestRegistrationCallback.setRequestsToSend(new ArrayList<>()); AdaptiveOperationTracker tracker = (AdaptiveOperationTracker) op.getOperationTrackerInUse(); completeOp(op); RouterException routerException = (RouterException) op.getOperationException(); Assert.assertEquals(RouterErrorCode.BlobDoesNotExist, routerException.getErrorCode()); Assert.assertEquals("The number of data points in remote colo latency histogram is not expected", 2, tracker.getLatencyHistogram(localReplica).getCount()); props = getNonBlockingRouterProperties(true); props.setProperty("router.datacenter.name", oldLocal); routerConfig = new RouterConfig(new VerifiableProperties(props)); }
OperationTracker getOperationTrackerInUse() { return operationTracker; }
GetBlobInfoOperation extends GetOperation { OperationTracker getOperationTrackerInUse() { return operationTracker; } }
GetBlobInfoOperation extends GetOperation { OperationTracker getOperationTrackerInUse() { return operationTracker; } GetBlobInfoOperation(RouterConfig routerConfig, NonBlockingRouterMetrics routerMetrics, ClusterMap clusterMap,
      ResponseHandler responseHandler, BlobId blobId, GetBlobOptionsInternal options,
      Callback<GetBlobResultInternal> callback, RouterCallback routerCallback, KeyManagementService kms,
      CryptoService cryptoService, CryptoJobHandler cryptoJobHandler, Time time, boolean isEncrypted); }
GetBlobInfoOperation extends GetOperation { OperationTracker getOperationTrackerInUse() { return operationTracker; } GetBlobInfoOperation(RouterConfig routerConfig, NonBlockingRouterMetrics routerMetrics, ClusterMap clusterMap,
      ResponseHandler responseHandler, BlobId blobId, GetBlobOptionsInternal options,
      Callback<GetBlobResultInternal> callback, RouterCallback routerCallback, KeyManagementService kms,
      CryptoService cryptoService, CryptoJobHandler cryptoJobHandler, Time time, boolean isEncrypted);  }
GetBlobInfoOperation extends GetOperation { OperationTracker getOperationTrackerInUse() { return operationTracker; } GetBlobInfoOperation(RouterConfig routerConfig, NonBlockingRouterMetrics routerMetrics, ClusterMap clusterMap,
      ResponseHandler responseHandler, BlobId blobId, GetBlobOptionsInternal options,
      Callback<GetBlobResultInternal> callback, RouterCallback routerCallback, KeyManagementService kms,
      CryptoService cryptoService, CryptoJobHandler cryptoJobHandler, Time time, boolean isEncrypted);   }