123手机浏览器,seo网络推广招聘,网站开发兼职合同,用照片做模板下载网站datart读取hive数据时#xff0c;需要先在datart的lib目录下导入hive jdbc相关的包#xff0c;这里面有几个坑记录下#xff1a;
1.和springboot中commons-lang3冲突
2.hive中带的jetty和springboot冲突
3.hive jdbc的包的版本号一定要小于登录hive服务端的版本#xff… datart读取hive数据时需要先在datart的lib目录下导入hive jdbc相关的包这里面有几个坑记录下
1.和springboot中commons-lang3冲突
2.hive中带的jetty和springboot冲突
3.hive jdbc的包的版本号一定要小于登录hive服务端的版本否则会报Required field ‘client_protocol’ is unset的错误在引入hive jdbc包的时候要先查看hive的版本具体方法可以找到hive的安装目录 whereis hive,查看hive lib目录下相关包的版本或者执行hive后通过查看日志得到hive的版本。
最后在导入包的时候一个个导比较麻烦而且针对jar包冲突请求也不好处理所以新建了个项目将所需的包引入使用maven-shade-plugin插件进行打包并对冲突了的jar包进行重命名消除冲突最后的pom文件如下
?xml version1.0 encodingUTF-8?
project xmlnshttp://maven.apache.org/POM/4.0.0xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersiongroupIdorg.example/groupIdartifactIdhive-dependency/artifactIdversion1.0-SNAPSHOT/versionpropertiesmaven.compiler.source8/maven.compiler.sourcemaven.compiler.target8/maven.compiler.targethive.version1.1.0/hive.version/propertiesdependencies!-- https://mvnrepository.com/artifact/org.apache.hive/hive-jdbc --dependencygroupIdorg.apache.hive/groupIdartifactIdhive-jdbc/artifactIdversion${hive.version}/version/dependencydependencygroupIdorg.apache.hadoop/groupIdartifactIdhadoop-common/artifactIdversion2.6.0/version/dependencydependencygroupIdorg.apache.hadoop/groupIdartifactIdhadoop-client/artifactIdversion2.7.1/version/dependencydependencygroupIdorg.apache.hive/groupIdartifactIdhive-exec/artifactIdversion${hive.version}/versionexclusionsexclusionartifactIdcommons-lang3/artifactIdgroupIdorg.apache.commons/groupId/exclusion/exclusions/dependency/dependenciesbuildpluginspluginartifactIdmaven-compiler-plugin/artifactIdconfigurationsource1.8/sourcetarget1.8/targetencodingUTF-8/encoding/configuration/pluginplugingroupIdorg.apache.maven.plugins/groupIdartifactIdmaven-shade-plugin/artifactIdversion2.4.3/versionexecutionsexecutionphasepackage/phasegoalsgoalshade/goal/goalsconfigurationfiltersfilterartifact*:*/artifactexcludesexcludeMETA-INF/*.SF/excludeexcludeMETA-INF/*.DSA/excludeexcludeMETA-INF/*.RSA/excludeexcludeorg/eclipse/*/exclude/excludes/filter/filtersrelocationsrelocationpatternorg.apache.commons.lang3/patternshadedPatternorg.apache.commons.hive.lang3/shadedPattern/relocationrelocationpatternorg.eclipse.jetty/patternshadedPatternorg.eclipse.hive.jetty/shadedPattern/relocationrelocationpatternorg.mortbay/patternshadedPatternorg.mortbay.hive/shadedPattern/relocation/relocations/configuration/execution/executions/plugin/plugins/buildrepositoriesrepositoryidaliyun/id!-- mirrorOf*/mirrorOf--namespring-plugin/nameurlhttps://maven.aliyun.com/repository/spring-plugin/urlreleasesenabledtrue/enabled/releasessnapshotsenabledfalse/enabled/snapshots/repository/repositories
/project