File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/hdinsight/spark/run
Utils/hdinsight-node-common/src/com/microsoft/azure/hdinsight/common Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,8 @@ protected SparkSubmissionParameter updateStorageConfigForSubmissionParameter(Spa
9393 ? new SparkConfigures (existingConfigEntry )
9494 : new SparkConfigures ();
9595 wrappedConfig .put ("spark.hadoop." + fsRoot .getHadoopBlobFsPropertyKey (), storageKey );
96+ // We need the following config to fix issue https://github.com/microsoft/azure-tools-for-java/issues/5002
97+ wrappedConfig .put ("spark.hadoop." + fsRoot .getKeyProviderPropertyKey (), fsRoot .getDefaultKeyProviderPropertyValue ());
9698 submissionParameter .getJobConfig ().put (SparkSubmissionParameter .Conf , wrappedConfig );
9799 } catch (final UnknownFormatConversionException error ) {
98100 final String errorHint = "Azure blob storage uploading path is not in correct format" ;
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ public final class WasbUri extends AzureStorageUri {
2525 "^http[s]?://(?<storageAccount>[^/.]+)\\ .blob\\ .(?<endpointSuffix>[^/]+)/(?<container>[^/.]+)"
2626 + "(:(?<port>[0-9]+))?(/(?<path>.*))?$" ,
2727 Pattern .CASE_INSENSITIVE );
28+ public static final String SIMPLE_KEY_PROVIDER = "org.apache.hadoop.fs.azure.SimpleKeyProvider" ;
2829
2930 private final LaterInit <String > container = new LaterInit <>();
3031 private final LaterInit <String > storageAccount = new LaterInit <>();
@@ -76,6 +77,14 @@ public String getHadoopBlobFsPropertyKey() {
7677 return String .format ("fs.azure.account.key.%s.blob.%s" , getStorageAccount (), getEndpointSuffix ());
7778 }
7879
80+ public String getKeyProviderPropertyKey () {
81+ return String .format ("fs.azure.account.keyprovider.%s.blob.%s" , getStorageAccount (), getEndpointSuffix ());
82+ }
83+
84+ public String getDefaultKeyProviderPropertyValue () {
85+ return SIMPLE_KEY_PROVIDER ;
86+ }
87+
7988 public static WasbUri parse (final String blobUri ) {
8089 Matcher matcher ;
8190 if (StringUtils .startsWithIgnoreCase (blobUri , "wasb" )) {
You can’t perform that action at this time.
0 commit comments