bigdata
文章平均质量分 55
清山随笔
这个作者很懒,什么都没留下…
展开
-
执行安装redis报错undefined reference to `__sync_add_and_fetch_4\'
执行make命令时报错:zmalloc.o: In function `zmalloc_used_memory':/var/lib/tcommsvr/redis-2.8.0-rc4/src/zmalloc.c:223: undefined reference to `__sync_add_and_fetch_4'collect2: ld returned 1 exit statusmake[1]:原创 2014-09-18 16:27:51 · 840 阅读 · 0 评论 -
paxos算法学习总结
Edit需求:一个分布式系统如何就某一个值达成一致,即在分布式系统中数据的一致性需要。在一个分布式数据库系统中,如果各节点的初始状态一致,每个节点都执行相同的操作序列,那么他们最后能得到一个一致的状态。为了保证每个节点都执行相同的命令序列,需要在每一条指令上执行一个“一致性算法”以保证每个节点看到的指令一致。这就涉及到一个节点通信的问题,节点通信为保持数据一致性,其通信模型有两个:共享内存(sha原创 2016-12-10 16:58:18 · 551 阅读 · 0 评论 -
Hive基础知识补遗
Hive学习途径: 1、官网:http://hive.apache.org/2、慕课网:Hive相关入门课程3、《Hadoop实战》第二版4、网络上各种相关Blog以及相关介绍(主要用来进行问题查找解疑) Hive的定义与功能: 定义hive 含义为蜂巢,百度百科定义为:hive是基于Hadoop的一个数据仓库工具,可以将结构化的数据文件映射为一张数据库表,并提供简单的sql原创 2016-12-10 16:58:15 · 361 阅读 · 0 评论 -
hive自定义函数
这是个很有用的功能,用来处理自己的业务逻辑1、需要引入的jar包(maven) org.apache.hadoop hadoop-common 2.7.1 org.apache.hive hive-jdbc 1.2.1 org.apache.hive hive-exec 1.2.1 jdk.tools jdk.tools原创 2016-12-10 16:58:13 · 306 阅读 · 0 评论 -
hive的条件函数case
case用法示例select id,userid,case title when 'test_title_2' then userid+1 else userid+10 end from article;从article(id,userid,article,content)表中将标题为‘test_title_2’的记录其userid+1,其他的记录userid+10coalesce用法示例:sel原创 2016-12-10 16:58:10 · 810 阅读 · 0 评论 -
hive中设置查询不启动mapreduce作业(默认不启动)hive-site.xml关键配置
hive.fetch.task.conversion more Expects one of [none, minimal, more]. Some select queries can be converted to single FETCH task minimizing latency. Currently the query should be原创 2016-12-10 16:58:07 · 1096 阅读 · 0 评论 -
执行sqoop导入MySQL数据到HDFS出错,异常:The auxService:mapreduce_shuffle does not exist
执行sqoop导入MySQL数据到HDFS出错,异常如下:15/11/15 08:04:23 INFO mapreduce.Job: Task Id : attempt_1446112127610_0004_m_000000_0, Status : FAILEDContainer launch failed for container_1446112127610_0004_01_000002 :原创 2016-12-10 16:58:04 · 1116 阅读 · 0 评论 -
sqoop数据导入导出常用功能
sqoop wget下来解压后即可使用,常用的导入导出语句为://导入到HDFS中./sqoop import --connect jdbc:mysql://localhost:3306/kbs --username hive --password 123456 --table user --columns 'username,address' -m 1 --target-dir '/sqoop/原创 2016-12-10 16:58:01 · 688 阅读 · 0 评论 -
hive的安装使用总结
折腾了三天,断断续续,到今天周五,终于搞定了,安装好Hive后,执行bin中的hive即可进入直接输入 show tables;或者先启动hiveserver2,然后运行beeline,然后连接DB,执行show tables;连接DB的语句:!connect jdbc:hive2://host:10000用户名密码直接用配置好的的MySQL用户名密码即可 beeline> show tables原创 2016-12-10 16:57:59 · 4006 阅读 · 0 评论 -
hive异常:创建MySQL时Specified key was too long; max key length is 1000 bytes
2015-11-13 14:44:44,681 ERROR [main]: DataNucleus.Datastore (Log4JLogger.java:error(115)) - An exception was thrown while adding/validating class(es) : Specified key was too long; max key length is 10原创 2016-12-10 16:57:56 · 993 阅读 · 0 评论 -
hive异常 java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7
2015-11-13 15:05:16,289 INFO [main]: server.HiveServer2 (HiveServer2.java:startHiveServer2(368)) - Exception caught when calling stop of HiveServer2 before retrying startjava.lang.NullPointerExceptio原创 2016-12-10 16:57:53 · 3911 阅读 · 1 评论 -
linux安装JDK1.8、tomcat8、Maven3.2、Scala2.10、Spark1.3.0
下载JDK1.8、tomcat8、Maven、Spark、Scalawget http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gzwget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.0.22/bin/apache-tomcat-8.原创 2016-12-10 16:57:48 · 739 阅读 · 0 评论 -
redis源码分析(一)
今日起,结合已经看过的所有的redis的命令以及高级属性,做redis的源码级别的分析。redis-2.8-7先说 list集合,主要两个文件adlist.c 以及adlist.h这个和java中定义的list区别不大,就是自己实现了一遍adlist.c/* Add a new node to the list, to head, contaning the specified 'value' *原创 2014-09-18 16:28:13 · 494 阅读 · 0 评论 -
redis性能测试
前段时间测试了写文件的性能,实在不咋滴,改测试了下redis的写入性能。多线程写入:package com.sides.redis;import java.util.Iterator;import java.util.List;import java.util.Map;import java.util.concurrent.Callable;import org.apache.log4j.Logg原创 2014-09-18 16:28:08 · 500 阅读 · 0 评论 -
读取redis中的数据时出现:MISCONF Redis is configured to save RDB snapshots
以下为异常详细信息:Exception in thread "main" redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that m原创 2014-09-18 16:28:01 · 7685 阅读 · 1 评论 -
有关NoSQL的一点理论知识
在 理论计算机科学中, CAP定理(CAP theorem), 又被称作 布鲁尔定理(Brewer's theorem), 它指出对于一个 分布式计算系统 来说,不可能同时满足以下三点: 一致性(Consistency) (所有节点在同一时间具有相同的数据) 可用性(Availability) (保证每个请求不管成功或者失败都有响应) 分隔容忍(Partition tolerance) (系统中任原创 2014-09-18 16:27:56 · 418 阅读 · 0 评论 -
redis 2.8.6安装报错解决
zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directoryzmalloc.h:55:2: error: #error "Newer version of jemalloc required"make[1]: *** [adlist.o] Error 1make[1]: Leaving directory `/da原创 2014-09-18 16:28:11 · 445 阅读 · 0 评论 -
MongoDB的权限控制
权限控制API所有数据库的角色控制首先在启用权限控制时,需要在启动MongoDB时指定启动,可以通过配置文件或启动命令添加:原创 2017-03-08 17:37:14 · 672 阅读 · 0 评论