从源代码编译和构建配置单元时出错

m1m5dgzv  于 2021-06-02  发布在  Hadoop
关注(0)|答案(0)|浏览(276)

我一直在尝试使用maven从源代码构建hive,但是当我从这里运行命令时仍然会遇到一些错误。我在主人身上编译Hive。我在网上搜索了将近一个星期,但没有找到解决问题的方法。
以下是每次尝试从主服务器上的源代码构建配置单元时遇到的错误:

  1. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project hive-serde: Compilation failure: Compilation failure:
  2. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ThriftJDBCBinarySerDe.java:[42,42] package org.apache.hive.service.rpc.thrift does not exist
  3. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ColumnBuffer.java:[29,42] package org.apache.hive.service.rpc.thrift does not exist
  4. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ColumnBuffer.java:[30,42] package org.apache.hive.service.rpc.thrift does not exist
  5. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ColumnBuffer.java:[31,42] package org.apache.hive.service.rpc.thrift does not exist
  6. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ColumnBuffer.java:[32,42] package org.apache.hive.service.rpc.thrift does not exist
  7. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ColumnBuffer.java:[33,42] package org.apache.hive.service.rpc.thrift does not exist
  8. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ColumnBuffer.java:[34,42] package org.apache.hive.service.rpc.thrift does not exist
  9. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ColumnBuffer.java:[35,42] package org.apache.hive.service.rpc.thrift does not exist
  10. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ColumnBuffer.java:[36,42] package org.apache.hive.service.rpc.thrift does not exist
  11. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ColumnBuffer.java:[37,42] package org.apache.hive.service.rpc.thrift does not exist
  12. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/Type.java:[28,42] package org.apache.hive.service.rpc.thrift does not exist
  13. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ColumnBuffer.java:[135,23] cannot find symbol
  14. [ERROR] symbol: class TColumn
  15. [ERROR] location: class org.apache.hadoop.hive.serde2.thrift.ColumnBuffer
  16. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ColumnBuffer.java:[315,10] cannot find symbol
  17. [ERROR] symbol: class TColumn
  18. [ERROR] location: class org.apache.hadoop.hive.serde2.thrift.ColumnBuffer
  19. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/Type.java:[113,17] cannot find symbol
  20. [ERROR] symbol: class TTypeId
  21. [ERROR] location: class org.apache.hadoop.hive.serde2.thrift.Type
  22. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/Type.java:[119,38] cannot find symbol
  23. [ERROR] symbol: class TTypeId
  24. [ERROR] location: class org.apache.hadoop.hive.serde2.thrift.Type
  25. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/Type.java:[129,38] cannot find symbol
  26. [ERROR] symbol: class TTypeId
  27. [ERROR] location: class org.apache.hadoop.hive.serde2.thrift.Type
  28. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/Type.java:[133,38] cannot find symbol
  29. [ERROR] symbol: class TTypeId
  30. [ERROR] location: class org.apache.hadoop.hive.serde2.thrift.Type
  31. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/Type.java:[153,30] cannot find symbol
  32. [ERROR] symbol: class TTypeId
  33. [ERROR] location: class org.apache.hadoop.hive.serde2.thrift.Type
  34. [ERROR] /home/elbasir/hive/serde/src/java/org/apache/hadoop/hive/serde2/thrift/Type.java:[435,10] cannot find symbol
  35. [ERROR] symbol: class TTypeId
  36. [ERROR] location: class org.apache.hadoop.hive.serde2.thrift.Type
  37. [ERROR] -> [Help 1]
  38. [ERROR]
  39. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  40. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  41. [ERROR]
  42. [ERROR] For more information about the errors and possible solutions, please read the following articles:
  43. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  44. [ERROR]
  45. [ERROR] After correcting the problems, you can resume the build with the command
  46. [ERROR] mvn <goals> -rf :hive-serde

这是我的pom文件中的一些信息

  1. <groupId>org.apache.maven.plugins</groupId>
  2. <artifactId>maven-compiler-plugin</artifactId>
  3. <version>${maven.compiler.plugin.version}</version>
  4. </plugin>
  5. <plugin>
  6. <groupId>org.apache.maven.plugins</groupId>
  7. <artifactId>maven-antrun-plugin</artifactId>
  8. <version>${maven.antrun.plugin.version}</version>
  9. <dependencies>
  10. <dependency>
  11. <groupId>ant-contrib</groupId>
  12. <artifactId>ant-contrib</artifactId>
  13. <version>${ant.contrib.version}</version>
  14. <exclusions>
  15. <exclusion>
  16. <groupId>ant</groupId>
  17. <artifactId>ant</artifactId>
  18. </exclusion>
  19. </exclusions>
  20. </dependency>
  21. </dependencies>
  22. </plugin>
  23. <plugin>
  24. <groupId>org.apache.maven.plugins</groupId>
  25. <artifactId>maven-assembly-plugin</artifactId>
  26. <version>${maven.assembly.plugin.version}</version>
  27. </plugin>
  28. <plugin>
  29. <groupId>org.apache.maven.plugins</groupId>
  30. <artifactId>maven-eclipse-plugin</artifactId>
  31. <version>${maven.eclipse.plugin.version}</version>
  32. <configuration>
  33. <downloadJavadocs>true</downloadJavadocs>
  34. <downloadSources>true</downloadSources>
  35. <workspaceActiveCodeStyleProfileName>Hive</workspaceActiveCodeStyleProfileName>
  36. <workspaceCodeStylesURL>${basedir}/dev-support/eclipse-styles.xml</workspaceCodeStylesURL>
  37. </configuration>
  38. </plugin>
  39. <plugin>
  40. <groupId>org.apache.maven.plugins</groupId>
  41. <artifactId>maven-checkstyle-plugin</artifactId>
  42. <version>${maven.checkstyle.plugin.version}</version>
  43. </plugin>
  44. <plugin>
  45. <groupId>org.apache.maven.plugins</groupId>
  46. <artifactId>maven-enforcer-plugin</artifactId>
  47. <version>${maven.enforcer.plugin.version}</version>
  48. </plugin>
  49. <plugin>
  50. <groupId>org.apache.maven.plugins</groupId>
  51. <artifactId>maven-install-plugin</artifactId>
  52. <version>${maven.install.plugin.version}</version>
  53. </plugin>
  54. <plugin>
  55. <groupId>org.apache.maven.plugins</groupId>
  56. <artifactId>maven-shade-plugin</artifactId>
  57. <version>${maven.shade.plugin.version}</version>
  58. </plugin>
  59. <plugin>
  60. <groupId>org.apache.maven.plugins</groupId>
  61. <artifactId>maven-surefire-plugin</artifactId>
  62. <version>2.18.1</version>
  63. </plugin>
  64. <plugin>
  65. <groupId>org.apache.maven.plugins</groupId>
  66. <artifactId>maven-jar-plugin</artifactId>
  67. <version>${maven.jar.plugin.version}</version>
  68. <configuration>
  69. <archive>
  70. <manifest>
  71. <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  72. </manifest>
  73. </archive>
  74. </configuration>
  75. </plugin>
  76. <plugin>
  77. <groupId>org.apache.maven.plugins</groupId>
  78. <artifactId>maven-war-plugin</artifactId>
  79. <version>${maven.war.plugin.version}</version>
  80. </plugin>
  81. <plugin>
  82. <groupId>org.datanucleus</groupId>
  83. <artifactId>datanucleus-maven-plugin</artifactId>
  84. <version>${datanucleus.maven.plugin.version}</version>
  85. <dependencies>
  86. <dependency>
  87. <groupId>org.datanucleus</groupId>
  88. <artifactId>datanucleus-core</artifactId>
  89. <version>${datanucleus-core.version}</version>
  90. </dependency>
  91. </dependencies>
  92. </plugin>
  93. <plugin>
  94. <groupId>org.apache.felix</groupId>
  95. <artifactId>maven-bundle-plugin</artifactId>
  96. <version>${felix.version}</version>
  97. </plugin>
  98. <plugin>
  99. <groupId>org.apache.maven.plugins</groupId>
  100. <artifactId>maven-dependency-plugin</artifactId>
  101. <version>${maven.dependency.plugin.version}</version>
  102. </plugin>
  103. <plugin>
  104. <groupId>org.codehaus.mojo</groupId>
  105. <artifactId>build-helper-maven-plugin</artifactId>
  106. <version>${maven.build-helper.plugin.version}</version>
  107. </plugin>
  108. </plugins>
  109. </pluginManagement>
  110. <plugins>
  111. <!-- plugins are always listed in sorted order by groupId, artifectId -->
  112. <plugin>
  113. <groupId>org.apache.maven.plugins</groupId>
  114. <artifactId>maven-antrun-plugin</artifactId>
  115. <executions>
  116. <execution>
  117. <id>define-classpath</id>
  118. <phase>process-resources</phase>
  119. <goals>
  120. <goal>run</goal>
  121. </goals>
  122. <configuration>
  123. <exportAntProperties>true</exportAntProperties>
  124. <target>
  125. <property name="maven.test.classpath" refid="maven.test.classpath"/>
  126. </target>
  127. </configuration>
  128. </execution>
  129. <execution>
  130. <id>setup-test-dirs</id>
  131. <phase>process-test-resources</phase>
  132. <goals>
  133. <goal>run</goal>
  134. </goals>
  135. <configuration>
  136. <target>
  137. <delete dir="${test.tmp.dir}" />
  138. <delete dir="${test.conf.dir}" />
  139. <delete dir="${test.warehouse.dir}" />
  140. <mkdir dir="${test.tmp.dir}" />
  141. <mkdir dir="${test.warehouse.dir}" />
  142. <mkdir dir="${test.conf.dir}" />
  143. <!-- copies hive-site.xml so it can be modified -->
  144. <copy todir="${test.conf.dir}">
  145. <fileset dir="${basedir}/${hive.path.to.root}/data/conf/"/>
  146. </copy>
  147. </target>
  148. </configuration>
  149. </execution>
  150. </executions>
  151. </plugin>
  152. <plugin>
  153. <groupId>org.apache.maven.plugins</groupId>
  154. <artifactId>maven-clean-plugin</artifactId>
  155. <version>2.5</version>
  156. <configuration>
  157. <filesets>
  158. <fileset>
  159. <directory>./</directory>
  160. <includes>
  161. <include>datanucleus.log</include>
  162. <include>derby.log</include>
  163. </includes>
  164. <followSymlinks>false</followSymlinks>
  165. </fileset>
  166. <fileset>
  167. <directory>build</directory>
  168. <followSymlinks>false</followSymlinks>
  169. </fileset>
  170. </filesets>
  171. </configuration>
  172. </plugin>
  173. <plugin>
  174. <groupId>org.apache.maven.plugins</groupId>
  175. <artifactId>maven-checkstyle-plugin</artifactId>
  176. <configuration>
  177. <configLocation>${checkstyle.conf.dir}/checkstyle.xml</configLocation>
  178. <propertyExpansion>basedir=${checkstyle.conf.dir}</propertyExpansion>
  179. </configuration>
  180. </plugin>
  181. <plugin>
  182. <groupId>org.apache.maven.plugins</groupId>
  183. <artifactId>maven-enforcer-plugin</artifactId>
  184. <executions>
  185. <execution>
  186. <id>enforce-no-snapshots</id>
  187. <goals>
  188. <goal>enforce</goal>
  189. </goals>
  190. <configuration>
  191. <rules>
  192. <requireReleaseDeps>
  193. <message>Release builds are not allowed to have SNAPSHOT depenendencies</message>
  194. <searchTransitive>true</searchTransitive>
  195. <onlyWhenRelease>true</onlyWhenRelease>
  196. </requireReleaseDeps>
  197. </rules>
  198. <fail>true</fail>
  199. </configuration>
  200. </execution>
  201. <execution>
  202. <id>enforce-banned-dependencies</id>
  203. <goals>
  204. <goal>enforce</goal>
  205. </goals>
  206. <configuration>
  207. <rules>
  208. <bannedDependencies>
  209. <excludes>
  210. <!--LGPL licenced library-->
  211. <exclude>com.google.code.findbugs:annotations</exclude>
  212. </excludes>
  213. </bannedDependencies>
  214. </rules>
  215. <fail>true</fail>
  216. </configuration>
  217. </execution>
  218. </executions>
  219. </plugin>
  220. <plugin>
  221. <groupId>org.apache.maven.plugins</groupId>
  222. <artifactId>maven-surefire-plugin</artifactId>
  223. <configuration>
  224. <excludes>
  225. <exclude>**/TestSerDe.java</exclude>
  226. <exclude>**/TestHiveMetaStore.java</exclude>
  227. <exclude>**/ql/exec/vector/util/*.java</exclude>
  228. <exclude>**/ql/exec/vector/udf/legacy/*.java</exclude>
  229. <exclude>**/ql/exec/vector/udf/generic/*.java</exclude>
  230. <exclude>**/TestHiveServer2Concurrency.java</exclude>
  231. <exclude>${test.excludes.additional}</exclude>
  232. <exclude>${skip.spark.files}</exclude>
  233. </excludes>
  234. <redirectTestOutputToFile>true</redirectTestOutputToFile>
  235. <reuseForks>false</reuseForks>
  236. <failIfNoTests>false</failIfNoTests>
  237. <argLine>${maven.test.jvm.args}</argLine>
  238. <trimStackTrace>false</trimStackTrace>
  239. <additionalClasspathElements>
  240. <additionalClasspathElement>${test.conf.dir}</additionalClasspathElement>
  241. <additionalClasspathElement>${basedir}/${hive.path.to.root}/conf</additionalClasspathElement>
  242. </additionalClasspathElements>
  243. <environmentVariables>
  244. <TZ>US/Pacific</TZ>
  245. <LANG>en_US.UTF-8</LANG>
  246. <HADOOP_CLASSPATH>${test.conf.dir}:${basedir}/${hive.path.to.root}/conf</HADOOP_CLASSPATH>
  247. <HIVE_HADOOP_TEST_CLASSPATH>${test.hive.hadoop.classpath}</HIVE_HADOOP_TEST_CLASSPATH>
  248. <SPARK_SUBMIT_CLASSPATH>${spark.home}/lib/spark-assembly-${spark.version}-hadoop2.4.0.jar:${test.hive.hadoop.classpath}</SPARK_SUBMIT_CLASSPATH>
  249. <SPARK_OSX_TEST_OPTS>-Dorg.xerial.snappy.tempdir=/tmp -Dorg.xerial.snappy.lib.name=libsnappyjava.jnilib</SPARK_OSX_TEST_OPTS>
  250. <PATH>${env.PATH}${test.extra.path}</PATH>
  251. </environmentVariables>
  252. <systemPropertyVariables>
  253. <build.dir>${project.build.directory}</build.dir>
  254. <!-- required by zk test ClientBase -->
  255. <build.test.dir>${test.tmp.dir}</build.test.dir>
  256. <!-- required by a few tests to find the derby jar -->
  257. <derby.version>${derby.version}</derby.version>
  258. <derby.stream.error.file>${test.tmp.dir}/derby.log</derby.stream.error.file>
  259. <hadoop.bin.path>${hadoop.bin.path}</hadoop.bin.path>
  260. <!-- required by Hadoop's JobHistory -->
  261. <hadoop.log.dir>${test.tmp.dir}</hadoop.log.dir>
  262. <hive.root>${basedir}/${hive.path.to.root}/</hive.root>
  263. <hive.version>${project.version}</hive.version>
  264. <!-- required for hive-exec jar path and tests which reference a jar -->
  265. <maven.local.repository>${maven.repo.local}</maven.local.repository>
  266. <mapred.job.tracker>local</mapred.job.tracker>
  267. <log4j.configurationFile>${test.log4j.scheme}${test.conf.dir}/hive-log4j2.properties</log4j.configurationFile>
  268. <hive.test.console.log.level>${test.console.log.level}</hive.test.console.log.level>
  269. <log4j.debug>true</log4j.debug>
  270. <!-- don't diry up /tmp -->
  271. <java.io.tmpdir>${test.tmp.dir}</java.io.tmpdir>
  272. <spark.home>${spark.home}</spark.home>
  273. <!-- Hadoop's minidfs class uses this -->
  274. <test.build.data>${test.tmp.dir}</test.build.data>
  275. <!-- required by QTestUtil -->
  276. <test.data.files>${basedir}/${hive.path.to.root}/data/files</test.data.files>
  277. <test.data.dir>${basedir}/${hive.path.to.root}/data/files</test.data.dir>
  278. <test.tmp.dir>${test.tmp.dir}</test.tmp.dir>
  279. <test.tmp.dir.uri>${test.tmp.dir.uri}</test.tmp.dir.uri>
  280. <test.dfs.mkdir>${test.dfs.mkdir}</test.dfs.mkdir>
  281. <test.output.overwrite>${test.output.overwrite}</test.output.overwrite>
  282. <test.warehouse.dir>${test.warehouse.scheme}${test.warehouse.dir}</test.warehouse.dir>
  283. <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
  284. <!-- EnforceReadOnlyTables hook and QTestUtil -->
  285. <test.src.tables>src,src1,srcbucket,srcbucket2,src_json,src_thrift,src_sequencefile,srcpart,alltypesorc,src_hbase,cbo_t1,cbo_t2,cbo_t3,src_cbo,part,lineitem</test.src.tables>
  286. <java.security.krb5.conf>${test.conf.dir}/krb5.conf</java.security.krb5.conf>
  287. <!-- Required by spark to work around SPARK-14958 -->
  288. <antlr.version>${antlr.version}</antlr.version>
  289. <qfile>${qfile}</qfile>
  290. <initScript>${initScript}</initScript>
  291. <clustermode>${clustermode}</clustermode>
  292. <qfile_regex>${qfile_regex}</qfile_regex>
  293. <run_disabled>${run_disabled}</run_disabled>
  294. </systemPropertyVariables>
  295. </configuration>
  296. </plugin>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题