|
20 | 20 |
|
21 | 21 | import static org.apache.commons.lang3.StringUtils.isNotBlank; |
22 | 22 | import static org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_LOCATION; |
| 23 | +import static org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_STORAGE; |
23 | 24 | import static org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.TABLE_IS_CTAS; |
24 | 25 | import static org.apache.hive.common.util.HiveStringUtils.quoteComments; |
25 | 26 |
|
|
57 | 58 | import org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat; |
58 | 59 | import org.apache.hadoop.hive.ql.io.RCFileInputFormat; |
59 | 60 | import org.apache.hadoop.hive.ql.io.RCFileOutputFormat; |
60 | | -import org.apache.hadoop.hive.ql.metadata.Hive; |
61 | 61 | import org.apache.hadoop.hive.ql.metadata.HiveException; |
62 | 62 | import org.apache.hadoop.hive.ql.metadata.HiveStorageHandler; |
63 | 63 | import org.apache.hadoop.hive.ql.metadata.HiveUtils; |
@@ -932,11 +932,9 @@ private static void configureJobPropertiesForStorageHandler(boolean input, |
932 | 932 | } |
933 | 933 |
|
934 | 934 | try { |
935 | | - HiveStorageHandler storageHandler = |
936 | | - HiveUtils.getStorageHandler( |
937 | | - Hive.get().getConf(), |
938 | | - tableDesc.getProperties().getProperty( |
939 | | - org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_STORAGE)); |
| 935 | + HiveConf hiveConf = SessionState.getSessionConf(); |
| 936 | + String className = tableDesc.getProperties().getProperty(META_TABLE_STORAGE); |
| 937 | + HiveStorageHandler storageHandler = HiveUtils.getStorageHandler(hiveConf, className); |
940 | 938 | if (storageHandler != null) { |
941 | 939 | Map<String, String> jobProperties = new LinkedHashMap<String, String>(); |
942 | 940 | Map<String, String> jobSecrets = new LinkedHashMap<String, String>(); |
|
0 commit comments