[mysql57-community] name=MySQL 5.7 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/ enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
再次安装即可
3、启动MySQL服务
1 2 3
service mysqld start -- 或者 systemctl start mysqld.service
# Set HADOOP_HOME to point to a specific hadoop install directory export HADOOP_HOME=/export/servers/hadoop-3.3.1 #hadoop安装路径
# Hive Configuration Directory can be controlled by: export HIVE_CONF_DIR=/export/servers/apache-hive-3.1.2-src/conf #hive路径
# Folder containing extra libraries required for hive compilation/execution can be controlled by: export HIVE_AUX_JARS_PATH=/export/servers/apache-hive-3.1.2-src/lib #hivejar包路径
Exception in thread “main” java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x8 at [row,col,system-id]: [3278,96,”file:/export/servers/apache-hive-3.1.2-bin/conf/hive-site.xml”]
[root@hadoop1 apache-hive-3.1.2-bin]# schematool -dbType mysql -initSchema Exception in thread "main" java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x8 at [row,col,system-id]: [3278,96,"file:/export/servers/apache-hive-3.1.2-bin/conf/hive-site.xml"] at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3069) at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:3018) at org.apache.hadoop.conf.Configuration.loadProps(Configuration.java:2893) at org.apache.hadoop.conf.Configuration.addResourceObject(Configuration.java:1034) at org.apache.hadoop.conf.Configuration.addResource(Configuration.java:939) at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:5151) at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:5104) at org.apache.hive.beeline.HiveSchemaTool.<init>(HiveSchemaTool.java:96) at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:1473) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hadoop.util.RunJar.run(RunJar.java:323) at org.apache.hadoop.util.RunJar.main(RunJar.java:236) Caused by: com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x8 at [row,col,system-id]: [3278,96,"file:/export/servers/apache-hive-3.1.2-bin/conf/hive-site.xml"] at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:634) at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:504) at com.ctc.wstx.sr.StreamScanner.reportIllegalChar(StreamScanner.java:2469) at com.ctc.wstx.sr.StreamScanner.validateChar(StreamScanner.java:2416) at com.ctc.wstx.sr.StreamScanner.resolveCharEnt(StreamScanner.java:2382) at com.ctc.wstx.sr.StreamScanner.fullyResolveEntity(StreamScanner.java:1528) at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2818) at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1121) at org.apache.hadoop.conf.Configuration$Parser.parseNext(Configuration.java:3373) at org.apache.hadoop.conf.Configuration$Parser.parse(Configuration.java:3159) at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3052) ... 14 more
进入hive-site.xml文件,跳转到对应行,删除里面的******特殊字符即可
报错原因3:
问题 Exception in thread “main” java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative
一、问题
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D at org.apache.hadoop.fs.Path.initialize(Path.java:254) at org.apache.hadoop.fs.Path.<init>(Path.java:212) at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:663) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:586) at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:553) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:750) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:686) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.hadoop.util.RunJar.run(RunJar.java:234) at org.apache.hadoop.util.RunJar.main(RunJar.java:148) Caused by: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D at java.net.URI.checkPath(URI.java:1823) at java.net.URI.<init>(URI.java:745) at org.apache.hadoop.fs.Path.initialize(Path.java:251)
beeline>!connect jdbc:hive2://hadoop1:10000 #默认端口号是10000 Connecting to jdbc:hive2://hadoop1:10000 #输入账号密码 Enter username for jdbc:hive2://hadoop1:10000: root Enter password for jdbc:hive2://hadoop1:10000: ****** #可为空
//创建表 并指定分隔符 createtable itheima.person_nature( id int comment "人物id", --人物id name string comment "人物名称", --人物名称 attack int comment "攻击力", --攻击力 defense int comment "防御力", -- 防御力 magic int comment "魔法值", --魔法值 type string comment "类型"--类型 ) row format delimited fields terminated by "\t";
//查询表所有字段 select*from itheima.person_nature;
//删除表 droptable itheima.person_nature ;
--查询所有库 show databases ; show schemas ; --查询当前库有表 show tables; --查询某个库所有表 show tables in itheima; -- 查询某个表的元信息 desc formatted itheima.person_nature;