首页 > 编程知识 正文

spark与hive的区别,hive是基于hadoop的一个

时间:2023-05-06 09:47:24 阅读:56646 作者:1393

spark 3.1.x版本

hive 1.2.x

hadoop 2.6.0-cdh-5.13.1

背景许多公司的yarn集群使用cdh版本,因此通过Cloudera Manager进行管理。 到目前为止,spark的最新版本为3.1.1。 在cdh 2.6.0-5.13.1中,当前支持的hive版本是1.2.1,因此请集中尝试。

直接修改pom文件与hive对应的版本如果直接修改编译后的hadoop版本在spark中运行,可以动态加载与hive对应的版本软件包直接修改pom文件与hive对应的版本

profileidhive-1.2/idpropertieshive.version1.2.1/hive.version! - versionusedforinternaldirectorystructure-- hive.version.short 1.2/hive.version.short hive.storage.version2. hive.storage.versiondatanucleus-core.version3.2. 10/data nucleus

./dev/make-distribution.sh-- name2.6.0- CDH5. 13.1-- pip-- tgz-phi ve-1.2-phi ve-thrift server-pye

[ info ]---Scala-maven-plugin :4.3.0: compile (Scala-compile-first ) @ spark-hive _ 2.12---[ ive ] usingincrementalcompilationusingmixedcompileorder [ info ] compilerbridgefile :SBT/1.0/zinc/org.Scala-SBT/org.Scala-SBT-compiler-bridge _ 2.12-1.3.1-mdhm _2. 12.10 _ _ 52.0-1.3.1 _ 2019 10 12 t 04515.jaa null ([ info ] compiling 29 scalasourcesand2javasourcestospark/SQL/hive/target/Scala-2.12/classes . [ error ] [ errer hives him.Scala :293360 objectserializationutilitiesisnotamsmberofpackageorg.Apache.Hadoop.hive.QL.exec [ errror ] hives him.Scala 33601503360 not found : valueserializationutilities [ errror ] Scala/org/Apache/spark/SQL/hive/hives him.Scala 33601543360 not found : valueserializationutilities [ error ] [ org/Apache/spark/SQL/hive/hive UDFs forconstructorsimplegenericudafparameterinfo : (x $ 1: array [ org.Apache.Hadoop.hive.ser de2. object inspector x $ 3: boolean (org.Apache.Hadoop.hive.QL.UDF.generic.simplegenericudafparameterinfo [ error ] fourerrrorsfoure

直接修改编译的hadoop版本的hadoop版本为2.6.0-cdh5.13.1

运行以下命令:

./dev/make-distribution.sh-- name2.6.0- CDH5. 13.1-- pip-- tgz-phi ve-1.2-phi ve-thrift server-pye

[ info ]---Scala-maven-plugin :4.3.0: compile (Scala-compile-first ) @ spark-core _ 2.12---- [ ii usingincrementalcompilationusingmixedcompileorder [ info ] compilerbridgefile :SBT/1.0/zinc/org.Scala-SBT/org.Scala-SBT-compiler-bridge _ 2.12-1.3.1-mdhm _2. 12.10 _ _ 52.0-1.3.1 _ 2019 10 12 t 04515.jaa null ([ info ] compiling 560 scalasourcesand 99 javasourcestospark/core/target/Scala-2.12/classes . [ error ] [ error found 3360 kwheretypekrequired :字符串[ error ] [ error ] spark/core/src/main/Scala/org/Apache/spark/ui/httpsecurityfilter.Scala :1073360 valuemapisnotamemberofv [ error ] spark/core/src/main/Scala/org/arg httpsecurityfilter.Scala :1073360 missingargumentlistformethodstripxssinclassxssaferequestunappliedmethodsareonlyconverver pect ed.youcanmakethisconversionexplicitbywriting ` strip XSS ` or ` strip XSS ` strip XSS (_ ) insteadof`stripXSS () ) stet org/Apache/spark/ui/page dtable.Scala 33603073360 valuestartswithisnota src/main/Scala/org/Apache/spark/utill

在spark运行时,动态加载支持hive的版本软件包根据官方网站的说明,spark可以从1.4.0开始与不同的hive元数据进行交互。 也就是说,spark编译的hive版本和spark访问hive的元数据是独立的,可以配置不同的hive版本来访问对应的元数据。 具体配置请参考上述官网配置。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。