From d8d168397b43244889dac1387791ab67e9a0d1ea Mon Sep 17 00:00:00 2001 From: haomarch Date: Wed, 28 Apr 2021 15:17:52 +0800 Subject: [PATCH] [CARBONDATA-4176] Fail to achive AK/SK when create table on S3/OBS Why is this PR needed? Due to the failure to obtain aksk, create table operation failed. What changes were proposed in this PR? Change "session.sparkContext.hadoopConfiguration" to "session.sessionState.newHadoopConf()" Does this PR introduce any user interface change? No Is any new testcase added? No --- .../spark/src/main/scala/org/apache/spark/sql/CarbonEnv.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/CarbonEnv.scala b/integration/spark/src/main/scala/org/apache/spark/sql/CarbonEnv.scala index bb6e2ef7078..4cac9c5cc32 100644 --- a/integration/spark/src/main/scala/org/apache/spark/sql/CarbonEnv.scala +++ b/integration/spark/src/main/scala/org/apache/spark/sql/CarbonEnv.scala @@ -394,7 +394,7 @@ object CarbonEnv { tmpPath = tmpPath + "_" + tableId } val path = new Path(tmpPath) - val fs = path.getFileSystem(sparkSession.sparkContext.hadoopConfiguration) + val fs = path.getFileSystem(sparkSession.sessionState.newHadoopConf()) fs.makeQualified(path).toString }