Repository navigation
[Hadoop] Keep the GCS conflict check, hierarchical namespace and implicit dir repair off for vended tokens #2281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
26107cc
3f0951d
ba3f5fb
22ab6c2
100ba26
69cd5f6
d786fcd
e3ad8b6
af36b5e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ | |
| import io.unitycatalog.hadoop.internal.fs.CredScopedFileSystem; | ||
| import io.unitycatalog.hadoop.internal.fs.CredScopedFs; | ||
| import io.unitycatalog.hadoop.internal.id.CredId; | ||
| import java.util.Arrays; | ||
| import java.util.Collections; | ||
| import java.util.HashMap; | ||
| import java.util.List; | ||
|
|
@@ -175,6 +176,20 @@ protected CredPropsBuilder saveAndOverride(String key, String defaultOriginal, S | |
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Whether the engine's configuration sets {@code key} itself: a value counts as the engine's own | ||
| * unless every recorded source is {@code core-default.xml}, which holds Hadoop's own defaults | ||
| * such as S3A's default provider list and Hadoop 3.5's GCS conflict-check default. | ||
| */ | ||
| protected boolean engineSets(String key) { | ||
| if (hadoopConf().get(key) == null) { | ||
| return false; | ||
| } | ||
| // No recorded source means we cannot show the value came from defaults, so respect it. | ||
| String[] sources = hadoopConf().getPropertySources(key); | ||
| return sources == null || !Arrays.stream(sources).allMatch("core-default.xml"::equals); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [AI Assisted] Nit: no test covers this |
||
| } | ||
|
|
||
| protected boolean isCredScopedFsEnabled() { | ||
| return credScopedFsEnabled; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,12 @@ | ||
| package io.unitycatalog.hadoop.internal; | ||
|
|
||
| import static java.nio.charset.StandardCharsets.UTF_8; | ||
| import static org.assertj.core.api.Assertions.assertThat; | ||
|
|
||
| import io.unitycatalog.hadoop.UCCredentialHadoopConfs; | ||
| import io.unitycatalog.hadoop.internal.auth.GcsCredential; | ||
| import io.unitycatalog.hadoop.internal.auth.GenericCredential; | ||
| import java.io.ByteArrayInputStream; | ||
| import java.util.HashMap; | ||
| import java.util.Map; | ||
| import org.apache.hadoop.conf.Configuration; | ||
|
|
@@ -13,6 +15,8 @@ | |
| class GcsCredPropsTest extends CredPropsBaseTest { | ||
|
|
||
| private static final String CONFLICT_CHECK_KEY = "fs.gs.create.items.conflict.check.enable"; | ||
| private static final String HNS_FOLDERS_KEY = "fs.gs.hierarchical.namespace.folders.enable"; | ||
| private static final String IMPLICIT_DIR_REPAIR_KEY = "fs.gs.implicit.dir.repair.enable"; | ||
| private static final String STATIC_EXPIRATION_KEY = "fs.gs.auth.access.token.expiration"; | ||
| private static final String CUSTOM_IMPL = "com.example.CustomGcsFileSystem"; | ||
| private static final String GHFS = "com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem"; | ||
|
|
@@ -37,7 +41,15 @@ GenericCredential vendedCred(Long expirationMillis, String prefix) { | |
|
|
||
| @Override | ||
| Map<String, String> defaultKeys() { | ||
| return props(CONFLICT_CHECK_KEY, "false", "fs.gs.impl.disable.cache", "true"); | ||
| return props( | ||
| CONFLICT_CHECK_KEY, | ||
| "false", | ||
| HNS_FOLDERS_KEY, | ||
| "false", | ||
| IMPLICIT_DIR_REPAIR_KEY, | ||
| "false", | ||
| "fs.gs.impl.disable.cache", | ||
| "true"); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -128,8 +140,114 @@ void conflictCheckRespectsUserOverrideToTrue() throws Exception { | |
| assertThat(props).containsEntry(CONFLICT_CHECK_KEY, "true"); | ||
| } | ||
|
|
||
| /** | ||
| * Hadoop 3.5 ships {@code fs.gs.create.items.conflict.check.enable=true} in its built-in {@code | ||
| * core-default.xml}. That is not the user's choice, so it must not keep the check on. (Hadoop has | ||
| * no default for the other GCS keys; the connector's own {@code true} default for the | ||
| * hierarchical namespace key is not in the Hadoop configuration at all.) | ||
| */ | ||
| @Test | ||
| void hadoopBuiltInDefaultDoesNotKeepTheGcsChecksOn() throws Exception { | ||
| Configuration conf = new Configuration(false); | ||
| String defaults = | ||
| "<configuration><property><name>" | ||
| + CONFLICT_CHECK_KEY | ||
| + "</name><value>true</value></property></configuration>"; | ||
| conf.addResource(new ByteArrayInputStream(defaults.getBytes(UTF_8)), "core-default.xml"); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [AI Assisted] This fixture puts
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right. Hadoop 3.5.0's |
||
| assertThat(conf.get(CONFLICT_CHECK_KEY)).isEqualTo("true"); | ||
| assertThat(conf.get(HNS_FOLDERS_KEY)).isNull(); | ||
|
|
||
| assertThat(tableProps(conf)) | ||
| .containsEntry(CONFLICT_CHECK_KEY, "false") | ||
| .containsEntry(HNS_FOLDERS_KEY, "false") | ||
| .containsEntry(IMPLICIT_DIR_REPAIR_KEY, "false"); | ||
| } | ||
|
|
||
| /** Values from {@code core-site.xml}, which loads after the defaults, are the user's own. */ | ||
| @Test | ||
| void coreSiteValuesOnTopOfHadoopDefaultsAreRespected() throws Exception { | ||
| Configuration conf = new Configuration(false); | ||
| String defaults = | ||
| "<configuration><property><name>" | ||
| + CONFLICT_CHECK_KEY | ||
| + "</name><value>true</value></property></configuration>"; | ||
| String site = | ||
| "<configuration>" | ||
| + "<property><name>" | ||
| + CONFLICT_CHECK_KEY | ||
| + "</name><value>true</value></property>" | ||
| + "<property><name>" | ||
| + HNS_FOLDERS_KEY | ||
| + "</name><value>true</value></property>" | ||
| + "<property><name>" | ||
| + IMPLICIT_DIR_REPAIR_KEY | ||
| + "</name><value>true</value></property>" | ||
| + "</configuration>"; | ||
| conf.addResource(new ByteArrayInputStream(defaults.getBytes(UTF_8)), "core-default.xml"); | ||
| conf.addResource(new ByteArrayInputStream(site.getBytes(UTF_8)), "core-site.xml"); | ||
|
|
||
| assertThat(tableProps(conf)) | ||
| .containsEntry(CONFLICT_CHECK_KEY, "true") | ||
| .containsEntry(HNS_FOLDERS_KEY, "true") | ||
| .containsEntry(IMPLICIT_DIR_REPAIR_KEY, "true"); | ||
| } | ||
|
|
||
| /** Each key is decided on its own: setting one does not change the other two. */ | ||
| @Test | ||
| void eachKeyIsDecidedIndependently() throws Exception { | ||
| Map<String, String> expected = | ||
| Map.of( | ||
| CONFLICT_CHECK_KEY, | ||
| "false", | ||
| HNS_FOLDERS_KEY, | ||
| "false", | ||
| IMPLICIT_DIR_REPAIR_KEY, | ||
| "false"); | ||
| for (String key : expected.keySet()) { | ||
| Configuration conf = new Configuration(false); | ||
| conf.set(key, "true"); | ||
|
|
||
| Map<String, String> props = tableProps(conf); | ||
|
|
||
| expected.forEach((k, v) -> assertThat(props).containsEntry(k, k.equals(key) ? "true" : v)); | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| void userValuesWinOverHadoopDefaults() throws Exception { | ||
| Configuration conf = new Configuration(false); | ||
| String defaults = | ||
| "<configuration><property><name>" | ||
| + CONFLICT_CHECK_KEY | ||
| + "</name><value>true</value></property></configuration>"; | ||
| conf.addResource(new ByteArrayInputStream(defaults.getBytes(UTF_8)), "core-default.xml"); | ||
| // A user setting, even one that equals Hadoop's default, is respected. | ||
| conf.set(CONFLICT_CHECK_KEY, "true"); | ||
| conf.set(HNS_FOLDERS_KEY, "true"); | ||
| conf.set(IMPLICIT_DIR_REPAIR_KEY, "true"); | ||
|
|
||
| assertThat(tableProps(conf)) | ||
| .containsEntry(CONFLICT_CHECK_KEY, "true") | ||
| .containsEntry(HNS_FOLDERS_KEY, "true") | ||
| .containsEntry(IMPLICIT_DIR_REPAIR_KEY, "true"); | ||
| } | ||
|
|
||
| private Map<String, String> tableProps(Configuration conf) throws Exception { | ||
| return CredPropsUtil.createTableCredProps( | ||
| false, | ||
| false, | ||
| conf, | ||
| scheme(), | ||
| null, | ||
| CATALOG_URI, | ||
| tokenProvider(), | ||
| TABLE_ID, | ||
| UCCredentialHadoopConfs.TableOperation.READ_WRITE, | ||
| Map.of()); | ||
| } | ||
|
|
||
| @Test | ||
| void conflictCheckDefaultsFalseAcrossPathAndDeltaCredProps() throws Exception { | ||
| void gcsChecksDefaultFalseAcrossPathAndDeltaCredProps() throws Exception { | ||
| Map<String, String> pathProps = | ||
| CredPropsUtil.createPathCredProps( | ||
| false, | ||
|
|
@@ -142,7 +260,10 @@ void conflictCheckDefaultsFalseAcrossPathAndDeltaCredProps() throws Exception { | |
| location(), | ||
| UCCredentialHadoopConfs.PathOperation.PATH_READ, | ||
| Map.of()); | ||
| assertThat(pathProps).containsEntry(CONFLICT_CHECK_KEY, "false"); | ||
| assertThat(pathProps) | ||
| .containsEntry(CONFLICT_CHECK_KEY, "false") | ||
| .containsEntry(HNS_FOLDERS_KEY, "false") | ||
| .containsEntry(IMPLICIT_DIR_REPAIR_KEY, "false"); | ||
|
|
||
| Map<String, String> deltaProps = | ||
| CredPropsUtil.createDeltaTableCredProps( | ||
|
|
@@ -157,6 +278,9 @@ void conflictCheckDefaultsFalseAcrossPathAndDeltaCredProps() throws Exception { | |
| location(), | ||
| UCCredentialHadoopConfs.TableOperation.READ_WRITE, | ||
| Map.of()); | ||
| assertThat(deltaProps).containsEntry(CONFLICT_CHECK_KEY, "false"); | ||
| assertThat(deltaProps) | ||
| .containsEntry(CONFLICT_CHECK_KEY, "false") | ||
| .containsEntry(HNS_FOLDERS_KEY, "false") | ||
| .containsEntry(IMPLICIT_DIR_REPAIR_KEY, "false"); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -265,13 +265,14 @@ your Spark version, plus the cloud storage module that matches the Hadoop versio | |
|
|
||
| | Spark version | Bundled Hadoop | AWS S3 | Azure ADLSgen2 | Google Cloud Storage | | ||
| | --- | --- | --- | --- | --- | | ||
| | Apache Spark 4.0.x | 3.4.1 | `org.apache.hadoop:hadoop-aws:3.4.1` | `org.apache.hadoop:hadoop-azure:3.4.1` | `gcs-connector-3.0.2-shaded.jar` | | ||
| | Apache Spark 4.1.x | 3.4.2 | `org.apache.hadoop:hadoop-aws:3.4.2` | `org.apache.hadoop:hadoop-azure:3.4.2` | `gcs-connector-3.0.2-shaded.jar` | | ||
| | Apache Spark 4.2.x | 3.5.0 | `org.apache.hadoop:hadoop-aws:3.5.0` | `org.apache.hadoop:hadoop-azure:3.5.0` | `org.apache.hadoop:hadoop-gcp:3.5.0` | | ||
| | Apache Spark 4.0.x | 3.4.1 | `org.apache.hadoop:hadoop-aws:3.4.1` | `org.apache.hadoop:hadoop-azure:3.4.1` | `gcs-connector-4.0.10-shaded.jar` | | ||
| | Apache Spark 4.1.x | 3.4.2 | `org.apache.hadoop:hadoop-aws:3.4.2` | `org.apache.hadoop:hadoop-azure:3.4.2` | `gcs-connector-4.0.10-shaded.jar` | | ||
| | Apache Spark 4.2.x | 3.5.0 | `org.apache.hadoop:hadoop-aws:3.5.0` | `org.apache.hadoop:hadoop-azure:3.5.0` | `gcs-connector-4.0.10-shaded.jar` | | ||
|
|
||
| `hadoop-azure` requires 3.4.1 or later (see [issue #1175](https://github.com/unitycatalog/unitycatalog/issues/1175)). | ||
| Hadoop 3.4 has no GCS module, so Spark 4.0.x and 4.1.x load the Google Cloud Storage connector with `--jars`; Spark 4.2.x | ||
| uses Hadoop's own `hadoop-gcp` with `--packages`. | ||
| Every Spark version loads Google's Google Cloud Storage connector with `--jars`. Hadoop 3.4 has no GCS module of its own, | ||
| and the `hadoop-gcp` module in Hadoop 3.5 (Spark 4.2.x) cannot use the access tokens Unity Catalog vends, so Spark 4.2.x | ||
| needs Google's connector too, with the `fs.gs.impl` settings shown below. | ||
|
|
||
| === "AWS S3 (Spark 4.0.x)" | ||
|
|
||
|
|
@@ -393,12 +394,14 @@ uses Hadoop's own `hadoop-gcp` with `--packages`. | |
|
|
||
| bin/spark-sql --name "gcs-uc-test" \ | ||
| --master "local[*]" \ | ||
| --jars "https://repo1.maven.org/maven2/com/google/cloud/bigdataoss/gcs-connector/3.0.2/gcs-connector-3.0.2-shaded.jar" \ | ||
| --jars "https://repo1.maven.org/maven2/com/google/cloud/bigdataoss/gcs-connector/4.0.10/gcs-connector-4.0.10-shaded.jar" \ | ||
| --packages "io.delta:delta-spark_4.0_2.13:4.4.1,io.unitycatalog:unitycatalog-spark_4.0_2.13:0.7.0" \ | ||
| --conf "spark.sql.extensions=io.delta.sql.DeltaSparkSessionExtension" \ | ||
| --conf "spark.sql.catalog.spark_catalog=org.apache.spark.sql.delta.catalog.DeltaCatalog" \ | ||
| --conf "spark.hadoop.fs.gs.impl=com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem" \ | ||
| --conf "spark.hadoop.fs.AbstractFileSystem.gs.impl=com.google.cloud.hadoop.fs.gcs.GoogleHadoopFS" \ | ||
| --conf "spark.hadoop.fs.gs.hierarchical.namespace.folders.enable=false" \ | ||
| --conf "spark.hadoop.fs.gs.implicit.dir.repair.enable=false" \ | ||
| --conf "spark.sql.catalog.$CATALOG_NAME=io.unitycatalog.spark.UCSingleCatalog" \ | ||
| --conf "spark.sql.catalog.$CATALOG_NAME.uri=$UC_URI" \ | ||
| --conf "spark.sql.catalog.$CATALOG_NAME.token=$UC_TOKEN" \ | ||
|
|
@@ -414,12 +417,14 @@ uses Hadoop's own `hadoop-gcp` with `--packages`. | |
|
|
||
| bin/spark-sql --name "gcs-uc-test" \ | ||
| --master "local[*]" \ | ||
| --jars "https://repo1.maven.org/maven2/com/google/cloud/bigdataoss/gcs-connector/3.0.2/gcs-connector-3.0.2-shaded.jar" \ | ||
| --jars "https://repo1.maven.org/maven2/com/google/cloud/bigdataoss/gcs-connector/4.0.10/gcs-connector-4.0.10-shaded.jar" \ | ||
| --packages "io.delta:delta-spark_4.1_2.13:4.4.1,io.unitycatalog:unitycatalog-spark_4.1_2.13:0.7.0" \ | ||
| --conf "spark.sql.extensions=io.delta.sql.DeltaSparkSessionExtension" \ | ||
| --conf "spark.sql.catalog.spark_catalog=org.apache.spark.sql.delta.catalog.DeltaCatalog" \ | ||
| --conf "spark.hadoop.fs.gs.impl=com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem" \ | ||
| --conf "spark.hadoop.fs.AbstractFileSystem.gs.impl=com.google.cloud.hadoop.fs.gcs.GoogleHadoopFS" \ | ||
| --conf "spark.hadoop.fs.gs.hierarchical.namespace.folders.enable=false" \ | ||
| --conf "spark.hadoop.fs.gs.implicit.dir.repair.enable=false" \ | ||
| --conf "spark.sql.catalog.$CATALOG_NAME=io.unitycatalog.spark.UCSingleCatalog" \ | ||
| --conf "spark.sql.catalog.$CATALOG_NAME.uri=$UC_URI" \ | ||
| --conf "spark.sql.catalog.$CATALOG_NAME.token=$UC_TOKEN" \ | ||
|
|
@@ -435,15 +440,40 @@ uses Hadoop's own `hadoop-gcp` with `--packages`. | |
|
|
||
| bin/spark-sql --name "gcs-uc-test" \ | ||
| --master "local[*]" \ | ||
| --packages "org.apache.hadoop:hadoop-gcp:3.5.0,io.delta:delta-spark_4.2_2.13:4.4.1,io.unitycatalog:unitycatalog-spark_4.2_2.13:0.7.0" \ | ||
| --jars "https://repo1.maven.org/maven2/com/google/cloud/bigdataoss/gcs-connector/4.0.10/gcs-connector-4.0.10-shaded.jar" \ | ||
| --packages "io.delta:delta-spark_4.2_2.13:4.4.1,io.unitycatalog:unitycatalog-spark_4.2_2.13:0.7.0" \ | ||
| --conf "spark.sql.extensions=io.delta.sql.DeltaSparkSessionExtension" \ | ||
| --conf "spark.sql.catalog.spark_catalog=org.apache.spark.sql.delta.catalog.DeltaCatalog" \ | ||
| --conf "spark.hadoop.fs.gs.impl=com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem" \ | ||
| --conf "spark.hadoop.fs.AbstractFileSystem.gs.impl=com.google.cloud.hadoop.fs.gcs.GoogleHadoopFS" \ | ||
| --conf "spark.hadoop.fs.gs.create.items.conflict.check.enable=false" \ | ||
| --conf "spark.hadoop.fs.gs.hierarchical.namespace.folders.enable=false" \ | ||
| --conf "spark.hadoop.fs.gs.implicit.dir.repair.enable=false" \ | ||
| --conf "spark.sql.catalog.$CATALOG_NAME=io.unitycatalog.spark.UCSingleCatalog" \ | ||
| --conf "spark.sql.catalog.$CATALOG_NAME.uri=$UC_URI" \ | ||
| --conf "spark.sql.catalog.$CATALOG_NAME.token=$UC_TOKEN" \ | ||
| --conf "spark.sql.defaultCatalog=$CATALOG_NAME" | ||
| ``` | ||
|
|
||
| !!! note "Unity Catalog Spark connector before 0.8.0" | ||
| Three settings of Google's connector touch more than the table's own folder, which the folder-scoped tokens Unity | ||
| Catalog vends cannot do, so the call fails with `403`: | ||
|
|
||
| - `fs.gs.hierarchical.namespace.folders.enable` reads the bucket's layout when a folder is deleted or renamed. The | ||
| connector turns it on itself, on every Spark version. Parquet tables fail because their commit deletes folders; | ||
| Delta tables do not. | ||
| - `fs.gs.create.items.conflict.check.enable` reads every folder above a new file or folder. Hadoop 3.5 (Spark 4.2.x) | ||
| turns it on. Creating a table or writing to it fails. | ||
| - `fs.gs.implicit.dir.repair.enable` looks up the parent folder after a folder is deleted. The connector turns it on | ||
| itself, and it breaks `INSERT OVERWRITE` on parquet tables. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [AI Assisted] Same point as the comment on
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same fix as the constructor comment: the note now says the setting looks up the parent folder after a folder is deleted, and the INSERT OVERWRITE example stays since that path fails in my runs. |
||
|
|
||
| From 0.8.0 Unity Catalog turns all three off itself, so the `--conf` lines for them in the commands above can be | ||
| dropped. If your credentials are broad enough for those calls (for example on a hierarchical-namespace bucket), set | ||
| one to `true` in your Spark config and the connector keeps your value. Hadoop 3.5's own `true` for the conflict check | ||
| does not count as setting it, so if you relied on that default, set the key to `true` yourself. With the hierarchical namespace setting off, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [AI Assisted] Nit: this line is 144 characters, much longer than the lines around it. Splitting the Hadoop 3.5 caveat and the hierarchical namespace caveat into separate lines would match the note's wrapping. |
||
| folder delete and rename on hierarchical-namespace buckets use the connector's non-native path; setting it to `true` | ||
| needs credentials that cover the bucket. | ||
|
|
||
| ## Querying cloud paths with Unity Catalog credentials | ||
|
|
||
| Registered catalog tables already receive vended credentials from `UCSingleCatalog.loadTable`. Spark SQL that names a | ||
|
|
@@ -484,6 +514,20 @@ SELECT 1 AS i, 'a' AS s; | |
| If Unity Catalog cannot vend for a path (not managed by UC, or no permission), Spark falls back to ambient Hadoop | ||
| credentials already configured on the session. | ||
|
|
||
| ## Structured Streaming checkpoints | ||
|
|
||
| Unity Catalog vends credentials for the table's own folder, and Delta uses them for the data and commits it writes | ||
| there. The `checkpointLocation` of a streaming query is different: Spark writes its offsets and commit log there | ||
| itself, not through the table, so Unity Catalog vends nothing for it. The Spark session needs its own access to the | ||
| checkpoint location, for example a machine identity or an application default login (on GCS, also set | ||
| `spark.hadoop.fs.gs.auth.type=APPLICATION_DEFAULT`). With the default renewing credentials, Unity Catalog sets its own | ||
| auth type for each table, so that session-wide setting only applies to locations Unity Catalog does not vend for, such | ||
| as the checkpoint. | ||
|
|
||
| !!! warning | ||
| Limit that login to the checkpoint location. If it can also read the table's storage, Spark can bypass the | ||
| short-lived credentials Unity Catalog vends for the table. | ||
|
|
||
| ## Using Spark SQL to query Unity Catalog schemas and tables | ||
|
|
||
| Let’s start by running some quick commands from the Spark SQL and pyspark shells. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[AI Assisted] This branch treats a key with no recorded source as engine-set, so a value Hadoop does not attribute is kept rather than replaced.
getPropertySourcesreturns null when Hadoop records no source for the key. A one-line comment saying so would make the choice visible.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment: Hadoop records no source for a key it did not load from a resource, so that counts as set.