elasticsearch2.1 elasticsearch-hadoop安装

1、下载elasticsearch-hadoop-2.2.0beta1.jar,拷贝到hive的lib目录中,然后以如下方式打开hive命令窗口:
bin/hive -hiveconf hive.aux.jars.path=/root/hive/lib/elasticsearch-hadoop- 2.2.0 beta1.jar
这个也可以写在hive的配置文件中,
<property>
        <name>hive.aux.jars.path</name>
        <value>hdfs://ns/path/elasticsearch-hadoop.jar</value>
       <description>A comma separated list (with no spaces) of the jar files</description>
</property>
2、创建表
CREATE TABLE es(location STRING, url STRING) 
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' 
TBLPROPERTIES('es.resource' = 'test/share',
'es.index.auto.create' = 'true','es.nodes'='customercenter1,customercenter2,customercenter3,customercenter4','es.port'='9200');


由于在 Elasticsearch for hive搭建时, Elasticsearch使用的是官方最新版本,而 Elasticsearch for  hadoop的 插件包版本更新不及时,导致在环境搭建的时候出现了问题
 Elasticsearch for Apache Hadoop 2.1.0版本及前版本不支持最新的 Elasticsearch2.1.0导致遇到兼容性问题如下:
Elasticsearch for Apache Hadoop 2.1.1版本开始做了版本限制,详情如下:
Elasticsearch for Apache Hadoop 2.2.0 beta1开始对 Elasticsearch2.x版本做了兼容
在使用 Elasticsearch for Apache Hadoop 2.2.0 beta1过程中一直遇到以下问题:
经过修改源码打印日志发现是rest API返回结果变了
Elasticsearch1.7的 /_nodes/transport  rest API返回结果

Elasticsearch2.1 /_nodes/transport  rest API返回结果

现已修改解析http_address部分源代码StringUtils.java:


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
The Hadoop ecosystem is a de-facto standard for processing terra-bytes and peta-bytes of data. Lucene-enabled Elasticsearch is becoming an industry standard for its full-text search and aggregation capabilities. Elasticsearch-Hadoop serves as a perfect tool to bridge the worlds of Elasticsearch and Hadoop ecosystem to get best out of both the worlds. Powered with Kibana, this stack makes it a cakewalk to get surprising insights out of your massive amount of Hadoop ecosystem in a flash. In this book, you'll learn to use Elasticsearch, Kibana and Elasticsearch-Hadoop effectively to analyze and understand your HDFS and streaming data. You begin with an in-depth understanding of the Hadoop, Elasticsearch, Marvel, and Kibana setup. Right after this, you will learn to successfully import Hadoop data into Elasticsearch by writing MapReduce job in a real-world example. This is then followed by a comprehensive look at Elasticsearch essentials, such as full-text search analysis, queries, filters and aggregations; after which you gain an understanding of creating various visualizations and interactive dashboard using Kibana. Classifying your real-world streaming data and identifying trends in it using Storm and Elasticsearch are some of the other topics that we'll cover. You will also gain an insight about key concepts of Elasticsearch and Elasticsearch-hadoop in distributed mode, advanced configurations along with some common configuration presets you may need for your production deployments. You will have “Go production checklist” and high-level view for cluster administration for post-production. Towards the end, you will learn to integrate Elasticsearch with other Hadoop eco-system tools, such as Pig, Hive and Spark.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值