Commit eadf0dd
committed
HADOOP-19354. S3AInputStream to be created by factory under S3AStore
Ability to create custom streams (type = custom), which
reads class from "fs.s3a.input.stream.custom.factory".
This is mainly for testing, especially CNFE and similar.
Unit test TestStreamFactories for this.
ObjectInputStreams save and export stream type to assist
these tests too, as it enables assertions on the generated
stream type.
Simplified that logic related to the old prefetch enabled flag
If fs.s3a.prefetch.enabled is true, the prefetch stream is returned,
the stream.type option is not used at all. Simpler logic, simpler
docs, fewer support calls.
Parameters supplied to ObjectInputStreamFactory.bind converted
to a parameter object. Allows for more parameters to be added later
if ever required.
ObjectInputStreamFactory returns more requirements to
the store/fs. For this reason
StreamThreadOptions threadRequirements();
is renamed
StreamFactoryRequirements factoryRequirements()
VectorIO context changes
* Returned in factoryRequirements()
* exiting configuration reading code moved into
StreamIntegration.populateVectoredIOContext()
* Streams which don't have custom vector IO, e.g. prefetching
can return a minimum seek range of 0.
This disables range merging on the default PositionedReadable
implementation, so ensures that they will only get asked for
data which will be read...leaving prefetch/cache code
to know exactly what is needed.
Other
* Draft docs.
* Stream capability declares stream type
& is exported through FS too.
(todo: test, document, add to bucket-info)
* ConfigurationHelper.resolveEnum() supercedes
Configuration.getEnum() with
- case independence
- fallback is a supplier<Enum> rather than a simple
value.
Change-Id: I2e59300af48042df8173de61d0b3d6139a0ae7fe1 parent 9c8e753 commit eadf0dd
File tree
18 files changed
+794
-121
lines changed- hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util
- hadoop-tools/hadoop-aws/src
- main/java/org/apache/hadoop/fs/s3a
- impl
- streams
- prefetch
- site/markdown/tools/hadoop-aws
- test/java/org/apache/hadoop/fs/s3a
- impl/streams
18 files changed
+794
-121
lines changedLines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
126 | 162 | | |
Lines changed: 23 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
1594 | 1593 | | |
1595 | 1594 | | |
1596 | 1595 | | |
1597 | | - | |
| 1596 | + | |
1598 | 1597 | | |
1599 | 1598 | | |
1600 | 1599 | | |
1601 | 1600 | | |
1602 | | - | |
| 1601 | + | |
1603 | 1602 | | |
1604 | 1603 | | |
1605 | 1604 | | |
1606 | 1605 | | |
1607 | 1606 | | |
1608 | | - | |
1609 | | - | |
| 1607 | + | |
| 1608 | + | |
1610 | 1609 | | |
1611 | | - | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
1612 | 1627 | | |
1613 | 1628 | | |
1614 | 1629 | | |
1615 | 1630 | | |
| 1631 | + | |
1616 | 1632 | | |
1617 | 1633 | | |
1618 | 1634 | | |
1619 | 1635 | | |
1620 | 1636 | | |
| 1637 | + | |
1621 | 1638 | | |
1622 | 1639 | | |
1623 | 1640 | | |
| |||
Lines changed: 13 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | 372 | | |
379 | 373 | | |
380 | 374 | | |
| |||
755 | 749 | | |
756 | 750 | | |
757 | 751 | | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | 752 | | |
762 | 753 | | |
763 | 754 | | |
| |||
772 | 763 | | |
773 | 764 | | |
774 | 765 | | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
775 | 771 | | |
776 | 772 | | |
777 | 773 | | |
| |||
843 | 839 | | |
844 | 840 | | |
845 | 841 | | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | 842 | | |
864 | 843 | | |
865 | 844 | | |
| |||
950 | 929 | | |
951 | 930 | | |
952 | 931 | | |
953 | | - | |
954 | | - | |
955 | | - | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
956 | 935 | | |
957 | 936 | | |
958 | 937 | | |
| |||
970 | 949 | | |
971 | 950 | | |
972 | 951 | | |
973 | | - | |
| 952 | + | |
974 | 953 | | |
975 | 954 | | |
976 | 955 | | |
| |||
1860 | 1839 | | |
1861 | 1840 | | |
1862 | 1841 | | |
1863 | | - | |
1864 | | - | |
| 1842 | + | |
| 1843 | + | |
1865 | 1844 | | |
1866 | 1845 | | |
1867 | 1846 | | |
1868 | 1847 | | |
1869 | | - | |
| 1848 | + | |
1870 | 1849 | | |
1871 | 1850 | | |
1872 | 1851 | | |
| |||
Lines changed: 2 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | 149 | | |
153 | 150 | | |
154 | 151 | | |
| |||
195 | 192 | | |
196 | 193 | | |
197 | 194 | | |
198 | | - | |
199 | 195 | | |
200 | 196 | | |
201 | 197 | | |
| |||
764 | 760 | | |
765 | 761 | | |
766 | 762 | | |
| 763 | + | |
767 | 764 | | |
768 | 765 | | |
769 | 766 | | |
| |||
776 | 773 | | |
777 | 774 | | |
778 | 775 | | |
779 | | - | |
| 776 | + | |
780 | 777 | | |
781 | 778 | | |
782 | 779 | | |
| |||
826 | 823 | | |
827 | 824 | | |
828 | 825 | | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | 826 | | |
846 | 827 | | |
847 | 828 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
| |||
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
71 | 87 | | |
72 | 88 | | |
73 | 89 | | |
74 | 90 | | |
75 | 91 | | |
| 92 | + | |
76 | 93 | | |
77 | 94 | | |
78 | 95 | | |
Lines changed: 15 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | | - | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
114 | | - | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
236 | | - | |
| 238 | + | |
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
| |||
269 | 271 | | |
270 | 272 | | |
271 | 273 | | |
272 | | - | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
955 | 956 | | |
956 | 957 | | |
957 | 958 | | |
958 | | - | |
| 959 | + | |
959 | 960 | | |
960 | 961 | | |
961 | 962 | | |
| |||
966 | 967 | | |
967 | 968 | | |
968 | 969 | | |
969 | | - | |
970 | | - | |
| 970 | + | |
| 971 | + | |
971 | 972 | | |
972 | 973 | | |
973 | 974 | | |
974 | 975 | | |
975 | 976 | | |
976 | | - | |
977 | | - | |
| 977 | + | |
978 | 978 | | |
979 | 979 | | |
980 | | - | |
| 980 | + | |
981 | 981 | | |
982 | 982 | | |
983 | 983 | | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
984 | 989 | | |
985 | 990 | | |
986 | 991 | | |
| |||
0 commit comments