Skip to content

Commit

Permalink
fixes compilation errors in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmarsuhail committed May 19, 2022
1 parent 16d5403 commit b75b72b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.nio.file.Paths;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;

Expand Down Expand Up @@ -56,6 +57,7 @@
import org.apache.hadoop.fs.s3a.statistics.impl.EmptyS3AStatisticsContext;
import org.apache.hadoop.io.retry.RetryPolicies;
import org.apache.hadoop.io.retry.RetryPolicy;
import org.apache.hadoop.util.functional.CallableRaisingIOE;

/**
* Provides 'fake' implementations of S3InputStream variants.
Expand Down Expand Up @@ -128,10 +130,6 @@ public static S3AReadOpContext createReadContext(
statistics,
statisticsContext,
fileStatus,
S3AInputPolicy.Random, // seekPolicy
CHANGE_POLICY,
1L, // readAheadRange
NoopSpan.INSTANCE, // auditSpan
futurePool,
prefetchBlockSize,
prefetchBlockCount);
Expand Down Expand Up @@ -181,6 +179,11 @@ public S3Object getObject(GetObjectRequest request) {
return object;
}

@Override
public <T> CompletableFuture<T> submit(CallableRaisingIOE<T> operation) {
return null;
}

@Override
public GetObjectRequest newGetRequest(String key) {
return new GetObjectRequest(bucket, key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.CompletableFuture;

import com.amazonaws.services.s3.model.GetObjectRequest;
import com.amazonaws.services.s3.model.S3Object;

import org.apache.hadoop.fs.common.Validate;
import org.apache.hadoop.fs.s3a.S3AInputStream;
import org.apache.hadoop.fs.s3a.statistics.impl.EmptyS3AStatisticsContext;
import org.apache.hadoop.util.functional.CallableRaisingIOE;

/**
* A mock s3 file with some fault injection.
Expand Down Expand Up @@ -92,6 +94,11 @@ public S3Object getObject(GetObjectRequest request) {
return null;
}

@Override
public <T> CompletableFuture<T> submit(CallableRaisingIOE<T> operation) {
return null;
}

@Override
public GetObjectRequest newGetRequest(String key) {
return new GetObjectRequest(bucketName, key);
Expand Down

0 comments on commit b75b72b

Please sign in to comment.