File tree Expand file tree Collapse file tree 2 files changed +25
-6
lines changed
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a Expand file tree Collapse file tree 2 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 2323import org .apache .hadoop .conf .Configuration ;
2424
2525import static org .apache .hadoop .fs .s3a .S3ATestConstants .KEY_BUCKET_WITH_MANY_OBJECTS ;
26+ import static org .apache .hadoop .fs .s3a .S3ATestConstants .KEY_CSVTEST_FILE ;
2627import static org .apache .hadoop .fs .s3a .S3ATestConstants .KEY_REQUESTER_PAYS_FILE ;
2728
2829/**
@@ -56,6 +57,12 @@ public class PublicDatasetTestUtils {
5657 private static final String DEFAULT_BUCKET_WITH_MANY_OBJECTS
5758 = "s3a://usgs-landsat/collection02/level-1/" ;
5859
60+ /**
61+ * Default path for the multi MB test file: {@value}.
62+ */
63+ private static final String DEFAULT_MB_OBJECT
64+ = "s3a://landsat-pds/scene_list.gz" ;
65+
5966 /**
6067 * Provide a URI for a directory containing many objects.
6168 *
@@ -70,6 +77,19 @@ public static String getBucketPrefixWithManyObjects(Configuration conf) {
7077 KEY_BUCKET_WITH_MANY_OBJECTS , DEFAULT_BUCKET_WITH_MANY_OBJECTS );
7178 }
7279
80+ /**
81+ * Provide a URI to a large (multi MB) object.
82+ *
83+ * Unless otherwise configured,
84+ * this will be {@value DEFAULT_MB_OBJECT}.
85+ *
86+ * @param conf Hadoop configuration
87+ * @return S3A FS URI
88+ */
89+ public static String getLargeTextObject (Configuration conf ) {
90+ return fetchFromConfig (conf , KEY_CSVTEST_FILE , DEFAULT_MB_OBJECT );
91+ }
92+
7393 /**
7494 * Provide a URI to an object within a requester pays enabled bucket.
7595 *
Original file line number Diff line number Diff line change @@ -89,15 +89,14 @@ public interface S3ATestConstants {
8989 */
9090 String KEY_CSVTEST_FILE = S3A_SCALE_TEST + "csvfile" ;
9191
92- /**
93- * The landsat bucket: {@value}.
94- */
95- String LANDSAT_BUCKET = "s3a://landsat-pds/" ;
96-
9792 /**
9893 * Default path for the multi MB test file: {@value}.
94+ *
95+ * @deprecated Please use or add an appropriate method
96+ * in {@link PublicDatasetTestUtils}.
9997 */
100- String DEFAULT_CSVTEST_FILE = LANDSAT_BUCKET + "scene_list.gz" ;
98+ @ Deprecated
99+ String DEFAULT_CSVTEST_FILE = "s3a://landsat-pds/scene_list.gz" ;
101100
102101 /**
103102 * Configuration key for an existing object in a requester pays bucket: {@value}.
You can’t perform that action at this time.
0 commit comments