1:Hive安装的过程(Hive启动的时候报的错误),贴一下错误,和为什么错,以及解决方法:
1 [root@master bin]# ./hive 2 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.input.dir.recursive is deprecated. Instead, use mapreduce.input.fileinputformat.input.dir.recursive 3 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.max.split.size is deprecated. Instead, use mapreduce.input.fileinputformat.split.maxsize 4 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.min.split.size is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize 5 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.min.split.size.per.rack is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize.per.rack 6 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.min.split.size.per.node is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize.per.node 7 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces 8 17/12/11 23:22:56 INFO Configuration.deprecation: mapred.reduce.tasks.speculative.execution is deprecated. Instead, use mapreduce.reduce.speculative 9 [Fatal Error] hive-site.xml:5:2: The markup in the document following the root element must be well-formed. 10 17/12/11 23:22:57 FATAL conf.Configuration: error parsing conf file:/home/hadoop/hive-0.12.0/conf/hive-site.xml 11 org.xml.sax.SAXParseException; systemId: file:/home/hadoop/hive-0.12.0/conf/hive-site.xml; lineNumber: 5; columnNumber: 2; The markup in the document following the root element must be well-formed. 12 at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257) 13 at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347) 14 at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150) 15 at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2173) 16 at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2161) 17 at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2229) 18 at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2195) 19 at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2102) 20 at org.apache.hadoop.conf.Configuration.get(Configuration.java:1068) 21 at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:1141) 22 at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:1087) 23 at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:74) 24 at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58) 25 at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:630) 26 at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614) 27 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 28 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 29 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 30 at java.lang.reflect.Method.invoke(Method.java:606) 31 at org.apache.hadoop.util.RunJar.main(RunJar.java:212) 32 Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId: file:/home/hadoop/hive-0.12.0/conf/hive-site.xml; lineNumber: 5; columnNumber: 2; The markup in the document following the root element must be well-formed. 33 at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2338) 34 at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2195) 35 at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2102) 36 at org.apache.hadoop.conf.Configuration.get(Configuration.java:1068) 37 at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:1141) 38 at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:1087) 39 at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:74) 40 at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58) 41 at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:630) 42 at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614) 43 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 44 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 46 at java.lang.reflect.Method.invoke(Method.java:606) 47 at org.apache.hadoop.util.RunJar.main(RunJar.java:212) 48 Caused by: org.xml.sax.SAXParseException; systemId: file:/home/hadoop/hive-0.12.0/conf/hive-site.xml; lineNumber: 5; columnNumber: 2; The markup in the document following the root element must be well-formed. 49 at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257) 50 at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347) 51 at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150) 52 at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2173) 53 at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2161) 54 at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2229) 55 ... 14 more
2:我的错误主要是配置Hive-site.xml的时候少写了开头和结尾的<configuration></configuration>,导致的错误,下面贴一下这个配置文件易错的地方:
1 <!--开头和结尾,一定不要忘记--> 2 <configuration> 3 <property> 4 <name>javax.jdo.option.ConnectionURL</name> 5 <!--自己的主机名称或者localhost--> 6 <value>jdbc:mysql://主机名称:3306/hive?createDatabaseIfNotExist=true</value> 7 </property> 8 <property> 9 <name>javax.jdo.option.ConnectionDriverName</name> 10 <value>com.mysql.jdbc.Driver</value> 11 </property> 12 <property> 13 <name>javax.jdo.option.ConnectionUserName</name> 14 <!--mysql的账号--> 15 <value>root</value> 16 </property> 17 <property> 18 <name>javax.jdo.option.ConnectionPassword</name> 19 <!--自己mysql的密码哦--> 20 <value>123456</value> 21 </property> 22 </configuration>
停更......
天霸动霸tua,加油.....
2017-12-12 15:32:47