06 2017 档案

摘要:lz 工作第一年公司对代码风格有很严格的要求,那种要求类似C++,现在想想还是eclipse自带的格式好看一些。而在scala中这种风格还有这样的作用 阅读全文
posted @ 2017-06-30 15:10 牵牛花 阅读(126) 评论(0) 推荐(0) 编辑
摘要:1、次方法用于没有一点提示的情况:依次打开eclipse上面的windows ——preferences ——java ——editor —— content assist ,在右上方有一行“select the proposal kinds contained in the 'default' c 阅读全文
posted @ 2017-06-30 14:12 牵牛花 阅读(1979) 评论(0) 推荐(0) 编辑
摘要:-- 配置环境变量,因为在hbase中有的地方可能用到了环境变量-- bin/start-hbase.sh-- bin/hbase shell-- 访问http://mini0:16010/ 可以看浏览器页面名称 命令表达式 查看所有表 list list 创建表 create '表名', '列族名1','列族名2','列族名N' create 'www.qq.com2017... 阅读全文
posted @ 2017-06-30 11:09 牵牛花 阅读(965) 评论(0) 推荐(0) 编辑
摘要:首先,hadoop集群已经安装好了,可以正常运行。 修改log4j文件 可选cp hive-log4j.properties.template hive-log4j.properties 将EventCounter修改成org.apache.hadoop.log.metrics.EventCoun 阅读全文
posted @ 2017-06-28 16:24 牵牛花 阅读(311) 评论(0) 推荐(0) 编辑
摘要:如果.不在PATH里面,要执行当前目录下的可执行文件,使用全路径: ./executable-file PATH是环境变量,如果将当前目录“./”添加到环境变量中,那么也可以不用“./”,直接输入当前目录下有可执行权限的可执行文件就可以运行了 如果要执行一个sh脚本,不管那个脚本有没有可执行权限,都 阅读全文
posted @ 2017-06-28 11:09 牵牛花 阅读(337) 评论(0) 推荐(0) 编辑
摘要:1.hadoop-env.sh中配置JAVA_HOME yarn-env.sh 配置hadoop_yarn_user为hadoop_Home core-site.xml,其中hadoop.tmp.dir 很重要,指定了镜像文件放在那里,如果不指定是系统的/tmp文件夹,而且没有子文件夹! hdfs- 阅读全文
posted @ 2017-06-28 09:43 牵牛花 阅读(305) 评论(0) 推荐(0) 编辑
摘要:问题描述 运行hadoop的MapReduce示例,在running job卡住 在页面中显示一直处于 ACCEPTED Applications 状态 修改日志级别export HADOOP_ROOT_LOGGER=DEBUG,console查看下详细信息 DEBUG crypto.Openssl 阅读全文
posted @ 2017-06-27 22:40 牵牛花 阅读(723) 评论(0) 推荐(0) 编辑
摘要:这个教程是2.4.1的 ,但是亲测对于2.6.5,是可以用的,对2.5.4应该也是支持的 1.准备Linux环境 1.0先将虚拟机的网络模式选为NAT 1.1修改主机名 vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=itcast ### 1.2修 阅读全文
posted @ 2017-06-27 17:12 牵牛花 阅读(177) 评论(0) 推荐(0) 编辑
摘要:网站点击流日志分析,客户画像,推荐系统,bi系统 阅读全文
posted @ 2017-06-27 14:13 牵牛花 阅读(140) 评论(0) 推荐(0) 编辑
摘要:节点有两种类型 短暂类型的,持久类型的 znode有四种形式的目录节点,默认是persistent 阅读全文
posted @ 2017-06-27 09:02 牵牛花 阅读(508) 评论(0) 推荐(0) 编辑
摘要:http://blog.jobbole.com/78960/ 阅读全文
posted @ 2017-06-24 12:01 牵牛花 阅读(384) 评论(0) 推荐(0) 编辑
摘要:redis中各种数据类型对应的jedis操作命令 jedispool使用自动归还jedis解决方案 阅读全文
posted @ 2017-06-24 10:51 牵牛花 阅读(237) 评论(0) 推荐(0) 编辑
摘要:http://www.tuicool.com/articles/IRvUJbN http://tengj.top/2016/05/06/threadvolatile4/?utm_source=tuicool&utm_medium=referral 阅读全文
posted @ 2017-06-24 09:24 牵牛花 阅读(97) 评论(0) 推荐(0) 编辑
摘要:Redis的事务 阅读全文
posted @ 2017-06-23 21:19 牵牛花 阅读(127) 评论(0) 推荐(0) 编辑
摘要:http://www.redis.cn/commands/expire.html 附录: Redis 过期时间 Keys的过期时间 通常Redis keys创建时没有设置相关过期时间。他们会一直存在,除非使用显示的命令移除,例如,使用DEL命令。 EXPIRE一类命令能关联到一个有额外内存开销的ke 阅读全文
posted @ 2017-06-23 13:58 牵牛花 阅读(2959) 评论(0) 推荐(0) 编辑
摘要:Redis:Remote Directionary Server (远程字典服务器) linux 下安装redis step1 解压 $ mkdir /usr/local/redis $ cd /usr/local/src $ wget http://redis.googlecode.com/fil 阅读全文
posted @ 2017-06-21 15:49 牵牛花 阅读(107) 评论(0) 推荐(0) 编辑
摘要:Linux查看系统信息的一些命令及查看已安装软件包的命令 centos下如何查看某个软件是否安装http://www.landui.com/help/show-3959.html CentOS 下 rpm包与 yum 安装与卸载 1.安装包都是以rpm结尾的。2.yum是从网络安装源(例如网易镜像, 阅读全文
posted @ 2017-06-20 21:32 牵牛花 阅读(197) 评论(0) 推荐(0) 编辑
摘要:在这个配置文件中 原本 如果使用自定义注解那么就要启用 http://www.tuicool.com/articles/NRBraev 阅读全文
posted @ 2017-06-20 11:15 牵牛花 阅读(964) 评论(0) 推荐(0) 编辑
摘要:cnetos 6.7彻底解决vmware NAT网络问题 vmnet8在nat时使用 vmnet1 在桥接时使用 *解决Windows不能ping通linux的问题 vmnet8相当于一个网卡,虚拟机使用的 虚拟网络编辑器相当于路由器的作用, vmnet8的ip和虚拟网络编辑器的ip应该在同一个网段 阅读全文
posted @ 2017-06-18 18:06 牵牛花 阅读(514) 评论(0) 推荐(0) 编辑
摘要:http://www.blogjava.net/paulwong/archive/2016/04/20/430162.html https://github.com/leiguorui/dubboss http://www.cnblogs.com/jiangzhengjun/p/6349238.ht 阅读全文
posted @ 2017-06-17 08:59 牵牛花 阅读(135) 评论(0) 推荐(0) 编辑
摘要:使用Spring MVC统一异常处理实战 这个链接讲的很好 异常的继承 在项目中可以用定义三种异常,分别继承runtimeException,IOException,SQLException 阅读全文
posted @ 2017-06-16 15:40 牵牛花 阅读(102) 评论(0) 推荐(0) 编辑
摘要:版本:5.9.0 修改conf/activemp.xml 访问 :http://localhost:8161/admin/ 阅读全文
posted @ 2017-06-14 21:40 牵牛花 阅读(178) 评论(0) 推荐(0) 编辑
摘要:package cn.example.socket; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintW... 阅读全文
posted @ 2017-06-14 18:06 牵牛花 阅读(252) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/kntao/article/details/49278239 http://flume.apache.org/FlumeUserGuide.html#exec-source 默认的是是SequenceFile所以数据存在hdfs上通过命令查看的时候会是乱码, 阅读全文
posted @ 2017-06-11 09:32 牵牛花 阅读(806) 评论(0) 推荐(0) 编辑
摘要:ln /home/hadoop/test.dat /home/hadoop/aaa 默认创建硬链接, ln -s /home/hadoop/test.dat /home/hadoop/test.dat.ln 创建软链接 软链接相当于一个指向页面的url。删除这个URL页面还在,只是页面的一种访问方式 阅读全文
posted @ 2017-06-11 09:07 牵牛花 阅读(145) 评论(0) 推荐(0) 编辑
摘要:http://flume.apache.org/FlumeUserGuide.html A simple example 阅读全文
posted @ 2017-06-11 08:50 牵牛花 阅读(137) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/desilting/article/details/45505121 阅读全文
posted @ 2017-06-11 07:59 牵牛花 阅读(74) 评论(0) 推荐(0) 编辑
摘要:首先要启动hdfs, 使用telnet通信就可以做测试,如果是其他机器访问的那么netcat要配置成ip而不是localhost,netcat默认读取字符长度是16个数字,可以设置更大 启动flume 之后 telnet mini2 44444 文件系统 到hdfs 阅读全文
posted @ 2017-06-10 21:49 牵牛花 编辑
摘要:下载 http://vault.centos.org/6.6/os/x86_64/Packages/nc-1.84-22.el6.x86_64.rpm rpm -iUv nc-1.84-22.el6.x86_64.rpm http://www.2cto.com/os/201306/220971.ht 阅读全文
posted @ 2017-06-10 21:17 牵牛花 阅读(6532) 评论(0) 推荐(0) 编辑
摘要:step1:类放在com.xxx.lobs.manager.impl下面,方法名字是update2,预期结果正常执行,结果正常 step2:将测试类放在这个包中com.xxx.lobs.manager.impl.test 预期结果,不能正常执行,结果报错不能获取事务(org.hibernate.Hi 阅读全文
posted @ 2017-06-09 11:08 牵牛花 阅读(831) 评论(0) 推荐(0) 编辑
摘要:这个问题是由于maven默认的jdk和默认的Dynamic Web Module版本问题引起的。 这个问题断断续续解决了复发了,今天找打了一个方法 第一,首先要在maven中配置这个插件 这样建好的项目 project facet中的Dynamic Web Module 是3.0的 还有buildp 阅读全文
posted @ 2017-06-08 10:52 牵牛花 阅读(194) 评论(0) 推荐(0) 编辑
摘要:row format delimited fields terminated by ',' 以','结尾的行格式分隔字段 阅读全文
posted @ 2017-06-06 21:59 牵牛花 阅读(7149) 评论(0) 推荐(0) 编辑
摘要:将代码达成jar包然后上传,其中依赖的函数在hive的压缩包的lib文件夹下面 创建临时函数 create temporary function lowercase2 as 'my.bigdata.udf.ToLowercase'; 使用时和其他函数一样 hive的insert 语句 insert 阅读全文
posted @ 2017-06-06 21:37 牵牛花 阅读(361) 评论(0) 推荐(0) 编辑
摘要:Jaxb2 实现JavaBean与xml互转 阅读全文
posted @ 2017-06-06 17:09 牵牛花 阅读(194) 评论(0) 推荐(0) 编辑
摘要:输入cat 命令时,他会从stdin(对通断界面来说,标准输入就是键盘)接受输入,cat < testfile ,现在cat命令会用testfile文件中的行为作为输入,可以使用这种技术将数据输入到任何能从stdin接受数据的shell命令stdout 在终端界面上,标准输出就是终端显示器。ls - 阅读全文
posted @ 2017-06-06 16:42 牵牛花 阅读(523) 评论(0) 推荐(0) 编辑
摘要:#!/bin/bash #reading data from a file count=1 cat test1 | while read line do echo "Line $count: $line" count=$[ $count + 1 ] done echo finished processing the file ~ ... 阅读全文
posted @ 2017-06-06 16:23 牵牛花 阅读(3986) 评论(0) 推荐(0) 编辑
摘要:if [ str1 = str2 ] 当两个串有相同内容、长度时为真 if [ str1 != str2 ] 当串str1和str2不等时为真 if [ -n str1 ] 当串的长度大于0时为真(串非空) if [ -z str1 ] 当串的长度为0时为真(空串) if [ str1 ] 当串st 阅读全文
posted @ 2017-06-06 13:25 牵牛花 阅读(468) 评论(0) 推荐(0) 编辑
摘要:ArrayBuffer:类型化数组 首先需要注意的是Array是定长数组,而ArrayBuffer是可变数组。下面是一个小例子,对数据进行便利和修改的操作。 阅读全文
posted @ 2017-06-06 10:02 牵牛花 阅读(204) 评论(0) 推荐(0) 编辑
摘要:eclipse里修改 Goals值 Tomcat -Dmaven.tomcat.port=8080 tomcat:run Jetty -Djetty.port=8081 jetty:run eclipse里修改 Goals值 Tomcat -Dmaven.tomcat.port=8080 tomca 阅读全文
posted @ 2017-06-05 15:12 牵牛花 阅读(4731) 评论(0) 推荐(0) 编辑
摘要:[Scala函数特性系列]——按名称传递参数 阅读全文
posted @ 2017-06-04 22:15 牵牛花 阅读(250) 评论(0) 推荐(0) 编辑
摘要:var addMore = (x: Int) => x+more 依照这个函数字面量在运行时创建的函数值(对象)被称为闭包:(closure)。名称源自通过"捕获"自由变量的绑定,从而对函数字面量执行的"闭包"行动。 Scala 闭包 阅读全文
posted @ 2017-06-04 17:42 牵牛花 阅读(119) 评论(0) 推荐(0) 编辑
摘要:理解Scala的Symbol类型 阅读全文
posted @ 2017-06-03 21:30 牵牛花 阅读(233) 评论(0) 推荐(0) 编辑
摘要:https://docs.mongodb.com/manual/reference/operator/update-field/ 阅读全文
posted @ 2017-06-03 17:49 牵牛花 阅读(364) 评论(0) 推荐(0) 编辑
摘要:> db.eval('return "hello mongodb "');hello mongodb save和insert的区别,save会变成更新语句并保存,insert则会报错 > db.persons.update({_id:"02"}, {_id:"02",name:"x0023"},tr 阅读全文
posted @ 2017-06-03 17:45 牵牛花 阅读(625) 评论(0) 推荐(0) 编辑
摘要:https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF 重点学习的是字符串的操作,所以建立一个空表就可以了, create table dual(id string); load 一个文件dual.dat 只有一个空格 阅读全文
posted @ 2017-06-01 18:25 牵牛花 阅读(299) 评论(0) 推荐(0) 编辑
摘要:建表 full outer join ,两边的数据都会出来只不过on条件没有对应上的一端会显示为null select a.*from a left semi join b on a.id = b.id; -- from 前不能写b.* 否则会报错( Error while compiling st 阅读全文
posted @ 2017-06-01 16:45 牵牛花 阅读(697) 评论(0) 推荐(0) 编辑
摘要:创建分桶的表 create table t_buck(id int ,name string) clustered by (id ) sorted by (id) into 4 buckets ; 分桶表的数据不是直接导入(load)的,是从其他表里面查出来插入的 ,插入时会在语句中加入约束的语句。 阅读全文
posted @ 2017-06-01 16:03 牵牛花 阅读(1694) 评论(0) 推荐(0) 编辑
摘要:连接 登录 !connect jdbc:hive2://localhost:10000Connecting to jdbc:hive2://localhost:10000Enter username for jdbc:hive2://localhost:10000: hadoopEnter pass 阅读全文
posted @ 2017-06-01 10:45 牵牛花 阅读(302) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示