
大数据
koukan3
这个作者很懒,什么都没留下…
展开
-
python操作HDFS:pyhdfs
import pyhdfsfrom pyhdfs import HdfsExceptionimport osimport telnetlib as tnfrom flask import Flask,request,Responsefrom gevent.pywsgi import WSGIServerimport werkzeug'''python 操作HDFS。1.访问...原创 2019-10-31 13:32:01 · 1775 阅读 · 0 评论 -
(案例)Geomesa集成HBase和Spark:读写HBase
一、 需求从HBase集群中读取数据,并写入到集成了Geomesa 的HBase集群中。地理信息数据(点Point)需要保存为Geometry对象。二、遇到的问题1.使用Spark结合Geomesa写入HBase时,空指针异常NullPointerException执行以下代码写入HBase时,报空指针异常:dataFrame.write.format("geomesa")....原创 2019-12-05 16:39:19 · 2916 阅读 · 3 评论 -
python访问并操作elasticsearch中的数据
from elasticsearch6 import Elasticsearch'''python访问elasticsearch,进行如下操作:1.查询指定索引下的所有字段及其类型。2.获取指定索引中指定字段的数据。'''class MyEs(object): def __init__(self,host="localhost",port=9200): ...原创 2019-11-19 10:47:25 · 927 阅读 · 0 评论 -
Geomesa集成HBase:Geotools DataStore API 读写 HBase
import org.apache.commons.cli.CommandLine;import org.apache.commons.cli.Options;import org.apache.commons.cli.ParseException;import org.apache.commons.lang.StringUtils;import org.apache.hadoop.h...原创 2019-11-19 10:44:44 · 2319 阅读 · 1 评论 -
Spark读写HBase:处理纽约出租车数据
一、数据及部分代码来源:解析geojson数据:https://github.com/jwills/geojson纽约出租车数据:http://www.andresmh.com/nyctaxitrips/https://www1.nyc.gov/site/tlc/about/tlc-trip-record-data.page二、需求=====1.已经将2013年全年的出租车载...原创 2019-11-10 16:03:59 · 1549 阅读 · 2 评论 -
HBase批量入库/导入
一、理论知识(一)加载数据到HBase的三种方法:通过MR job,使用TableOutputFormat加载到表中。(效率较低) 核心的原理还是使用htable的put方法,不过由于使用了mapreduce分布式提交到hbase,速度比单线程效率高出许多。 通过客户端API,写入表中。(效率较低) 通过Bulk load 运行MR job将数据输出为hbase内部格式,再加载数据到...原创 2019-10-24 14:46:53 · 2032 阅读 · 0 评论 -
elasticsearch high level API 使用示例
<dependencies> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</arti...原创 2019-08-27 09:13:35 · 5393 阅读 · 0 评论 -
FastDFS API 使用示例
<dependencies> <dependency> <groupId>org.csource</groupId> <artifactId>fastdfs-client-java</artifactId> <version>...原创 2019-08-26 11:21:05 · 701 阅读 · 0 评论 -
HBase API 使用示例
<dependencies> <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-client</artifactId> <!--版本从2.1.0改为...原创 2019-08-26 11:17:29 · 1103 阅读 · 0 评论 -
HDFS API 使用示例
<dependencies> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-hdfs</artifactId> <version>2...原创 2019-08-26 11:11:34 · 562 阅读 · 0 评论