File tree Expand file tree Collapse file tree
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222import java .lang .reflect .Field ;
2323import java .util .Map ;
2424import java .util .Random ;
25+ import java .util .concurrent .ExecutionException ;
2526
2627import org .apache .hadoop .fs .FSDataInputStream ;
2728import org .apache .hadoop .fs .FSDataOutputStream ;
2829import org .apache .hadoop .fs .FileSystem ;
30+ import org .apache .hadoop .fs .FutureDataInputStreamBuilder ;
2931import org .apache .hadoop .fs .Path ;
3032import org .apache .hadoop .fs .azurebfs .AbfsConfiguration ;
3133import org .apache .hadoop .fs .azurebfs .AbstractAbfsIntegrationTest ;
@@ -130,9 +132,11 @@ public void testAzureBlobFileSystemBackReferenceInInputStream()
130132 private void testExceptionInOptimization (final FileSystem fs ,
131133 final Path testFilePath ,
132134 final int seekPos , final int length , final byte [] fileContent )
133- throws IOException {
135+ throws IOException , ExecutionException , InterruptedException {
134136
135- FSDataInputStream iStream = fs .open (testFilePath );
137+ FutureDataInputStreamBuilder builder = fs .openFile (testFilePath );
138+ builder .withFileStatus (fs .getFileStatus (testFilePath ));
139+ FSDataInputStream iStream = builder .build ().get ();
136140 try {
137141 AbfsInputStream abfsInputStream = (AbfsInputStream ) iStream
138142 .getWrappedStream ();
You can’t perform that action at this time.
0 commit comments