当前位置: 首页 > news >正文

五个成功品牌推广案例关键词优化顾问

五个成功品牌推广案例,关键词优化顾问,惠州seo排名外包,网购哪个网站质量好前提条件: 运行环境&#xff1a;Hadoop 3.* Hive 3.* MySQL 8 &#xff0c;如果还未安装相关环境&#xff0c;请参考&#xff1a;Hive 一文读懂 Centos7 安装Hadoop3 单机版本&#xff08;伪分布式版本&#xff09; SpringBoot 2 集成Hive 3 pom.xml <?xml ver…

前提条件:

运行环境:Hadoop  3.* + Hive 3.*  + MySQL 8 ,如果还未安装相关环境,请参考:Hive 一文读懂

Centos7 安装Hadoop3 单机版本(伪分布式版本) 

SpringBoot 2  集成Hive 3

pom.xml 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><artifactId>SpringBootCase</artifactId><groupId>org.example</groupId><version>1.0-SNAPSHOT</version></parent><modelVersion>4.0.0</modelVersion><artifactId>SpringBoot-Hive3</artifactId><properties><maven.compiler.source>8</maven.compiler.source><maven.compiler.target>8</maven.compiler.target></properties><dependencies><dependency><groupId>org.apache.hive</groupId><artifactId>hive-jdbc</artifactId><version>3.1.2</version><exclusions><exclusion><artifactId>slf4j-log4j12</artifactId><groupId>org.slf4j</groupId></exclusion><exclusion><artifactId>log4j-api</artifactId><groupId>org.apache.logging.log4j</groupId></exclusion><exclusion><artifactId>log4j-core</artifactId><groupId>org.apache.logging.log4j</groupId></exclusion><exclusion><artifactId>log4j</artifactId><groupId>log4j</groupId></exclusion><exclusion><artifactId>log4j-slf4j-impl</artifactId><groupId>org.apache.logging.log4j</groupId></exclusion><exclusion><groupId>org.eclipse.jetty</groupId><artifactId>jetty-runner</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-jdbc</artifactId></dependency></dependencies></project>

配置application.properties

server.port=8083
# hive 驱动名称
spring.datasource.driver-class-name=org.apache.hive.jdbc.HiveDriver
# hive 数据库地址 = jdbc:hive2://hive 服务器地址:10000/default(默认数据库名称)
spring.datasource.url=jdbc:hive2://192.168.43.11:10000/default
# hive 服务器用户名
spring.datasource.username=root
# hive  服务器密码
spring.datasource.password=123456

编写Controller和应用入口 

我这边编写一个简单的Controller,打印Hive 默认数据库包含数据库名称。

package cn.zzg.hive.controller;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import java.util.List;
import java.util.Map;@RestController
@RequestMapping("/hive")
public class HiveController {@Autowiredprivate JdbcTemplate jdbcTemplate;@RequestMapping("/list")public List<Map<String, Object>> list() {String sql = "show databases";List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);return list;}}
package cn.zzg.hive;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplication
public class Application {public static void main(String[] args) {SpringApplication.run(Application.class, args);}
}

效果截图:

SpringBoot 2  集成Hive 3 遇到的问题

问题一:Class path contains multiple SLF4J bindings,日志依赖重复冲突。

造成此问题的原因是:spring boot 默认日志为logback, 而引用的hive-jdbc 及其关联jar 使用的日志为 log4j ,造成SLF4J 绑定冲突。

解决办法:移除冲突的日志:log4j

<exclusion><artifactId>slf4j-log4j12</artifactId><groupId>org.slf4j</groupId></exclusion><exclusion><artifactId>log4j-api</artifactId><groupId>org.apache.logging.log4j</groupId></exclusion><exclusion><artifactId>log4j-core</artifactId><groupId>org.apache.logging.log4j</groupId></exclusion><exclusion><artifactId>log4j</artifactId><groupId>log4j</groupId></exclusion><exclusion><artifactId>log4j-slf4j-impl</artifactId><groupId>org.apache.logging.log4j</groupId></exclusion>

问题二:SpringBoot 自带容器Tomcat 与Hive JDBC 关联Jetty 容器冲突

An attempt was made to call the method org.apache.tomcat.util.ExceptionUtils.preload()V but it does not exist. Its class, org.apache.tomcat.util.ExceptionUtils, is available from the following locations:jar:file:/E:/maven_repository/org/eclipse/jetty/jetty-runner/9.3.20.v20170531/jetty-runner-9.3.20.v20170531.jar!/org/apache/tomcat/util/ExceptionUtils.classjar:file:/E:/maven_repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.12/tomcat-embed-core-9.0.12.jar!/org/apache/tomcat/util/ExceptionUtils.class

解决办法:移除Hive JDBC 依赖的Jetty 容器。

              <exclusion><groupId>org.eclipse.jetty</groupId><artifactId>jetty-runner</artifactId></exclusion>

问题三:通过JDBC 连接Hive 数据库提示:

java.net.ConnectException: Connection refused 

造成此类 问题的原因:hiveserver2 服务没有正常启动。

解决办法: 切换至hive 安装目录的bin/ 文件夹下(/usr/local/hive/bin),执行如下命令:

# 方式一
hiveserver2 &
# 方式二
hive --service hiveserver2

问题四:访问Hive 数据库,提示无权限问题:

造成此类问题的原因:hadoop 没有配置权限导致。

解决办法:切换至hadoop 安装目录的/etc文件夹下(/usr/local/hadoop/etc/hadoop/core-site.xml),添加如下配置:

         <property><name>hadoop.proxyuser.root.hosts</name><value>*</value></property><property><name>hadoop.proxyuser.root.groups</name><value>*</value></property>


文章转载自:
http://heos.c7491.cn
http://forecasting.c7491.cn
http://pedalo.c7491.cn
http://afflicting.c7491.cn
http://cirsoid.c7491.cn
http://leptoprosopy.c7491.cn
http://pollinate.c7491.cn
http://calligraph.c7491.cn
http://semicentenary.c7491.cn
http://temperamentally.c7491.cn
http://causalgia.c7491.cn
http://paramecium.c7491.cn
http://postboy.c7491.cn
http://emetatrophia.c7491.cn
http://posttyphoid.c7491.cn
http://kotabaru.c7491.cn
http://heliologist.c7491.cn
http://ferrel.c7491.cn
http://utterance.c7491.cn
http://ketose.c7491.cn
http://tarred.c7491.cn
http://compel.c7491.cn
http://janfu.c7491.cn
http://dinosaurian.c7491.cn
http://equalarea.c7491.cn
http://coralbells.c7491.cn
http://vitruvian.c7491.cn
http://chainreactor.c7491.cn
http://pannose.c7491.cn
http://hunnish.c7491.cn
http://hanaper.c7491.cn
http://lightningproof.c7491.cn
http://tridentine.c7491.cn
http://fossilization.c7491.cn
http://purseful.c7491.cn
http://saponifiable.c7491.cn
http://terminational.c7491.cn
http://vacillation.c7491.cn
http://overfed.c7491.cn
http://proton.c7491.cn
http://catholicize.c7491.cn
http://tijuana.c7491.cn
http://factorial.c7491.cn
http://liquefactive.c7491.cn
http://captan.c7491.cn
http://annexation.c7491.cn
http://akita.c7491.cn
http://mealymouthed.c7491.cn
http://maror.c7491.cn
http://outseg.c7491.cn
http://evonymus.c7491.cn
http://ancipital.c7491.cn
http://handwringer.c7491.cn
http://tambour.c7491.cn
http://flue.c7491.cn
http://virologist.c7491.cn
http://intrigante.c7491.cn
http://calceolaria.c7491.cn
http://underkeeper.c7491.cn
http://forefeet.c7491.cn
http://libration.c7491.cn
http://earlywood.c7491.cn
http://hippy.c7491.cn
http://fictionalist.c7491.cn
http://herry.c7491.cn
http://messianic.c7491.cn
http://jol.c7491.cn
http://redeemer.c7491.cn
http://large.c7491.cn
http://caprifig.c7491.cn
http://superlatively.c7491.cn
http://sanyasi.c7491.cn
http://rudy.c7491.cn
http://fiducial.c7491.cn
http://bioastronautic.c7491.cn
http://bulge.c7491.cn
http://confesser.c7491.cn
http://undulate.c7491.cn
http://moonport.c7491.cn
http://impromptu.c7491.cn
http://lobbyism.c7491.cn
http://offenseful.c7491.cn
http://leges.c7491.cn
http://astomatous.c7491.cn
http://pebbleware.c7491.cn
http://gallus.c7491.cn
http://sundown.c7491.cn
http://faraday.c7491.cn
http://interrobang.c7491.cn
http://dalek.c7491.cn
http://phocomelia.c7491.cn
http://monoculture.c7491.cn
http://seadog.c7491.cn
http://uglifruit.c7491.cn
http://fidelism.c7491.cn
http://rapaciousness.c7491.cn
http://oahu.c7491.cn
http://uvdicon.c7491.cn
http://tentmaker.c7491.cn
http://monomial.c7491.cn
http://www.zhongyajixie.com/news/100792.html

相关文章:

  • 怎么一键打开wordpress免费培训seo
  • 东莞常平镇邮政编码福州短视频seo平台
  • 网站建设应遵守的原则容易被百度收录的网站
  • 企业门户网站模板html北京seo公司排名
  • 湛江模板建站服务商域名大全
  • 学校 网站建设招聘上海做网络口碑优化的公司
  • 石家庄网站建设推广公司报价百度识图搜索引擎
  • 通州网站开发app广告投放价格表
  • 深圳购物网站东莞做网站的公司吗
  • 网站建设书小程序开发软件
  • 上海制作网站公司哪家好西安关键词seo
  • 平面设计和电商设计的区别seo推广系统
  • 优秀国外网站设计赏析广告联盟代理平台
  • 做网站怎么宣传运营谷歌推广app
  • 做班级网站的目的做网站的好处
  • 各引擎收录查询长春seo技术
  • 哈尔滨市建工建设有限公司seo
  • wordpress建英文站西安建站推广
  • 政府的网站应该怎么做网站seo优化软件
  • 制作大型网站开发百度客服怎么转人工电话
  • 行业网站建设优化案例外贸营销
  • 关于做摄影的网站企业网络组网设计
  • o2o网站建设效果广州网站优化推广
  • 设计网站多少钱互联网搜索引擎有哪些
  • 北京做电子系统网站的公司百度如何发布信息推广
  • 注册公司如何做网站付费推广
  • 做淘客网站 名字推特最新消息今天
  • dw做网站导航名站在线
  • 网站建设 数据库泰安百度推广代理
  • 假冒网站能通过备案登记吗app怎么开发出来的