26
26
import org .apache .hadoop .fs .contract .ContractTestUtils ;
27
27
import org .apache .hadoop .fs .statistics .IOStatistics ;
28
28
import org .apache .hadoop .fs .statistics .StreamStatisticNames ;
29
+ import org .apache .hadoop .test .LambdaTestUtils ;
29
30
import org .apache .hadoop .test .tags .IntegrationTest ;
30
31
31
32
import org .junit .jupiter .api .Test ;
32
33
import org .junit .jupiter .params .ParameterizedClass ;
33
34
import org .junit .jupiter .params .provider .MethodSource ;
34
35
35
36
import java .util .List ;
37
+ import java .util .function .Consumer ;
36
38
39
+ import static org .apache .hadoop .fs .contract .ContractTestUtils .skip ;
40
+ import static org .apache .hadoop .fs .contract .ContractTestUtils .validateVectoredReadResult ;
37
41
import static org .apache .hadoop .fs .s3a .S3ATestUtils .enableAnalyticsAccelerator ;
38
42
import static org .apache .hadoop .fs .s3a .S3ATestUtils .skipForAnyEncryptionExceptSSES3 ;
39
43
import static org .apache .hadoop .fs .statistics .IOStatisticAssertions .verifyStatisticCounterValue ;
@@ -73,7 +77,6 @@ protected Configuration createConfiguration() {
73
77
// This issue is tracked in:
74
78
// https://github.com/awslabs/analytics-accelerator-s3/issues/218
75
79
skipForAnyEncryptionExceptSSES3 (conf );
76
- conf .set ("fs.contract.vector-io-early-eof-check" , "false" );
77
80
return conf ;
78
81
}
79
82
@@ -82,18 +85,31 @@ protected AbstractFSContract createContract(Configuration conf) {
82
85
return new S3AContract (conf );
83
86
}
84
87
88
+ /**
89
+ * When the offset is negative, AAL returns IllegalArgumentException, whereas the base implementation will return
90
+ * an EoF.
91
+ */
85
92
@ Override
86
93
public void testNegativeOffsetRange () throws Exception {
87
94
verifyExceptionalVectoredRead (ContractTestUtils .range (-1 , 50 ), IllegalArgumentException .class );
88
95
}
89
96
97
+ /**
98
+ * Currently there is no null check on the release operation, this will be fixed in the next AAL version.
99
+ */
100
+ @ Override
101
+ public void testNullReleaseOperation () {
102
+ skip ("AAL current does not do a null check on the release operation" );
103
+ }
104
+
90
105
@ Test
91
106
public void testReadVectoredWithAALStatsCollection () throws Exception {
92
107
93
108
List <FileRange > fileRanges = createSampleNonOverlappingRanges ();
94
- try (FSDataInputStream in = openVectorFile ()){
109
+ try (FSDataInputStream in = openVectorFile ()) {
95
110
in .readVectored (fileRanges , getAllocate ());
96
111
112
+ validateVectoredReadResult (fileRanges , DATASET , 0 );
97
113
IOStatistics st = in .getIOStatistics ();
98
114
99
115
// Statistics such as GET requests will be added after IoStats support.
0 commit comments