摘要: 4.0.0 MyHbase hbase 0.0.1-SNAPSHOT jar hbase http://maven.apache.org UTF-8 junit junit 3.8.1 test org.apache.hadoop ha... 阅读全文
posted @ 2018-08-07 13:29 uuhh 阅读(2287) 评论(0) 推荐(0) 编辑
摘要: rpm -e --nodeps pcre 删除已安装软件 . 不能启动二进制程序 hdfs dfs -D dfs.blocksize=1048576 -put text.txtput: `.': No such file or directory 卸载jdk 1.rpm -qa|grep jdk2. 阅读全文
posted @ 2018-08-07 09:08 uuhh 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 关闭linux(window--netsh firewall set opmode disable)防火墙:chkconfig iptables off 禁用selinux vi /etc/selinux/config 创建LVS负载端接口 ifconfig eth0:8 192.168.17.10 阅读全文
posted @ 2018-08-06 17:20 uuhh 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 创建linux分区时,必须创建swap和根分区登陆linux时,一个具有唯一进程Id号的shell将被调用,这个ID是什么? 是PID哪个变量是用来定义shell的全局变量的? 是exportawk while循环:{ i = 1while (i <= $3) {printf("\t%.2f\n", 阅读全文
posted @ 2018-08-06 17:18 uuhh 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 练习建表语句 (struct使用的分割符是和collection相同的) CREATE TABLE emp(name string,salary float,likes array<string>,cloco map<string,string>,address struct<country:str 阅读全文
posted @ 2018-08-06 17:14 uuhh 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Kafka如何保证数据不重复消费,不丢失数据 不重复消费: 1.幂等操作,重复消费不会产生问题 2. dstream.foreachRDD {(rdd, time) = rdd.foreachPartition { partitionIterator => val partitionId = Tas 阅读全文
posted @ 2018-08-01 17:12 uuhh 阅读(23774) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-07-10 19:56 uuhh 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-07-10 19:55 uuhh 阅读(376) 评论(0) 推荐(0) 编辑
摘要: flume 的source 、channel和sink 多种组合 2017年01月11日 22:51:15 阅读数:2744 乐高积木flume flume 有三大组件source 、channel和sink,各个组件之间都可以相互组合使用,各组件间耦合度低。使用灵活,方便。 1.多sink channel 的内容只输出一次,同一个event 如果sink1 输出,sink2 不输出;如果si... 阅读全文
posted @ 2018-07-10 08:52 uuhh 阅读(3750) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.scala case class Person2(var name:String,age:Int) object Lesson_caseClass { def main(args: Array[String]): Unit = { val p1 = Person2("zhangsan",18) val p2 = new Person2("z... 阅读全文
posted @ 2018-07-07 20:06 uuhh 阅读(148) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.scala import scala.actors.Actor case class Message(actor:Actor,msg:String) class MyActor1 extends Actor { def act(): Unit = { while(true){ receive { case m:Messa... 阅读全文
posted @ 2018-07-07 20:06 uuhh 阅读(193) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.scala object Lesson_collections { def main(args: Array[String]): Unit = { /** * 元组 * 1.元组最多支持22元素 * 2.声明元组 可以new 可以不new 也可以直接() * 3.遍历:tuple.productIte... 阅读全文
posted @ 2018-07-07 20:05 uuhh 阅读(111) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.scala /** * 1.object 是scala中的对象,相当于java中的单例对象。object中定义的全都是静态的。main函数写在object中 * 2.scala中一行代码后面可以省略“;”,会有分号自动推断机制,如果多行写在一行中,分号不能省略 * 3.scala中定义变量使用var ,定义常量使用val ,变量可以改变,常量不可以改变。... 阅读全文
posted @ 2018-07-07 20:05 uuhh 阅读(230) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.scala import java.util.Date object Lesson_fun { def main(args: Array[String]): Unit = { /** * 1.方法定义 * 1.方法定义使用“def” * 2.方法可以传参,参数类型不能省略,方法的计算结果类型可以省略,会自动推断... 阅读全文
posted @ 2018-07-07 20:04 uuhh 阅读(250) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.scala object Lesson_match { def main(args: Array[String]): Unit = { val tuple = (1,"hello",'c',1.0,true) val iter = tuple.productIterator while(iter.hasNext){ v... 阅读全文
posted @ 2018-07-07 20:02 uuhh 阅读(154) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.scala trait Read{ def read(name:String)={ println(name+ " is reading...") } } trait Listen{ def listen(name:String)={ println(name+ " is listening...") } } class Pers... 阅读全文
posted @ 2018-07-07 20:01 uuhh 阅读(139) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.scala trait IsEQU{ def isEqu(o:Any):Boolean def isNotEqu(o:Any) :Boolean = !isEqu(o) } class Point(xx:Int, xy:Int) extends IsEQU { val x = xx val y = xy def isEqu(o: An... 阅读全文
posted @ 2018-07-07 20:00 uuhh 阅读(228) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.scala import java.util.Date object Lesson_fun { def main(args: Array[String]): Unit = { /** * 1.方法定义 * 1.方法定义使用“def” * 2.方法可以传参,参数类型不能省略,方法的计算结果类型可以省略,会自动推断... 阅读全文
posted @ 2018-07-07 19:35 uuhh 阅读(213) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.scala object Lesson_collections { def main(args: Array[String]): Unit = { /** * 元组 * 1.元组最多支持22元素 * 2.声明元组 可以new 可以不new 也可以直接() * 3.遍历:tuple.productIte... 阅读全文
posted @ 2018-07-07 19:35 uuhh 阅读(498) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.scala object Lesson_string { def main(args: Array[String]): Unit = { val s = "bjsxt" val s1 = "BJSXT" // println(s.indexOf(97)) // println(s.equalsIgnoreCase(s1)) ... 阅读全文
posted @ 2018-07-07 19:34 uuhh 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Kafka文档 一、Kafka简介 Kafka是一个分布式的消息队列系统(Message Queue)。 官网:https://kafka.apache.org/ kafka集群有多个Broker服务器组成,每个类型的消息被定义为topic。 同一topic内部的消息按照一定的key和算法被分区(p 阅读全文
posted @ 2018-07-06 11:02 uuhh 阅读(356) 评论(0) 推荐(0) 编辑
摘要: /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding... 阅读全文
posted @ 2018-07-05 23:04 uuhh 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 一、环境要求JDK 1.6+java -versionPython 2.6.6+python -V ZooKeeper3.4.5+storm 0.9.4+ 二、单机模式上传解压$ tar xf apache-storm-0.9.4.tar.gz $ cd apache-storm-0.9.4 $ s 阅读全文
posted @ 2018-07-05 16:46 uuhh 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 选项 含义说明 --connect <jdbc-uri> 指定JDBC连接字符串 --connection-manager <class-name> 指定要使用的连接管理器类 --driver <class-name> 指定要使用的JDBC驱动类 --hadoop-mapred-home <dir> 阅读全文
posted @ 2018-07-05 10:14 uuhh 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 1.解压 2.配置环境变量 3.添加数据库驱动包 cp mysql-connector-java-5.1.1.10.jar /sqoop/lib 4.重命名配置文件 mv sqoop-env-template.sh sqoop-env.sh 5.去掉未安装的服务(如:hbase,hcatalog,a 阅读全文
posted @ 2018-07-05 09:02 uuhh 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 描述:负载均衡器启动周期 5分钟<property> <name>hbase.balancer.period </name> <value>300000</value></property> 描述:region拆分阈值 10g <property> <name>hbase.hregion.max.f 阅读全文
posted @ 2018-07-05 08:45 uuhh 阅读(308) 评论(0) 推荐(0) 编辑
摘要: linux命令无法使用:命令行输入:set>lll cat lll echo $PATH 阅读全文
posted @ 2018-07-04 23:05 uuhh 阅读(294) 评论(0) 推荐(0) 编辑
摘要: package com.sxt; import java.util.Arrays; public class BubbleSort { public static void main(String[] args) { int[] arr={83,3,70,33,2,-99}; for(int i=0;iarr[j+1]){ swap(arr[j],arr[j+1]]); ... 阅读全文
posted @ 2018-06-28 15:26 uuhh 阅读(146) 评论(0) 推荐(0) 编辑
摘要: package com.sxt; import java.util.Arrays; public class QuickSort { public static void main(String[] args) { int[] arr ={ -50, 50, 17, 25, 11, 45, 54, 1, 65, 77, 63, 85 }; quickSort(arr, 0, arr... 阅读全文
posted @ 2018-06-28 15:25 uuhh 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-06-27 08:27 uuhh 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-06-26 20:27 uuhh 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 1.给40亿个不重复的unsigned int的证书,没排过序,然后再给一个数,如果快速判断这个数不再这40亿个数当中? 2.采集nginx产生的日志,日志格式为user ip time url htmlID 每天产生的文件数量上亿条,请设计方案把数据保存到hdfs上,并提供一下实时查询功能(相应时 阅读全文
posted @ 2018-06-26 20:16 uuhh 阅读(577) 评论(0) 推荐(0) 编辑
摘要: 安装之前准备1、依赖 gcc openssl-devel pcre-devel zlib-devel 安装:yum install gcc openssl-devel pcre-devel zlib-devel -y 安装Nginx./configure make && make install 默 阅读全文
posted @ 2018-06-23 22:39 uuhh 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 简介 什么是 Google Protocol Buffer? 假如您在网上搜索,应该会得到类似这样的文字介绍: Google Protocol Buffer( 简称 Protobuf) 是 Google 公司内部的混合语言数据标准,目前已经正在使用的有超过 48,162 种报文格式定义和超过 12, 阅读全文
posted @ 2018-06-23 20:34 uuhh 阅读(189) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.spark.transformations; import java.io.Serializable; import java.util.Arrays; import java.util.Comparator; import java.util.Iterator; import java.util.List; import org.apache.cassa... 阅读全文
posted @ 2018-06-18 11:52 uuhh 阅读(393) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.spark.others.secondsort; import java.io.Serializable; public class SecondSortKey implements Serializable,Comparable<SecondSortKey>{ 阅读全文
posted @ 2018-06-18 11:13 uuhh 阅读(148) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.spark.others.secondsort; import org.apache.spark.SparkConf;import org.apache.spark.api.java.JavaPairRDD;import org.apache.spark.api. 阅读全文
posted @ 2018-06-18 11:12 uuhh 阅读(85) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.spark.others.pvuv; import java.io.Serializable; public class WebSiteInfo implements Serializable, Comparable<WebSiteInfo>{ /** * */ 阅读全文
posted @ 2018-06-18 11:11 uuhh 阅读(134) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.spark.others.pvuv; import java.util.List; import org.apache.spark.SparkConf;import org.apache.spark.api.java.JavaPairRDD;import org. 阅读全文
posted @ 2018-06-18 11:10 uuhh 阅读(442) 评论(0) 推荐(0) 编辑
摘要: package com.bjsxt.spark.others.pvuv; import java.util.List; import org.apache.spark.SparkConf;import org.apache.spark.api.java.JavaPairRDD;import org. 阅读全文
posted @ 2018-06-18 10:45 uuhh 阅读(92) 评论(0) 推荐(0) 编辑