File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/read Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 2727import java .nio .file .Paths ;
2828import java .util .Map ;
2929import java .util .Random ;
30+ import java .util .concurrent .CompletableFuture ;
3031import java .util .concurrent .ConcurrentHashMap ;
3132import java .util .concurrent .TimeUnit ;
3233
5657import org .apache .hadoop .fs .s3a .statistics .impl .EmptyS3AStatisticsContext ;
5758import org .apache .hadoop .io .retry .RetryPolicies ;
5859import org .apache .hadoop .io .retry .RetryPolicy ;
60+ import org .apache .hadoop .util .functional .CallableRaisingIOE ;
5961
6062/**
6163 * Provides 'fake' implementations of S3InputStream variants.
@@ -128,10 +130,6 @@ public static S3AReadOpContext createReadContext(
128130 statistics ,
129131 statisticsContext ,
130132 fileStatus ,
131- S3AInputPolicy .Random , // seekPolicy
132- CHANGE_POLICY ,
133- 1L , // readAheadRange
134- NoopSpan .INSTANCE , // auditSpan
135133 futurePool ,
136134 prefetchBlockSize ,
137135 prefetchBlockCount );
@@ -181,6 +179,11 @@ public S3Object getObject(GetObjectRequest request) {
181179 return object ;
182180 }
183181
182+ @ Override
183+ public <T > CompletableFuture <T > submit (CallableRaisingIOE <T > operation ) {
184+ return null ;
185+ }
186+
184187 @ Override
185188 public GetObjectRequest newGetRequest (String key ) {
186189 return new GetObjectRequest (bucket , key );
Original file line number Diff line number Diff line change 2222import java .io .ByteArrayInputStream ;
2323import java .io .IOException ;
2424import java .io .InputStream ;
25+ import java .util .concurrent .CompletableFuture ;
2526
2627import com .amazonaws .services .s3 .model .GetObjectRequest ;
2728import com .amazonaws .services .s3 .model .S3Object ;
2829
2930import org .apache .hadoop .fs .common .Validate ;
3031import org .apache .hadoop .fs .s3a .S3AInputStream ;
3132import org .apache .hadoop .fs .s3a .statistics .impl .EmptyS3AStatisticsContext ;
33+ import org .apache .hadoop .util .functional .CallableRaisingIOE ;
3234
3335/**
3436 * A mock s3 file with some fault injection.
@@ -92,6 +94,11 @@ public S3Object getObject(GetObjectRequest request) {
9294 return null ;
9395 }
9496
97+ @ Override
98+ public <T > CompletableFuture <T > submit (CallableRaisingIOE <T > operation ) {
99+ return null ;
100+ }
101+
95102 @ Override
96103 public GetObjectRequest newGetRequest (String key ) {
97104 return new GetObjectRequest (bucketName , key );
You can’t perform that action at this time.
0 commit comments