-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1576 lines (1082 loc) · 72.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="zh">
<head><meta name="generator" content="Hexo 3.8.0">
<meta name="baidu-site-verification" content="WHXmBFaAkY">
<meta name="google-site-verification" content="vDyi3jVPymP4jOpfzY4F1zG4-FXD1T-A5unnDJuNxhs">
<meta charset="utf-8">
<title>钢铁锅</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="纵浪大化中,不喜亦不悲">
<meta name="keywords" content="Nothing">
<meta property="og:type" content="website">
<meta property="og:title" content="钢铁锅">
<meta property="og:url" content="http://gangtieguo.cn/index.html">
<meta property="og:site_name" content="钢铁锅">
<meta property="og:description" content="纵浪大化中,不喜亦不悲">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="钢铁锅">
<meta name="twitter:description" content="纵浪大化中,不喜亦不悲">
<link rel="icon" href="/css/images/Basketball-icon.png">
<link rel="stylesheet" href="/libs/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="/libs/open-sans/styles.css">
<link rel="stylesheet" href="/libs/source-code-pro/styles.css">
<link rel="stylesheet" href="/css/style.css">
<script src="/libs/jquery/2.1.3/jquery.min.js"></script>
<link rel="stylesheet" href="/libs/lightgallery/css/lightgallery.min.css">
<link rel="stylesheet" href="/libs/justified-gallery/justifiedGallery.min.css">
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?e304a23572827f3ea779e13779ddb9b6";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?e304a23572827f3ea779e13779ddb9b6";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
</html>
<body>
<div id="container">
<header id="header">
<div id="header-main" class="header-inner">
<div class="outer">
<a href="/" id="logo">
<i class="logo"></i>
<span class="site-title">钢铁锅</span>
</a>
<nav id="main-nav">
<a class="main-nav-link" href="/."><i class="fa fa-home"></i>主页</a>
<a class="main-nav-link" href="/archives"><i class="fa fa-archive"></i>归档</a>
<a class="main-nav-link" href="/categories"><i class="fa fa-folder"></i>分类</a>
<a class="main-nav-link" href="/tags"><i class="fa fa-tags"></i>标签</a>
<a class="main-nav-link" href="/about"><i class="fa fa-user"></i>关于</a>
<!-- -->
<!-- <a class="main-nav-link" href="/."> -->
<!-- <i class="fa fa-home"></i> -->
<!-- 主页 -->
<!-- </a> -->
<!-- -->
<!-- <a class="main-nav-link" href="/archives"> -->
<!-- <i class="fa fa-home"></i> -->
<!-- 归档 -->
<!-- </a> -->
<!-- -->
<!-- <a class="main-nav-link" href="/categories"> -->
<!-- <i class="fa fa-home"></i> -->
<!-- 分类 -->
<!-- </a> -->
<!-- -->
<!-- <a class="main-nav-link" href="/tags"> -->
<!-- <i class="fa fa-home"></i> -->
<!-- 标签 -->
<!-- </a> -->
<!-- -->
<!-- <a class="main-nav-link" href="/about"> -->
<!-- <i class="fa fa-home"></i> -->
<!-- 关于 -->
<!-- </a> -->
<!-- -->
</nav>
<nav id="sub-nav">
<div class="profile" id="profile-nav">
<a id="profile-anchor" href="javascript:;">
<img class="avatar" src="/css/images/venum.gif">
<i class="fa fa-caret-down"></i>
</a>
</div>
</nav>
<div id="search-form-wrap">
<form class="search-form">
<input type="text" class="ins-search-input search-form-input" placeholder="搜索">
<!-- <button type="submit" class="search-form-submit"></button> -->
</form>
<div class="ins-search">
<div class="ins-search-mask"></div>
<div class="ins-search-container">
<div class="ins-input-wrapper">
<input type="text" class="ins-search-input" placeholder="想要查找什么...">
<span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
</div>
<div class="ins-section-wrapper">
<div class="ins-section-container"></div>
</div>
</div>
</div>
<script>
(function (window) {
var INSIGHT_CONFIG = {
TRANSLATION: {
POSTS: '文章',
PAGES: '页面',
CATEGORIES: '分类',
TAGS: '标签',
UNTITLED: '(未命名)',
},
ROOT_URL: '/',
CONTENT_URL: '/content.json',
};
window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>
<script src="/js/insight.js"></script>
</div>
</div>
</div>
<div id="main-nav-mobile" class="header-sub header-inner">
<table class="menu outer">
<tr>
<td><a class="main-nav-link" href="/.">主页</a></td>
<td><a class="main-nav-link" href="/archives">归档</a></td>
<td><a class="main-nav-link" href="/categories">分类</a></td>
<td><a class="main-nav-link" href="/tags">标签</a></td>
<td><a class="main-nav-link" href="/about">关于</a></td>
<td>
<div class="search-form">
<input type="text" class="ins-search-input search-form-input" placeholder="搜索">
</div>
</td>
</tr>
</table>
</div>
</header>
<div class="outer">
<aside id="profile" class="profile-fixed">
<div class="inner profile-inner">
<div class="base-info profile-block">
<img id="avatar" src="/css/images/venum.gif">
<h2 id="name">GTG</h2>
<h3 id="title">Nothing</h3>
<span id="location"><i class="fa fa-map-marker"></i>四海为家</span>
</div>
<div class="article-info profile-block">
<div class="article-info-block">
65
<span>文章</span>
</div>
<div class="article-info-block">
44
<span>标签</span>
</div>
</div>
<div class="profile-block social-links">
<table>
<tr>
<td>
<a href="https://github.com/yaosong5" target="_blank" title="github" class="tooltip">
<i class="fa fa-github"></i>
</a>
</td>
<td>
<a href="https://weibo.com/gangtieguo/" target="_blank" title="weibo" class="tooltip">
<i class="fa fa-weibo"></i>
</a>
</td>
</tr>
</table>
</div>
</div>
</aside>
<section id="main">
<article id="post-Hive解析任务" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2019/03/12/Hive解析任务/">Hive解析任务-将json的多个属性拆分成多条记录</a>
</h1>
<div class="article-meta">
<div class="article-date">
<i class="fa fa-calendar"></i>
<a href="/2019/03/12/Hive解析任务/">
<time datetime="2019-03-12T08:07:30.918Z" itemprop="datePublished">2019-03-12</time>
</a>
</div>
<div class="article-category">
<i class="fa fa-folder"></i>
<a class="article-category-link" href="/categories/实际问题/">实际问题</a>
</div>
<div class="article-tag">
<i class="fa fa-tag"></i>
<a class="tag-link" href="/tags/Hive/">Hive</a>, <a class="tag-link" href="/tags/数仓/">数仓</a>
</div>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<p></p><p>[TOC]</p>
<p>需求环境:</p>
<p>在hive表dwb.dwb_r_thrid_data中,data字段存放有json字符串</p>
<p><img src="http://img.gangtieguo.cn/006tKfTcgy1g10yhuqk6bj32jc0e4wfy.jpg" alt></p><p></p>
<p class="article-more-link">
<a href="/2019/03/12/Hive解析任务/#more">查看更多</a>
</p>
</div>
<footer class="article-footer">
<div class="share-container">
<div class="bdsharebuttonbox">
<a href="#" class="bds_more" data-cmd="more">分享到:</a>
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a>
<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a>
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网">人人网</a>
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a>
</div>
<script>
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{"bdSize":16}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script>
<style>
.bdshare_popup_box {
border-radius: 4px;
border: #e1e1e1 solid 1px;
}
.bdshare-button-style0-16 a,
.bdshare-button-style0-16 .bds_more {
padding-left: 20px;
margin: 6px 10px 6px 0;
}
.bdshare_dialog_list a,
.bdshare_popup_list a,
.bdshare_popup_bottom a {
font-family: 'Microsoft Yahei';
}
.bdshare_popup_top {
display: none;
}
.bdshare_popup_bottom {
height: auto;
padding: 5px;
}
</style>
</div>
<a href="http://gangtieguo.cn/2019/03/12/Hive解析任务/#comments" class="article-comment-link">评论</a>
</footer>
</div>
</article>
<article id="post-mac与virtualbox共享文件夹,挂载到docker容器中文件目录权限解决" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2019/03/12/mac与virtualbox共享文件夹,挂载到docker容器中文件目录权限解决/">mac与virtualbox共享文件夹,挂载到docker容器中文件目录权限解决</a>
</h1>
<div class="article-meta">
<div class="article-date">
<i class="fa fa-calendar"></i>
<a href="/2019/03/12/mac与virtualbox共享文件夹,挂载到docker容器中文件目录权限解决/">
<time datetime="2019-03-12T01:49:35.656Z" itemprop="datePublished">2019-03-12</time>
</a>
</div>
<div class="article-category">
<i class="fa fa-folder"></i>
<a class="article-category-link" href="/categories/问题解决/">问题解决</a>
</div>
<div class="article-tag">
<i class="fa fa-tag"></i>
<a class="tag-link" href="/tags/Docker/">Docker</a>, <a class="tag-link" href="/tags/Mac/">Mac</a>
</div>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<p></p><p>[TOC]</p>
<h1 id="共享文件夹的权限问题"><a href="#共享文件夹的权限问题" class="headerlink" title="共享文件夹的权限问题"></a>共享文件夹的权限问题</h1><p>参考:<a href="http://yukai.space/2018/05/02/VirtualBox%E5%85%B1%E4%BA%AB%E6%96%87%E4%BB%B6%E5%A4%B9/" target="_blank" rel="noopener">Virtualbox设置共享文件夹</a></p>
<p>由于共享文件夹并不是虚拟机的本地目录,我们在虚拟机中可以配置共享文件夹的权限是有限的。</p>
<p>手动挂载或自动挂载的目录,所属用户默认为root,组为vboxsf,并且使用 <code>chmod chown</code> 等命令是无法改变的。<br></p>
<p class="article-more-link">
<a href="/2019/03/12/mac与virtualbox共享文件夹,挂载到docker容器中文件目录权限解决/#more">查看更多</a>
</p>
</div>
<footer class="article-footer">
<div class="share-container">
<div class="bdsharebuttonbox">
<a href="#" class="bds_more" data-cmd="more">分享到:</a>
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a>
<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a>
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网">人人网</a>
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a>
</div>
<script>
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{"bdSize":16}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script>
<style>
.bdshare_popup_box {
border-radius: 4px;
border: #e1e1e1 solid 1px;
}
.bdshare-button-style0-16 a,
.bdshare-button-style0-16 .bds_more {
padding-left: 20px;
margin: 6px 10px 6px 0;
}
.bdshare_dialog_list a,
.bdshare_popup_list a,
.bdshare_popup_bottom a {
font-family: 'Microsoft Yahei';
}
.bdshare_popup_top {
display: none;
}
.bdshare_popup_bottom {
height: auto;
padding: 5px;
}
</style>
</div>
<a href="http://gangtieguo.cn/2019/03/12/mac与virtualbox共享文件夹,挂载到docker容器中文件目录权限解决/#comments" class="article-comment-link">评论</a>
</footer>
</div>
</article>
<article id="post-Docker-machine的搭建(与宿主机在同一ip段下)" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2019/03/05/Docker-machine的搭建(与宿主机在同一ip段下)/">Docker-machine的创建,mac宿主机和docker容器网络互通Docker容器与宿主机在同一ip段下</a>
</h1>
<div class="article-meta">
<div class="article-date">
<i class="fa fa-calendar"></i>
<a href="/2019/03/05/Docker-machine的搭建(与宿主机在同一ip段下)/">
<time datetime="2019-03-05T08:14:31.000Z" itemprop="datePublished">2019-03-05</time>
</a>
</div>
<div class="article-category">
<i class="fa fa-folder"></i>
<a class="article-category-link" href="/categories/Docker/">Docker</a>
</div>
<div class="article-tag">
<i class="fa fa-tag"></i>
<a class="tag-link" href="/tags/Docker/">Docker</a>, <a class="tag-link" href="/tags/Docker-machine/">Docker-machine</a>, <a class="tag-link" href="/tags/安装部署/">安装部署</a>
</div>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<p></p><p><img src="https://www.github.com/yaosong5/tuchuang/raw/master/mdtc/2018/7/20/1532027033015.jpg" alt="enter description here"></p>
<p>此文纯属命令记录,后续更新原理解说</p><p></p>
<p class="article-more-link">
<a href="/2019/03/05/Docker-machine的搭建(与宿主机在同一ip段下)/#more">查看更多</a>
</p>
</div>
<footer class="article-footer">
<div class="share-container">
<div class="bdsharebuttonbox">
<a href="#" class="bds_more" data-cmd="more">分享到:</a>
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a>
<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a>
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网">人人网</a>
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a>
</div>
<script>
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{"bdSize":16}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script>
<style>
.bdshare_popup_box {
border-radius: 4px;
border: #e1e1e1 solid 1px;
}
.bdshare-button-style0-16 a,
.bdshare-button-style0-16 .bds_more {
padding-left: 20px;
margin: 6px 10px 6px 0;
}
.bdshare_dialog_list a,
.bdshare_popup_list a,
.bdshare_popup_bottom a {
font-family: 'Microsoft Yahei';
}
.bdshare_popup_top {
display: none;
}
.bdshare_popup_bottom {
height: auto;
padding: 5px;
}
</style>
</div>
<a href="http://gangtieguo.cn/2019/03/05/Docker-machine的搭建(与宿主机在同一ip段下)/#comments" class="article-comment-link">评论</a>
</footer>
</div>
</article>
<article id="post-ELK流程小实例" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/09/08/ELK流程小实例/">ELK-Logstash->kafka->es流程实例</a>
</h1>
<div class="article-meta">
<div class="article-date">
<i class="fa fa-calendar"></i>
<a href="/2018/09/08/ELK流程小实例/">
<time datetime="2018-09-08T14:30:24.772Z" itemprop="datePublished">2018-09-08</time>
</a>
</div>
<div class="article-category">
<i class="fa fa-folder"></i>
<a class="article-category-link" href="/categories/大数据/">大数据</a>
</div>
<div class="article-tag">
<i class="fa fa-tag"></i>
<a class="tag-link" href="/tags/ELK/">ELK</a>
</div>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<p></p><p>elk流程实例</p>
<p>[TOC]</p>
<p>前言:一般日志收集,我们通过logstash来接入,写入到kafka,再通过logstash将kafka的数据写入到es</p>
<p>那么就通过一个菜的抠脚的实例来看看</p>
<h1 id="LOGSTASH-gt-KAFKA-gt-ES"><a href="#LOGSTASH-gt-KAFKA-gt-ES" class="headerlink" title="LOGSTASH->KAFKA->ES"></a>LOGSTASH->KAFKA->ES</h1><h2 id="1-启动logstash将日志写入到kafka"><a href="#1-启动logstash将日志写入到kafka" class="headerlink" title="1.启动logstash将日志写入到kafka"></a>1.启动logstash将日志写入到kafka</h2><h3 id="①准备工作创建topic"><a href="#①准备工作创建topic" class="headerlink" title="①准备工作创建topic"></a>①准备工作创建topic</h3><p>先创建对应topic,(按照机器配置,集群情况配置,不然默认创建的话,不是最优效果)</p><p></p>
<p class="article-more-link">
<a href="/2018/09/08/ELK流程小实例/#more">查看更多</a>
</p>
</div>
<footer class="article-footer">
<div class="share-container">
<div class="bdsharebuttonbox">
<a href="#" class="bds_more" data-cmd="more">分享到:</a>
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a>
<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a>
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网">人人网</a>
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a>
</div>
<script>
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{"bdSize":16}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script>
<style>
.bdshare_popup_box {
border-radius: 4px;
border: #e1e1e1 solid 1px;
}
.bdshare-button-style0-16 a,
.bdshare-button-style0-16 .bds_more {
padding-left: 20px;
margin: 6px 10px 6px 0;
}
.bdshare_dialog_list a,
.bdshare_popup_list a,
.bdshare_popup_bottom a {
font-family: 'Microsoft Yahei';
}
.bdshare_popup_top {
display: none;
}
.bdshare_popup_bottom {
height: auto;
padding: 5px;
}
</style>
</div>
<a href="http://gangtieguo.cn/2018/09/08/ELK流程小实例/#comments" class="article-comment-link">评论</a>
</footer>
</div>
</article>
<article id="post-DataFrame DataSet" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/09/06/DataFrame DataSet/">DataStream DataSet介绍</a>
</h1>
<div class="article-meta">
<div class="article-date">
<i class="fa fa-calendar"></i>
<a href="/2018/09/06/DataFrame DataSet/">
<time datetime="2018-09-05T17:20:33.287Z" itemprop="datePublished">2018-09-06</time>
</a>
</div>
<div class="article-category">
<i class="fa fa-folder"></i>
<a class="article-category-link" href="/categories/大数据/">大数据</a>
</div>
<div class="article-tag">
<i class="fa fa-tag"></i>
<a class="tag-link" href="/tags/Spark/">Spark</a>
</div>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<p></p><p>[TOC]</p>
<h1 id="什么是DataStream"><a href="#什么是DataStream" class="headerlink" title="什么是DataStream"></a>什么是DataStream</h1><p>Discretized Stream是Spark Streaming的基础抽象,代表持续性的数据流和经过各种Spark原语操作后的结果数据流。在内部实现上,DStream是一系列连续的RDD来表示。每个RDD含有一段时间间隔内的数据,如下图:<br><img src="http://img.gangtieguo.cn/15360627803806.jpg" alt><br></p>
<p class="article-more-link">
<a href="/2018/09/06/DataFrame DataSet/#more">查看更多</a>
</p>
</div>
<footer class="article-footer">
<div class="share-container">
<div class="bdsharebuttonbox">
<a href="#" class="bds_more" data-cmd="more">分享到:</a>
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a>
<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a>
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网">人人网</a>
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a>
</div>
<script>
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{"bdSize":16}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script>
<style>
.bdshare_popup_box {
border-radius: 4px;
border: #e1e1e1 solid 1px;
}
.bdshare-button-style0-16 a,
.bdshare-button-style0-16 .bds_more {
padding-left: 20px;
margin: 6px 10px 6px 0;
}
.bdshare_dialog_list a,
.bdshare_popup_list a,
.bdshare_popup_bottom a {
font-family: 'Microsoft Yahei';
}
.bdshare_popup_top {
display: none;
}
.bdshare_popup_bottom {
height: auto;
padding: 5px;
}
</style>
</div>
<a href="http://gangtieguo.cn/2018/09/06/DataFrame DataSet/#comments" class="article-comment-link">评论</a>
</footer>
</div>
</article>
<article id="post-SparkSql的使用" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/09/06/SparkSql的使用/">SparkSQL使用</a>
</h1>
<div class="article-meta">
<div class="article-date">
<i class="fa fa-calendar"></i>
<a href="/2018/09/06/SparkSql的使用/">
<time datetime="2018-09-05T17:16:31.239Z" itemprop="datePublished">2018-09-06</time>
</a>
</div>
<div class="article-category">
<i class="fa fa-folder"></i>
<a class="article-category-link" href="/categories/大数据/">大数据</a>
</div>
<div class="article-tag">
<i class="fa fa-tag"></i>
<a class="tag-link" href="/tags/Spark/">Spark</a>, <a class="tag-link" href="/tags/SparkSQL/">SparkSQL</a>
</div>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<p></p><p>[TOC]</p>
<p>//1.读取数据,将每一行的数据使用列分隔符分割</p>
<p>val lineRDD = sc.textFile(“hdfs://bigdata1:9000/person.txt”, 1).map(_.split(“ “))<br></p>
<p class="article-more-link">
<a href="/2018/09/06/SparkSql的使用/#more">查看更多</a>
</p>
</div>
<footer class="article-footer">
<div class="share-container">
<div class="bdsharebuttonbox">
<a href="#" class="bds_more" data-cmd="more">分享到:</a>
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a>
<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a>
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网">人人网</a>
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a>
</div>
<script>
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{"bdSize":16}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script>
<style>
.bdshare_popup_box {
border-radius: 4px;
border: #e1e1e1 solid 1px;
}
.bdshare-button-style0-16 a,
.bdshare-button-style0-16 .bds_more {
padding-left: 20px;
margin: 6px 10px 6px 0;
}
.bdshare_dialog_list a,
.bdshare_popup_list a,
.bdshare_popup_bottom a {
font-family: 'Microsoft Yahei';
}
.bdshare_popup_top {
display: none;
}
.bdshare_popup_bottom {
height: auto;
padding: 5px;
}
</style>
</div>
<a href="http://gangtieguo.cn/2018/09/06/SparkSql的使用/#comments" class="article-comment-link">评论</a>
</footer>
</div>
</article>
<article id="post-Spark-on-Yarn源码解析④Spark业务代码的执行及其任务分配调度stage划分" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2018/09/04/Spark-on-Yarn源码解析④Spark业务代码的执行及其任务分配调度stage划分/">Spark-on-Yarn源码解析(四)Spark业务代码的执行及其任务分配调度stage划分</a>
</h1>
<div class="article-meta">
<div class="article-date">
<i class="fa fa-calendar"></i>
<a href="/2018/09/04/Spark-on-Yarn源码解析④Spark业务代码的执行及其任务分配调度stage划分/">
<time datetime="2018-09-04T08:16:39.931Z" itemprop="datePublished">2018-09-04</time>
</a>
</div>
<div class="article-category">
<i class="fa fa-folder"></i>
<a class="article-category-link" href="/categories/Spark-On-Yarn/">Spark-On-Yarn</a>
</div>
<div class="article-tag">
<i class="fa fa-tag"></i>
<a class="tag-link" href="/tags/Spark/">Spark</a>, <a class="tag-link" href="/tags/原理/">原理</a>
</div>
</div>
</header>
<div class="article-entry" itemprop="articleBody">
<p></p><p>spark-on-yarn系列</p>
<p><a href="http://www.gangtieguo.cn/2018/09/04/Spark-on-Yarn源码解析①Yarn任务解析/" target="_blank" rel="noopener">Spark-on-Yarn 源码解析①Yarn 任务解析</a><br><a href="http://www.gangtieguo.cn/2018/09/04/Spark-on-Yarn源码解析②Spark-Submit解析/" target="_blank" rel="noopener">Spark-on-Yarn 源码解析②Spark-Submit 解析</a><br><a href="http://www.gangtieguo.cn/2018/09/04/Spark-on-Yarn源码解析③client做的事情/" target="_blank" rel="noopener">Spark-on-Yarn 源码解析③client 做的事情</a><br><a href="http://www.gangtieguo.cn/2018/09/04/Spark-on-Yarn源码解析④Spark业务代码的执行及其任务分配调度stage划分/" target="_blank" rel="noopener">Spark-on-Yarn 源码解析④Spark 业务代码的执行及其任务分配调度 stage 划分</a></p>
<p>看看自定义的类</p>
<figure class="highlight scala"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">object</span> <span class="title">WordCount</span> </span>{</span><br><span class="line"></span><br><span class="line"> <span class="function"><span class="keyword">def</span> <span class="title">main</span></span>(args: <span class="type">Array</span>[<span class="type">String</span>]): <span class="type">Unit</span> = {</span><br><span class="line"> <span class="keyword">val</span> conf = <span class="keyword">new</span> <span class="type">SparkConf</span>().setAppName(<span class="string">"yaoWordCount"</span>).setMaster(<span class="string">"local[2]"</span>)</span><br><span class="line"> <span class="keyword">val</span> sc = <span class="keyword">new</span> <span class="type">SparkContext</span>(conf)</span><br><span class="line"> <span class="keyword">var</span> hadoopRDD: <span class="type">RDD</span>[<span class="type">String</span>] = sc.textFile(args(<span class="number">0</span>))</span><br><span class="line"> <span class="keyword">var</span> hdfsRDD: <span class="type">RDD</span>[<span class="type">String</span>] = hadoopRDD.flatMap(_.split(<span class="string">""</span>))</span><br><span class="line"> <span class="comment">//单词和出现的次数,构建RDD并且调用了他的Transformation</span></span><br><span class="line"> <span class="comment">//返回的是一个hadoopRDD</span></span><br><span class="line"> <span class="comment">//transFormation都是返回的RDD</span></span><br><span class="line"> <span class="keyword">var</span> wordAndCount: <span class="type">RDD</span>[(<span class="type">String</span>, <span class="type">Int</span>)] = hdfsRDD.map((_, <span class="number">1</span>))</span><br><span class="line"> <span class="comment">//创建RDD 这里面有两个RDD,一个是hadoopRDD,然后会生成一个paritionRDD</span></span><br><span class="line"> <span class="comment">//savaasTextfile还会产生一个RDD,因为会调用mapPartitons</span></span><br><span class="line"> <span class="comment">//调用RDD的action 开始真正提交任务</span></span><br><span class="line"> <span class="keyword">var</span> reducedRDD: <span class="type">RDD</span>[(<span class="type">String</span>, <span class="type">Int</span>)] = wordAndCount.reduceByKey(_ + _)</span><br><span class="line"> reducedRDD.saveAsTextFile(args(<span class="number">1</span>))</span><br><span class="line"> <span class="comment">//关闭saprkContext资源</span></span><br><span class="line"> sc.stop()</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure><p></p>
<p class="article-more-link">
<a href="/2018/09/04/Spark-on-Yarn源码解析④Spark业务代码的执行及其任务分配调度stage划分/#more">查看更多</a>
</p>
</div>
<footer class="article-footer">
<div class="share-container">
<div class="bdsharebuttonbox">
<a href="#" class="bds_more" data-cmd="more">分享到:</a>
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a>
<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a>
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网">人人网</a>
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a>
</div>
<script>
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{"bdSize":16}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script>
<style>
.bdshare_popup_box {
border-radius: 4px;
border: #e1e1e1 solid 1px;
}
.bdshare-button-style0-16 a,
.bdshare-button-style0-16 .bds_more {
padding-left: 20px;
margin: 6px 10px 6px 0;
}
.bdshare_dialog_list a,
.bdshare_popup_list a,
.bdshare_popup_bottom a {
font-family: 'Microsoft Yahei';
}
.bdshare_popup_top {
display: none;
}
.bdshare_popup_bottom {
height: auto;
padding: 5px;
}
</style>