`
bit1129
  • 浏览: 1052774 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
1. worker_processes    8; 表示Nginx将启动8个工作者进程,通过ps -ef|grep nginx,会发现有8个Nginx Worker Process在运行   nobody 53879 118449 0 Apr22 ? 00:26:15 nginx: worker process nobody 53880 118449 0 Apr22 ? 00:27:05 nginx: worker process ...
1. log_format 1.1 log_format指令用于指定日志的格式,格式:   log_format name(格式名称) type(格式样式)   1.2 如下是一个常用的Nginx日志格式:   log_format main '[$time_local]|$request_time|$status|$body_bytes_sent|$remote_addr|"$request" ...
  package com.examples.hadoop; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import java.io.BufferedReader; import java.io.In ...
1. 修改日志文件查看器   hdfs oev -i edits_0000000000000000081-0000000000000000089 -o edits.xml cat edits.xml   修改日志文件转储为xml格式的edits.xml文件,其中每条RECORD就是一个操作事务日志   2. fsimage查看HDFS中的块信息等   [hadoop@hadoop current]$ hdfs oiv -i fsimage_0000000000000016539 -o fsimage.fd -p FileDistribution maxSize 1000 ...
1. 数据从MemStore flush到磁盘的触发条件有哪些?    a.显式调用flush,比如flush 'mytable'    b.MemStore中的数据容量超过flush的指定容量,hbase.hregion.memstore.flush.size,默认值是64M 2. Region的构成是怎么样? 1个Region由若干个Store组成,每个Store对应表的一个Column Family,这也是HBase列式存储的由来。 1个Store对应1个或者多个HFile,每次MemStore数据转磁盘都会创建一个新的HFile。 一个Store中的这些HFile可能有大 ...
在HBase中,每个HFile存储的是一个表中一个列族的数据,也就是说,当一个表中有多个列簇时,针对每个列簇插入数据,最后产生的数据是多个HFile,每个对应一个列族,通过如下操作验证   1. 建立一个有两个列族的表   creat ...
  1. 代码: package spark.examples.fileformat import org.apache.spark.{SparkConf, SparkContext} object SequenceFileTest { def main(args: Array[String]) { val conf = new SparkConf() conf.setAppName("SequenceFileTest") conf.setMaster("local[3]") val sc = ...
1.关于Spark SQL操作Parquet 因为Parquet文件中包含了Schema信息,也就是说,Parquet文件是Schema自解释的,因此Spark SQL操作Parquet时,不需要指定Schema,因为Spark SQL可以根据Parquet文件中的Schema信息,解析出Parquet文件对应的SQL Schema 本文中的idAndName.parquet内容如下:从中可以看出hive_schema包含id,name两列   2.关于idAndName.parquet文件 idAndName.parquet来源于文章http://bit1129.iteye.co ...
 1. 原始数据 hive> select * from word; OK 1 MSN 10 QQ 100 Gtalk 1000 Skype      2. 创建保存为parquet格式的数据表   hive> CREATE TABLE parquet_table(age INT, name STRING)STORED AS PARQUET;     3. 数据表的描述   hive> describe parquet_table; hive> describe parquet_table; ...
 1. 原始数据 hive> select * from word; OK 1 MSN 10 QQ 100 Gtalk 1000 Skype      2. 创建avro格式的数据表   hive> CREATE TABLE avro_table(age INT, name STRING)STORED AS AVRO;     3. 数据表的描述   hive> describe avro_table; OK age int from deserializ ...
I got serveral questions about auto.offset.reset. This configuration parameter governs how  consumer read the message from Kafka when there is no initial offset in ZooKeeper or if an offset is out of range.  Q1. "no initial offset in zookeeper "  means that there isn't any consumer to co ...
Admin类的主要方法注释:   1. 创建表 /** * Creates a new table. Synchronous operation. * * @param desc table descriptor for table * @throws IllegalArgumentException if the table name is reserved * @throws MasterNotRunningException if master is not running * @throws org.apache.hadoop.h ...
代码中关于Host和Port是割裂开的,这会导致单机环境下的伪分布式Kafka集群环境下,这个例子没法运行。 实际情况是需要将host和port绑定到一起,   package kafka.examples.lowlevel; import kafka.api.FetchRequest; import kafka.api.FetchRequestBuilder; import kafka.api.PartitionOffsetRequestInfo; import kafka.common.ErrorMapping; import kafka.common.TopicAnd ...
1. 首先看看HBase中存储的文件内容 执行如下命令添加测试数据: create 'table3', 'colfam1', { SPLITS => ['row-300', 'row-500', 'row-700' , 'row-900'] }   for i in '0'..'9' do for j in '0'..'9' do for k in '0'..'9' do put 'table3', "row-#{i}#{j}#{k}", "colfam1:#{j}#{k}", "#{j}#{k}" end end e ...
1. Zookeeper Dump 访问HBase的web页面:http://192.168.26.140:16030/zk.jsp   HBase is rooted at /hbase Active master address: hadoop.master,16020,1428562242762 Backup master addresses: Region server holding hbase:meta: hadoop.master,16201,1428562244095 Region servers: hadoop.master,16 ...
Global site tag (gtag.js) - Google Analytics