会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
欣欣姐
CnBlogs
Home
New Post
Contact
Admin
Subscription
上一页
1
2
3
4
5
6
7
8
下一页
2021年5月24日
Linux中复制文件时追加时间后缀
使用`date +%y%m%d`例如: mkdir `log_date +%Y%m%d` tar cfvz /tmp/bak.`date +%y%m%d`.tar.gz /etccp /opt/data/wfbmall/16/wfbmall.log /opt/data/wfmall/16/histo
Read More
posted @ 2021-05-24 14:50 欣欣姐
Views(1292)
Comments(0)
Diggs(0)
2021年5月19日
Linux系统安装Python3环境(详解)
背景:虽然linux有自带python2.7 但是很多时候需要用到python3,故需要在linux上重新安装python3,由于python3的版本太高,由于出现一些问题,故尽量安装python3.6版 以下详细介绍以下python3.6.1的安装过程。 1.下载安装包,可以直接wget http
Read More
posted @ 2021-05-19 17:25 欣欣姐
Views(2319)
Comments(0)
Diggs(0)
Hive 建分区表并导入HDFS数据文件
1.hive创建外部分区表,并将hdfs上的文件导入hive create external table db_hive_edu.wall_log_url ( log_time string, log_key string, url_detail string, url_briefly string
Read More
posted @ 2021-05-19 10:06 欣欣姐
Views(1504)
Comments(0)
Diggs(0)
2021年5月18日
flume监控本地文件并上传至HDFS
1. flume将本地日志按时间读取上传到hdfs上,编辑配置文件 file_wfbmall_log_hdfs.conf,其内容如下 a1.sources = r1 a1.sinks = k1 a1.channels = c1 a1.sources.r1.type = TAILDIR // posi
Read More
posted @ 2021-05-18 14:17 欣欣姐
Views(691)
Comments(0)
Diggs(0)
2021年5月14日
Linux命令行运行.py脚本报错 import: 未找到命令
操作如下: 在运行文件的首行输入#! python解释器所在的绝对路径,记住是首行,上面不要有空行例如:#! /usr/local/bin/python3 注意:绝对路径在终端窗口中使用which python3命令来查找
Read More
posted @ 2021-05-14 14:39 欣欣姐
Views(3371)
Comments(0)
Diggs(0)
2021年5月11日
Linux下more命令用法
Linux more 命令类似 cat ,不过会以一页一页的形式显示,更方便使用者逐页阅读,而最基本的指令就是按空白键(space)就往下一页显示,按 b 键就会往回(back)一页显示,而且还有搜寻字串的功能(与 vi 相似),使用中的说明文件,请按 h 。 1.查看文件 more file_na
Read More
posted @ 2021-05-11 14:18 欣欣姐
Views(481)
Comments(0)
Diggs(0)
python for line in sys.stdin解析文件调用方法
1.直接用 cat test.txt | python test.py直接把解析结果输出到屏幕中,或者用more input.log | python test.py (more 可以将多行空行只显示为一行) 也可以输入到指定的文件中:cattest.txt | python test.py > o
Read More
posted @ 2021-05-11 11:52 欣欣姐
Views(2783)
Comments(0)
Diggs(0)
2021年5月10日
Python中的MapReduce以及在Hadoop环境下运行之词频统计
一、在Linux中运行 首先在Linux中新建下面的目录,里面什么也不要放,然后进入到目录 /opt/data/mapreduce_test/ 1. 然后在里面创建一个test.txt文件,并往里面添加一些需要统计的单词, 2. 接着编辑mapper.py文件,vim mapper.py #!/us
Read More
posted @ 2021-05-10 17:50 欣欣姐
Views(884)
Comments(0)
Diggs(0)
Hadoop常用操作
一.HDFS文件授权 hadoop fs -chmod -R 777 /tmp 二.HDFS创建文件 hdfs dfs -mkdir /aaa 三.查看HDFS的文件 hdfs dfs -ls / #查询根目录文件夹 dfs -ls /flume/data #查看某个目录下的文件 四.本地文件上传至
Read More
posted @ 2021-05-10 11:46 欣欣姐
Views(46)
Comments(0)
Diggs(0)
2021年5月7日
MapReduce的工作原理
在MapReduce整个过程可以概括为以下过程: input --> map --> shuffle --> reduce -->输出 输入文件会被切分成多个块,每一块都有一个map task map阶段的输出结果会先写到内存缓冲区,然后由缓冲区写到磁盘上。默认的缓冲区大小是100M,溢出的百分比是
Read More
posted @ 2021-05-07 17:58 欣欣姐
Views(556)
Comments(0)
Diggs(0)
上一页
1
2
3
4
5
6
7
8
下一页
公告