锘??xml version="1.0" encoding="utf-8" standalone="yes"?>BlogJava-XZC.Loghttp://www.67529968.com/xzclog/zh-cnMon, 25 Feb 2019 15:18:34 GMTMon, 25 Feb 2019 15:18:34 GMT60Python璇诲啓銆佸垱寤烘枃浠?/title><link>http://www.67529968.com/xzclog/archive/2018/11/28/433526.html</link><dc:creator>xzc</dc:creator><author>xzc</author><pubDate>Wed, 28 Nov 2018 03:52:00 GMT</pubDate><guid>http://www.67529968.com/xzclog/archive/2018/11/28/433526.html</guid><wfw:comment>http://www.67529968.com/xzclog/comments/433526.html</wfw:comment><comments>http://www.67529968.com/xzclog/archive/2018/11/28/433526.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/xzclog/comments/commentRss/433526.html</wfw:commentRss><trackback:ping>http://www.67529968.com/xzclog/services/trackbacks/433526.html</trackback:ping><description><![CDATA[ 鍘熸枃閾炬帴锛歨ttp://www.cnblogs.com/juandx/p/4962089.html python涓?#28725;规枃浠?#37510;佹枃浠跺锛堟枃浠舵搷浣滃嚱鏁?#38171;?#37928;勬搷浣滈渶瑕佹秹鍙婂埌os妯潡鍜宻hutil妯潡銆? 寰楀埌褰撳墠宸?#28003;?#37929;?#35120;?#38171;屽嵆褰撳墠Python鑴氭湰宸?#28003;?#37928;?#37929;?#35120;曡矾寰? os.getcwd() 杩斿洖鎸囧畾鐩?#35120;?#28051;?#37928;勬墍鏈夋枃浠跺拰鐩?#35120;?#37722;?os.listdir() ?#22193;鏁?#37922;潵鍒犻櫎涓涓枃浠?os.remove() 鍒犻櫎澶?#28051;?#37929;?#35120;?#38171;歰s.removedirs锛坮“c锛歕python”锛? 妫楠岀粰鍑?#37928;勮矾寰勬槸鍚?#37828;?#28051;涓枃浠?#38171;歰s.path.isfile() 妫楠岀粰鍑?#37928;勮矾寰勬槸鍚?#37828;?#28051;涓?#37929;?#35120;?#38171;歰s.path.isdir() 鍒?#37826;?#37828;?#37722;?#37828;粷瀵硅矾寰?#38171;歰s.path.isabs() 妫楠岀粰鍑?#37928;勮矾寰勬槸鍚?#37930;熷湴瀛?os.path.exists() 杩斿洖涓涓矾寰?#37928;?#37929;?#35120;?#37722;?#37724;屾枃浠跺悕:os.path.split() eg os.path.split(‘/home/swaroop/byte/code/poem.txt’) 缁撴灉锛?‘/home/swaroop/byte/code’, ‘poem.txt’) 鍒嗙鎵睍鍚?#38171;歰s.path.splitext() 鑾?#37721;栬矾寰?#37722;?#38171;歰s.path.dirname() 鑾?#37721;栨枃浠跺悕锛歰s.path.basename() 杩愯?#23483;hell鍛?#28000;? os.system() 璇诲彇鍜岃缃幆澧?#37721;?#38322;?os.getenv() 涓巓s.putenv() ?#31920;鍑?#35120;撳墠骞?#37721;?#28003;?#37922;?#37928;勮?#23680;?#22559;绗?os.linesep Windows浣?#37922;?#8217;\r\n’锛孡inux浣?#37922;?#8217;\n’鑰孧ac浣?#37922;?#8217;\r’ 鎸囩浣犳鍦?#28003;?#37922;?#37928;?#39582;?#37721;?#38171;歰s.name 瀵逛簬Windows锛屽畠鏄?#8217;nt’锛岃屽?#36891;簬Linux/Unix鐢埛锛屽畠鏄?#8217;posix’ 閲嶅懡鍚?#38171;歰s.rename锛坥ld锛?new锛? ?#22449;寤?#28598;氱骇鐩?#35120;?#38171;歰s.makedirs锛坮“c锛歕python\test”锛? ?#22449;寤?#37719;?#28051;?#37929;?#35120;?#38171;歰s.mkdir锛?#8220;test”锛? 鑾?#37721;栨枃浠跺?#28852;?#38171;歰s.stat锛坒ile锛? 淇敼?#26499;浠舵?#20910;檺涓庢椂闂存埑锛歰s.chmod锛坒ile锛? 缁堟褰撳墠杩涚锛歰s.exit锛?#38171;? 鑾?#37721;栨枃浠跺?#30380;锛歰s.path.getsize锛坒ilename锛? ?#26499;浠舵搷浣?#38171;? os.mknod(“test.txt”) ?#22449;寤虹?#28888;枃浠? fp = open(“test.txt”,w) 鐩存帴鎵撳紑涓涓枃浠?#38171;屽?#20635;灉?#26499;浠?#28051;?#28699;?#37734;?#37714;欏垱寤烘枃浠? 鍏?#27996;巓pen 妯紡锛? w 浠啓鏂瑰紡鎵撳紑锛? a 浠?#26473;?#37716;?#22959;紡鎵撳紑 (浠?EOF ?#32017;濮? 蹇?#29781;佹?#36346;垱寤烘柊?#26499;浠? r+ 浠?#29831;诲啓妯紡鎵撳紑 w+ 浠?#29831;诲啓妯紡鎵撳紑 (鍙傝 w ) a+ 浠?#29831;诲啓妯紡鎵撳紑 (鍙傝 a ) rb 浠?#27996;?#26473;?#37714;?#29831;?#22959;紡鎵撳紑 wb 浠?#27996;?#26473;?#37714;跺啓妯紡鎵撳紑 (鍙傝 w ) ab 浠?#27996;?#26473;?#37714;?#26473;?#37716;?#22959;紡鎵撳紑 (鍙傝 a ) rb+ 浠?#27996;?#26473;?#37714;?#29831;诲啓妯紡鎵撳紑 (鍙傝 r+ ) wb+ 浠?#27996;?#26473;?#37714;?#29831;诲啓妯紡鎵撳紑 (鍙傝 w+ ) ab+ 浠?#27996;?#26473;?#37714;?#29831;诲啓妯紡鎵撳紑 (鍙傝 a+ ) fp.read([size]) #size涓?#29831;诲彇鐨?#38336;垮害锛?#28000;byte涓?#37719;?#28003;? fp.readline([size]) #璇?#28051;琛?#38171;屽?#20635;?#28355;畾?#31647;浜唖ize锛?#37832;?#37721;兘杩斿洖鐨?#37721;?#37828;?#28051;琛?#37928;?#28051;閮?#37714;? fp.readlines([size]) #鎶婃枃浠舵瘡涓琛?#28003;?#28051;?#28051;涓猯ist鐨?#28051;涓垚鍛?#38171;屽苟杩斿洖杩?#28051;猯ist銆?#37711;跺?#28850;畠鐨?#37712;?#38318;?#37828;?#38315;?#26473;?#23536;幆璋?#37922;readline()?#28533;瀹?#37916;?#37928;?#37510;?#28641;傛灉?#24385;渚泂ize鍙?#37825;?#38171;宻ize鏄?#29723;?#32448;?#29831;诲彇鍐?#28729;?#37928;勬?#38336;?#38171;屼?#29111;氨鏄?#29831;?#37721;兘鍙?#29831;诲埌?#26499;浠?#37928;?#28051;閮?#37714;?#37510;? fp.write(str) #鎶妔tr?#21843;?#22476;?#26499;浠?#28051;?#38171;寃rite()骞?#28051;嶄細鍦str鍚?#37716;?#28051;?#28051;涓崲琛岀 fp.writelines(seq) #鎶妔eq鐨?#37712;?#28729;?#37711;?#38318;啓?#22476;?#26499;浠?#28051;?澶?#29723;?#28051;娆?#37804;啓鍏?銆?#26473;?#28051;嚱鏁颁篃鍙?#37828;?#36423;?#28729;炲湴?#21843;鍏?#38171;?#28051;嶄細鍦瘡琛屽悗闈?#37716;?#28051;?#28000;?#28003;?#28051;?#29783;?#37510;? fp.close() #鍏?#38338;枃浠?#37510;俻ython?#32048;鍦?#28051;涓枃浠?#28051;?#37922;?#37722;?#38007;?#37716;?#37711;?#38338;枃浠?#38171;?#28051;?#26473;?#26473;?#28051;鍔?#38003;芥病鏈?#28103;?#29831;?#38171;屾渶濂?#26473;?#37828;?#37711;绘?#24879;嚜宸?#37711;?#38338;?#37928;勪?#29363;儻銆?濡傛灉涓涓枃浠跺湪鍏?#38338;?#37722;?#26473;?#28725;?#37711;?#26473;?#29723;屾搷浣?#28028;氫骇鐢烿alueError fp.flush() #鎶婄?#25779;?#25554;尯鐨?#37712;?#28729;瑰啓鍏?#32429;?#37929;? fp.fileno() #杩斿洖涓涓?#38336;?#37825;村瀷鐨?#8221;?#26499;浠舵?#22249;“ fp.isatty() #?#26499;浠舵槸鍚?#37828;?#28051;涓?#32513;?#32468;?#29825;?#28598;囨枃浠?#38171;unix绯?#32513;?#28051;?#37928;?#38171;? fp.tell() #杩斿洖?#26499;浠舵搷浣滄?#22250;鐨?#35120;撳墠浣?#32515;?#38171;?#28000;枃浠?#37928;勫紑澶?#28051;?#37720;熺偣 fp.next() #杩斿洖涓?#28051;琛?#38171;屽?#36346;皢?#26499;浠舵搷浣滄?#22250;浣嶇?#35826;埌涓?#28051;琛?#37510;傛妸涓涓猣ile鐢簬for … in file杩欐牱鐨?#29831;?#37721;椂锛屽氨鏄?#29835;?#37922;next()?#22193;鏁版潵瀹?#37916;伴亶鍘?#37928;?#37510;? fp.seek(offset[,whence]) #灏嗘枃浠舵?#25780;搷浣滄?#22250;?#25198;?#35826;埌offset鐨?#28003;?#32515;?#37510;?#26473;?#28051;猳ffset涓鑸?#37828;?#37929;?#28725;逛簬?#26499;浠?#37928;勫紑澶存潵璁畻鐨?#38171;?#28051;鑸?#28051;烘鏁?#37510;?#28003;?#28641;傛灉?#24385;渚?#27996;唚hence鍙?#37825;?#28751;?#28051;?#28051;?#30078;浜?#38171;寃hence鍙?#28000;?#28051;?琛?#32448;?#28000;?#28598;村紑濮?#29825;畻锛?琛?#32448;?#28000;?#35120;撳墠浣?#32515;?#28051;?#37720;熺?#30789;?#30075;銆?琛?#32448;?#28000;枃浠舵湯灏?#28051;?#37720;熺偣杩?#29723;岃?#30075;銆傞渶瑕佹敞鎰?#38171;屽?#20635;灉?#26499;浠?#28000;a鎴朼+鐨勬?#32033;鎵撳紑锛屾?#24532;杩?#29723;屽啓?#25655;浣滄椂锛屾枃浠舵搷浣滄?#22250;?#39041;細鑷?#37716;?#26473;斿洖?#22476;?#26499;浠舵湯灏?#37510;? fp.truncate([size]) #鎶婃枃浠惰?#20345;?#24879;?#21227;畾鐨?#28598;皬锛岄粯璁?#37928;勬槸瑁佸埌褰撳墠?#26499;浠舵搷浣滄?#22250;鐨?#28003;?#32515;?#37510;?#28641;傛灉size姣旀枃浠?#37928;?#28598;皬杩?#29781;佸锛屼?#28615;嵁绯?#32513;?#37928;?#28051;?#37722;?#37721;?#38003;芥槸涓嶆敼鍙樻枃浠?#38171;屼篃鍙?#38003;芥槸鐢?鎶婃枃浠?#29723;埌鐩稿簲鐨?#28598;皬锛屼篃鍙?#38003;芥槸浠?#28051;浜涢殢鏈?#37928;?#37712;?#28729;瑰姞涓?#37720;?#37510;? 鐩?#35120;曟搷浣?#38171;? os.mkdir(“file”) ?#22449;寤?#37929;?#35120;? 澶?#37714;舵枃浠?#38171;? shutil.copyfile(“oldfile”,”newfile”) oldfile鍜宯ewfile?#20824;鍙?#38003;芥槸?#26499;浠? shutil.copy(“oldfile”,”newfile”) oldfile鍙?#38003;芥槸?#26499;浠跺锛宯ewfile鍙?#28000;?#37828;枃浠?#38171;屼篃鍙?#28000;?#37828;?#37929;?#37837;?#37929;?#35120;? 澶?#37714;舵枃浠跺锛? shutil.copytree(“olddir”,”newdir”) olddir鍜宯ewdir?#20824;鍙?#38003;芥槸鐩?#35120;?#38171;?#28051;newdir蹇呴涓?#28699;?#37734;? 閲嶅懡鍚嶆枃浠?#38171;?#37929;?#35120;?#38171;? os.rename(“oldname”,”newname”) ?#26499;浠舵垨鐩?#35120;?#38318;芥槸浣?#37922;?#26473;?#37833;?#37723;?#28000;? 绉诲姩?#26499;浠?#38171;?#37929;?#35120;?#38171;? shutil.move(“oldpos”,”newpos”) 鍒犻櫎?#26499;浠? os.remove(“file”) 鍒犻櫎鐩?#35120;? os.rmdir(“dir”)鍙兘鍒犻櫎绌?#37929;?#35120;? shutil.rmtree(“dir”) 绌?#37929;?#35120;?#37510;佹湁鍐?#28729;?#37928;?#37929;?#35120;曢兘鍙?#28000;?#37714;? 杞崲鐩?#35120;? os.chdir(“path”) ?#23858;?#30718;寰? Python璇诲啓?#26499;浠? 1.open 浣?#37922;open鎵撳紑?#26499;浠跺悗涓?#30078;瑕?#29825;?#23536;?#29835;?#37922;枃浠跺?#30789;薄鐨刢lose()鏂规硶銆傛?#26047;鍙?#28000;?#37922;try/finally璇?#37721;潵纭?#28103;濇渶鍚庤兘鍏?#38338;枃浠?#37510;? file_object = open(‘thefile.txt’) try: all_the_text = file_object.read( ) finally: file_object.close( ) ?#25950;锛?#28051;?#38003;芥妸open璇?#37721;?#37824;?#37734;try?#28513;閲?#38171;屽洜涓?#35120;?#37813;撳紑?#26499;浠跺?#34425;幇寮傚父?#26882;锛屾枃浠跺?#30789;薄file_object鏃犳硶鎵?#29723;宑lose()鏂规硶銆? 2.璇绘枃浠? 璇绘枃?#28272;?#26499;浠? input = open('data', 'r') #绗?#27996;?#28051;?#37721;?#37825;伴粯璁?#28051;r input = open('data') 1 2 3 璇?#27996;?#26473;?#37714;舵枃浠? input = open('data', 'rb') 1 璇诲彇鎵鏈?#37712;?#28729;? file_object = open('thefile.txt') try: all_the_text = file_object.read( ) finally: file_object.close( ) 1 2 3 4 5 璇诲?#21700;畾瀛?#38010;? file_object = open('abinfile', 'rb') try: while True: chunk = file_object.read(100) if not chunk: break do_something_with(chunk) finally: file_object.close( ) 1 2 3 4 5 6 7 8 9 璇绘瘡琛? list_of_all_the_lines = file_object.readlines( ) 1 濡傛灉?#26499;浠舵槸?#26499;?#28272;?#26499;浠?#38171;?#26473;?#37721;?#28000;?#37929;存帴?#20150;鍘嗘枃浠跺?#30789;薄鑾?#37721;栨瘡琛?#38171;? for line in file_object: process line 1 2 3.?#21843;?#26499;浠? ?#21843;?#26499;?#28272;?#26499;浠? output = open('data', 'w') 1 ?#21843;浜?#26473;?#37714;舵枃浠? output = open('data', 'wb') 1 杩?#37716;犲啓?#26499;浠? output = open('data', 'w+') 1 ?#21843;鏁版嵁 file_object = open('thefile.txt', 'w') file_object.write(all_the_text) file_object.close( ) 1 2 3 ?#21843;鍏?#28598;?#29723;? file_object.writelines(list_of_text_strings) 1 ?#25950;鎰?#38171;岃皟鐢writelines?#21843;鍏?#28598;?#29723;屽湪鎬兘涓?#28028;氭瘮浣?#37922;write涓娆?#37804;啓鍏?#29781;?#26946;?#37510;? 鍦?#28598;勭悊鏃?#36423;楁枃浠?#37928;勬?#36346;?#38171;屽?#31295;父?#32048;囧埌杩欐牱鐨勬儏鍐?#38171;氭棩蹇楁枃浠跺法澶?#38171;?#28051;?#37721;兘涓娆?#37804;?#37814;?#37825;?#28051;枃浠?#29831;诲叆?#22476;鍐?#28699;?#28051;?#26473;?#29723;屽?#21229;悊锛屼緥濡傞渶瑕佸湪涓鍙扮墿鐞?#37712;?#28699;?#28051;?2GB 鐨勬?#21700;涓婂?#21229;悊涓涓?2GB 鐨勬棩蹇楁枃浠?#38171;屾垜浠?#37721;?#38003;藉鏈?#23011;忔鍙?#28598;勭悊鍏?#28051;?200MB 鐨?#37712;?#28729;?#37510;? 鍦?Python 涓?#38171;屽唴缃?#37928;?File 瀵硅薄鐩存帴?#24385;渚?#27996;?#28051;涓?readlines(sizehint) ?#22193;鏁版潵瀹屾垚杩欐牱鐨?#27996;?#37807;?#37510;?#28000;?#28051;?#38344;?#37928;?#28000;?#37934;?#28051;轰緥锛? file = open('test.log', 'r')sizehint = 209715200 # 200Mposition = 0lines = file.readlines(sizehint)while not file.tell() - position < 0: position = file.tell() lines = file.readlines(sizehint) 1 姣忔璋?#37922;?readlines(sizehint) ?#22193;鏁?#38171;屼細杩斿洖澶害 200MB 鐨?#37825;版嵁锛岃?#28051;?#37813;杩斿洖鐨?#36423;呯劧閮芥槸瀹?#37825;?#37928;勮鏁版嵁锛屽澶?#37825;版儏鍐?#28051;?#38171;?#26473;斿洖鐨?#37825;版嵁鐨?#28699;?#38010;?#37825;颁細绋?#23536;?#23011;?sizehint 鎸囧畾鐨勫?#28598;?#28051;?#20579;锛堥櫎?#28214;鍚?#28051;娆?#29835;?#37922;?readlines(sizehint) ?#22193;鏁?#37928;勬?#36346;?#38171;?#37510;?#38315;氬父鎯?#37712;?#28051;?#38171;孭ython ?#32048;鑷?#37716;?#28751;?#37922;埛鎸囧畾鐨?sizehint 鐨勫?#29835;?#37825;存垚鍐?#38318;?#32514;撳瓨澶皬鐨?#37825;?#37825;板?#37510;? file鍦python鏄?#28051;涓?#37911;规鐨勭?#35826;瀷锛屽畠鐢簬鍦python绋?#25652;?#28051;?#28725;?#28598;?#38318;?#37928;勬枃浠?#26473;?#29723;屾搷浣?#37510;?#37734;python涓?#28051;鍒?#38318;芥槸瀵硅薄锛宖ile?#31683;涓嶄緥澶?#38171;宖ile鏈塮ile鐨?#37826;规硶鍜屽?#28852;?#37510;?#28051;?#38344;?#37711;堟潵鐪?#28641;?#28003;曞垱寤?#28051;涓猣ile瀵硅薄锛? file(name[, mode[, buffering]]) 1 file()?#22193;鏁?#37922;簬?#22449;寤?#28051;涓猣ile瀵硅薄锛屽畠鏈?#28051;涓?#37714;?#37722;?#37721;open()锛?#37721;?#38003;芥洿褰薄涓浜?#38171;屽畠浠?#37828;?#37712;?#32515;嚱鏁?#37510;傛潵鐪嬬?#23338;畠鐨?#37721;?#37825;?#37510;傚畠鍙?#37825;?#38318;芥槸浠?#28699;?#32471;?#28051;?#37928;?#35120;紡浼犻?#37928;?#37510;俷ame鏄枃浠?#37928;?#37722;?#28699;?#37510;? mode鏄?#37813;撳紑鐨勬?#32033;锛?#37721;?#38315;?#37928;勫?#28051;r w a U锛屽垎鍒?#28000;?#29723;?#29831;?#38171;堥粯璁?#38171;??#21843; 娣诲?#29363;敮鎸佸?#21229;?#23942;崲琛岀鐨勬?#32033;銆?#37922;w鎴朼妯紡鎵撳紑?#26499;浠?#37928;?#29831;?#38171;屽?#20635;灉?#26499;浠?#28051;?#28699;?#37734;?#38171;岄偅涔?#28751;?#38007;?#37716;垱寤?#37510;傛澶?#38171;?#37922;w妯紡鎵撳紑涓涓?#23480;?#32513;?#28699;?#37734;?#37928;勬枃浠舵椂锛?#37720;熸?#22795;枃浠?#37928;?#37712;?#28729;逛細琚竻绌?#38171;屽洜涓?#28051;?#32017;濮嬫枃浠?#37928;勬搷浣?#37928;勬?#22250;鏄?#37734;枃浠?#37928;勫紑澶?#37928;?#38171;?#26473;?#37827;跺?#26473;?#29723;屽啓?#25655;浣?#38171;?#37827;?#37924;?#28028;氭妸鍘熸湁鐨?#37712;?#28729;圭粰鎶规帀銆?#37922;变簬鍘?#37721;?#37928;?#37720;熷洜锛屾崲琛岀鍦?#28051;?#37722;?#37928;勭郴缁?#28051;?#37832;?#28051;?#37722;?#22959;紡锛屾?#26047;鍦?unix涓?#37828;?#28051;涓猏n锛岃屽湪windows涓?#37828;?#8216;\r\n’锛?#37922;U妯紡鎵撳紑?#26499;浠?#38171;屽氨鏄?#37824;?#37816;佹墍鏈?#37928;勬崲琛?#22959;紡锛屼?#29111;氨璇?#8216;\r’ ‘\n’ ‘\r\n’?#20824;鍙?#29723;?#32448;烘崲琛?#38171;屼?#27693;湁涓涓猼uple鐢潵瀛樿串杩?#28051;枃浠?#28051;?#37922;埌杩?#37928;勬崲琛岀銆?#28051;?#26473;?#38171;岃璇存崲琛?#37832;?#28598;氱妯紡锛?#29831;诲埌python涓?#32513;?#28051;鐢\n浠浛銆?#37734;?#22959;紡瀛?#32471;?#37928;?#37722;?#38344;?#38171;?#26473;?#37721;?#28000;?#37716;?#28051;? b t杩?#28051;?#32457;?#37837;?#29831;?#38171;屽垎鍒?#29723;?#32448;?#37721;?#28000;?#28725;规枃浠跺?#23678;椂杩?#29723;?#29831;诲啓?#25655;浣滃拰鐢?#27996;?#26473;?#37714;舵?#32033;銆佹枃?#28272;妯紡锛堥粯璁?#38171;?#37813;撳紑?#26499;浠?#37510;? buffering濡傛灉涓?琛?#32448;?#28051;?#26473;?#29723;岀?#25779;啿;濡傛灉涓?琛?#32448;?#26473;?#29723;?#8220;琛岀?#25779;啿“;濡傛灉鏄?#28051;涓?#28598;簬1鐨?#37825;?#29723;?#32448;虹?#25779;?#25554;尯鐨?#28598;皬锛屽簲璇?#37828;?#28000;?#28699;?#38010;?#28051;?#37719;?#28003;?#37928;?#37510;? file瀵硅薄鏈?#38007;?#23480;?#37928;?#28766;炴?#37724;?#37826;规硶銆?#37711;堟潵鐪嬬湅file鐨?#28766;炴?#37510;? closed #鏍囪?#29256;枃浠舵槸鍚?#23480;?#32513;?#37711;?#38338;?#38171;?#37922;close()?#25980;?#21843; encoding #?#26499;浠剁?#26667;爜 mode #鎵撳紑妯紡 name #?#26499;浠跺悕 newlines #?#26499;浠?#28051;?#37922;埌鐨勬崲琛?#22959;紡锛?#37828;?#28051;涓猼uple softspace #boolean?#28727;锛?#28051;鑸?#28051;?锛屾嵁璇?#37922;簬print 1 2 3 4 5 6 file鐨?#29831;诲啓鏂规硶锛? F.read([size]) #size涓?#29831;诲彇鐨?#38336;垮害锛?#28000;byte涓?#37719;?#28003;? F.readline([size]) #璇?#28051;琛?#38171;屽?#20635;?#28355;畾?#31647;浜唖ize锛?#37832;?#37721;兘杩斿洖鐨?#37721;?#37828;?#28051;琛?#37928;?#28051;閮?#37714;? F.readlines([size]) #鎶婃枃浠舵瘡涓琛?#28003;?#28051;?#28051;涓猯ist鐨?#28051;涓垚鍛?#38171;屽苟杩斿洖杩?#28051;猯ist銆?#37711;跺?#28850;畠鐨?#37712;?#38318;?#37828;?#38315;?#26473;?#23536;幆璋?#37922;readline()?#28533;瀹?#37916;?#37928;?#37510;?#28641;傛灉?#24385;渚泂ize鍙?#37825;?#38171;宻ize鏄?#29723;?#32448;?#29831;诲彇鍐?#28729;?#37928;勬?#38336;?#38171;屼?#29111;氨鏄?#29831;?#37721;兘鍙?#29831;诲埌?#26499;浠?#37928;?#28051;閮?#37714;?#37510;? F.write(str) #鎶妔tr?#21843;?#22476;?#26499;浠?#28051;?#38171;寃rite()骞?#28051;嶄細鍦str鍚?#37716;?#28051;?#28051;涓崲琛岀 F.writelines(seq) #鎶妔eq鐨?#37712;?#28729;?#37711;?#38318;啓?#22476;?#26499;浠?#28051;?#37510;?#26473;?#28051;嚱鏁颁篃鍙?#37828;?#36423;?#28729;炲湴?#21843;鍏?#38171;?#28051;嶄細鍦瘡琛屽悗闈?#37716;?#28051;?#28000;?#28003;?#28051;?#29783;?#37510;? file鐨?#37711;?#28000;?#37826;规硶锛? F.close() #鍏?#38338;枃浠?#37510;俻ython?#32048;鍦?#28051;涓枃浠?#28051;?#37922;?#37722;?#38007;?#37716;?#37711;?#38338;枃浠?#38171;?#28051;?#26473;?#26473;?#28051;鍔?#38003;芥病鏈?#28103;?#29831;?#38171;屾渶濂?#26473;?#37828;?#37711;绘?#24879;嚜宸?#37711;?#38338;?#37928;勪?#29363;儻銆?#28641;傛灉涓涓枃浠跺湪鍏?#38338;?#37722;?#26473;?#28725;?#37711;?#26473;?#29723;屾搷浣?#28028;氫骇鐢烿alueError F.flush() #鎶婄?#25779;?#25554;尯鐨?#37712;?#28729;瑰啓鍏?#32429;?#37929;? F.fileno() #杩斿洖涓涓?#38336;?#37825;村瀷鐨?#8221;?#26499;浠舵?#22249;“ F.isatty() #?#26499;浠舵槸鍚?#37828;?#28051;涓?#32513;?#32468;?#29825;?#28598;囨枃浠?#38171;unix绯?#32513;?#28051;?#37928;?#38171;? F.tell() #杩斿洖?#26499;浠舵搷浣滄?#22250;鐨?#35120;撳墠浣?#32515;?#38171;?#28000;枃浠?#37928;勫紑澶?#28051;?#37720;熺偣 F.next() #杩斿洖涓?#28051;琛?#38171;屽?#36346;皢?#26499;浠舵搷浣滄?#22250;浣嶇?#35826;埌涓?#28051;琛?#37510;傛妸涓涓猣ile鐢簬for ... in file杩欐牱鐨?#29831;?#37721;椂锛屽氨鏄?#29835;?#37922;next()?#22193;鏁版潵瀹?#37916;伴亶鍘?#37928;?#37510;? F.seek(offset[,whence]) #灏嗘枃浠舵?#25780;搷浣滄?#22250;?#25198;?#35826;埌offset鐨?#28003;?#32515;?#37510;?#26473;?#28051;猳ffset涓鑸?#37828;?#37929;?#28725;逛簬?#26499;浠?#37928;勫紑澶存潵璁畻鐨?#38171;?#28051;鑸?#28051;烘鏁?#37510;?#28003;?#28641;傛灉?#24385;渚?#27996;唚hence鍙?#37825;?#28751;?#28051;?#28051;?#30078;浜?#38171;寃hence鍙?#28000;?#28051;?琛?#32448;?#28000;?#28598;村紑濮?#29825;畻锛?琛?#32448;?#28000;?#35120;撳墠浣?#32515;?#28051;?#37720;熺?#30789;?#30075;銆?琛?#32448;?#28000;枃浠舵湯灏?#28051;?#37720;熺偣杩?#29723;岃?#30075;銆傞渶瑕佹敞鎰?#38171;屽?#20635;灉?#26499;浠?#28000;a鎴朼+鐨勬?#32033;鎵撳紑锛屾?#24532;杩?#29723;屽啓?#25655;浣滄椂锛屾枃浠舵搷浣滄?#22250;?#39041;細鑷?#37716;?#26473;斿洖?#22476;?#26499;浠舵湯灏?#37510;? F.truncate([size]) #鎶婃枃浠惰?#20345;?#24879;?#21227;畾鐨?#28598;皬锛岄粯璁?#37928;勬槸瑁佸埌褰撳墠?#26499;浠舵搷浣滄?#22250;鐨?#28003;?#32515;?#37510;?#28641;傛灉size姣旀枃浠?#37928;?#28598;皬杩?#29781;佸锛屼?#28615;嵁绯?#32513;?#37928;?#28051;?#37722;?#37721;?#38003;芥槸涓嶆敼鍙樻枃浠?#38171;屼篃鍙?#38003;芥槸鐢?鎶婃枃浠?#29723;埌鐩稿簲鐨?#28598;皬锛屼篃鍙?#38003;芥槸浠?#28051;浜涢殢鏈?#37928;?#37712;?#28729;瑰姞涓?#37720;?#37510;? 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 http://www.cnblogs.com/allenblogs/archive/2010/09/13/1824842.html http://www.cnblogs.com/rollenholt/archive/2012/04/23/2466179.html<img src ="http://www.67529968.com/xzclog/aggbug/433526.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/xzclog/" target="_blank">xzc</a> 2018-11-28 11:52 <a href="http://www.67529968.com/xzclog/archive/2018/11/28/433526.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;勮</a></div>]]></description></item><item><title>HDFS鍓湰璁?#32515;?#37413;?#37413;旈粯璁?http://www.67529968.com/xzclog/archive/2018/11/26/433518.htmlxzcxzcMon, 26 Nov 2018 03:52:00 GMThttp://www.67529968.com/xzclog/archive/2018/11/26/433518.htmlhttp://www.67529968.com/xzclog/comments/433518.htmlhttp://www.67529968.com/xzclog/archive/2018/11/26/433518.html#Feedback0http://www.67529968.com/xzclog/comments/commentRss/433518.htmlhttp://www.67529968.com/xzclog/services/trackbacks/433518.html

xzc 2018-11-26 11:52 鍙?#29723;?#29831;勮
]]>
褰撳悓鏃跺?#22798;?#21292;ython2鍜孭ython3鍚?#38171;屽浣?#37711;?#28729;?#39582;跺?#22248;崲浣?#37922;?#29831;?#29785;?#38171;堟?#26047;?#20475;ip浣?#37922;?#38171;?/title><link>http://www.67529968.com/xzclog/archive/2018/11/16/433500.html</link><dc:creator>xzc</dc:creator><author>xzc</author><pubDate>Fri, 16 Nov 2018 01:38:00 GMT</pubDate><guid>http://www.67529968.com/xzclog/archive/2018/11/16/433500.html</guid><wfw:comment>http://www.67529968.com/xzclog/comments/433500.html</wfw:comment><comments>http://www.67529968.com/xzclog/archive/2018/11/16/433500.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/xzclog/comments/commentRss/433500.html</wfw:commentRss><trackback:ping>http://www.67529968.com/xzclog/services/trackbacks/433500.html</trackback:ping><description><![CDATA[杞?#38007;?#38171;歨ttps://www.cnblogs.com/shabbylee/p/6792555.html 鐢变簬鍘?#37721;?#37720;熷洜锛孭ython鏈?#28051;?#28051;?#28598;?#37928;勭?#22559;湰鍒嗘敮锛孭ython2鍜孭ython3锛?#37721;?#37922;变簬涓浜涘簱鍙?#37824;?#37816;佹煇涓?#37911;堟湰鍒嗘敮锛?#37813;浠渶瑕佸湪鐢?#38004;?#28051;婂悓鏃跺?#22798;?#21292;ython2鍜孭ython3锛屽?#29363;濡?#28003;曡涓?#28051;?#37911;堟湰鐨凱ython鍏?#28729;?#38171;屽浣曡鑴氭湰鍦?#28725;瑰簲鐨凱ython鐗堟湰涓?#26473;愯锛?#26473;?#28051;?#37828;?#37706;?#23536;?#37804;?#32513;?#37928;?#37510;? 瀵逛簬Ubuntu 16.04 LTS鐗堟湰?#28533;璇?#38171;孭ython2锛?.7.12锛?#37724;孭ython3锛?.5.2锛夐粯璁?#37722;?#37827;跺?#22798;锛岄粯璁?#37928;刾ython鐗堟湰鏄?.7.12銆? 褰?#37906;?#28003;犱篃鍙?#28000;?#37922;python2?#28533;璋?#37922;?#37510;? 濡傛灉鎯?#29835;?#37922;python3锛屽氨鐢python3. 瀵逛簬Windows锛屽氨鏈夌偣澶?#37833;?#27996;?#37510;?#37733;?#28051;?#28051;?#29825;簆ython2杩?#37828;痯ython3锛宲ython鍙?#37813;?#29723;屾枃浠堕兘鍙玴ython.exe锛屽湪cmd涓嬭?#25779;叆python寰楀埌鐨勭?#22559;湰鍙?#37721;?#37712;充簬?#24134;澧?#37721;?#38322;?#38322;屽摢涓?#37911;堟湰鐨刾ython?#30718;寰勬洿闈犲墠锛屾瘯绔windows鏄?#37816;夌椤哄?#24532;煡鎵?#37928;?#37510;傛?#26047;?#20636;幆澧?#37721;?#38322;?#38322;?#37928;勯?#21700;簭鏄?#26473;欐牱鐨?#38171;? ?#20549;涔cmd涓?#37928;刾ython鐗堟湰灏?#37828;?.7.12銆? 鍙嶄箣锛屽垯鏄痯ython3鐨勭?#22559;湰鍙?#37510;? 杩欏?#21342;甫?#28533;涓涓?#38338;?#26864;?#27996;?#38171;屽?#20635;灉浣犳兂鐢python2杩愯涓涓?#38004;氭湰锛?#28051;?#32048;浣?#37721;堟兂鐢python3杩愯鍙?#28051;涓?#38004;氭湰锛?#28003;犳?#28052;堝仛锛熸潵?#27926;?#25980;?#24134;澧?#37721;?#38322;?#37828;?#37906;跺?#22565;?#33636;儲銆? 缃?#28051;婂緢澶?#37716;炴硶姣旇?#20906;畝鍗曠?#26945;锛屾妸涓?#28051;猵ython.exe?#25980;鍚嶅锛?#28051;涓敼?#22426;python2.exe锛?#28051;涓敼?#22426;python3.exe銆?#26473;欐?#23792;仛鍥虹?#36346;彲浠?#38171;?#28003;?#28103;敼鍙?#37813;?#29723;屾枃浠?#37928;?#37826;瑰紡锛屾瘯绔?#28051;?#37828;?#23536;?#28610;?#37928;?#37826;规硶銆? 鎴?#28000;?#32513;嗘煡鎵?#27996;?#28051;浜沺ython鎶鏈枃妗?#38171;?#37721;?#37916;?#37721;?#28598;?#28051;涓?#37812;戣寰?#23011;旇?#20904;鐨勮鍐冲?#28852;硶銆? 鍊?#37922;py鐨?#28051;涓?#37721;?#37825;版潵璋?#37922;?#28051;?#37722;岀?#22559;湰鐨凱ython銆俻y -2璋?#37922;python2锛宲y -3璋?#37922;?#37928;勬槸python3. 褰損ython鑴氭湰?#28214;瑕乸ython2杩愯?#23678;椂锛?#37721;渶鍦?#38004;氭湰?#22688;鍔?#28051;?#38171;岀?#36346;悗杩愯?#23474;y xxx.py?#23878;鍙?#37510;? #! python2 褰損ython鑴氭湰?#28214;瑕乸ython3杩愯?#23678;椂锛?#37721;渶鍦?#38004;氭湰?#22688;鍔?#28051;?#38171;?#38171;岀?#36346;悗杩愯?#23474;y xxx.py?#23878;鍙?#37510;? #! python3 灏?#26473;?#28052;?#32480;鍗?#37510;? 鍚屾椂锛?#26473;?#28052;熷?#23680;?#24228;鍐?#27996;?#37734;pip鍦python2鍜宲ython3鍏?#28699;?#37928;勭幆澧?#28051;?#37814;敊锛屾彁绀篎atal error in launcher: Unable to create process using '"'鐨?#38338;?#26864;?#37510;? 褰撻渶瑕乸ython2鐨刾ip?#26882;锛?#37721;渶 py -2 -m pip install xxx 褰撻渶瑕乸ython3鐨刾ip?#26882;锛?#37721;渶 py -3 -m pip install xxx python2鍜宲ython3鐨刾ip package灏?#26473;欐牱鍙?#28000;?#28729;岀鍒嗗紑浜?#37510;?img src ="http://www.67529968.com/xzclog/aggbug/433500.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/xzclog/" target="_blank">xzc</a> 2018-11-16 09:38 <a href="http://www.67529968.com/xzclog/archive/2018/11/16/433500.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;勮</a></div>]]></description></item><item><title>hive闆嗘垚sentry鐨剆ql鐢硶銆?/title><link>http://www.67529968.com/xzclog/archive/2018/09/03/433353.html</link><dc:creator>xzc</dc:creator><author>xzc</author><pubDate>Mon, 03 Sep 2018 10:19:00 GMT</pubDate><guid>http://www.67529968.com/xzclog/archive/2018/09/03/433353.html</guid><wfw:comment>http://www.67529968.com/xzclog/comments/433353.html</wfw:comment><comments>http://www.67529968.com/xzclog/archive/2018/09/03/433353.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/xzclog/comments/commentRss/433353.html</wfw:commentRss><trackback:ping>http://www.67529968.com/xzclog/services/trackbacks/433353.html</trackback:ping><description><![CDATA[ Sentry鏉冮檺鎺?#37714;?#38315;?#26473;Beeline锛圚iveserver2 SQL 鍛?#28000;?#29723;屾帴鍙?#38171;夎?#25779;叆Grant 鍜?Revoke璇?#37721;潵?#21412;缃?#37510;?#29831;?#23049;曡窡鐜?#37734;?#37928;?#28051;浜?#28051;绘鐨?#37711;?#32495;?#37825;版嵁搴?#23536;?#37929;?#28028;?#37510;傞渶瑕佹敞鎰?#37928;勬槸锛?#35120;搒entry鏈嶅姟鍚?#37922;?#37722;?#38171;屾垜浠?#36423;呴浣?#37922;beeline?#24116;鍙潵鎵?#29723;宧ive鏌?#29831;?#38171;孒ive Cli骞?#28051;嶆敮鎸sentry銆? CREATE ROLE Statement CREATE ROLE璇?#37721;垱寤?#28051;涓?#37721;?#28000;?#29722;?#29863;?#37833;?#37928;勮鑹?#37510;?#37833;冮檺鍙?#28000;?#29863;嬬粰瑙?#38009;?#38171;岀?#36346;悗鍐?#37714;?#38320;嶇粰鍚?#28051;?#37922;埛銆?#28051;涓?#37922;埛琚?#37714;?#38320;嶅埌瑙?#38009;?#37722;?#37721;?#28000;?#37813;?#29723;?#29831;?#29785;?#38009;?#37928;勬?#20910;檺銆? 鍙?#37832;夋鏈?#32480;?#37918;?#37723;?#37928;勮鑹?#37721;?#28000;create/drop瑙?#38009;?#37510;傞粯璁?#37807;?#37712;?#28051;?#38171;宧ive銆乮mpala鍜宧ue鐢埛鎷?#37832;?#32480;?#37918;?#37723;樿鑹?#37510;? CREATE ROLE [role_name]; DROP ROLE Statement DROP ROLE璇?#37721;?#37721;?#28000;?#37922;潵浠?#37825;版嵁搴?#28051;?#32457;婚櫎涓涓?#29785;?#38009;?#37510;?#28051;鏃?#32457;婚櫎锛屼?#23338;墠鍒?#38320;嶇粰鎵鏈?#37922;埛鐨?#29831;?#29785;?#38009;?#28751;嗕細鍙栨秷銆?#28052;嬪墠宸?#32513;?#37813;?#29723;?#37928;?#29831;?#37721;?#28051;嶄細鍙楀埌褰卞搷銆?#28003;?#37828;?#38171;屽洜涓hive鍦?#37813;?#29723;屾瘡鏉?#37836;?#29831;?#29831;?#37721;?#28052;嬪墠浼氭鏌?#37922;埛鐨勬?#20910;檺锛屽?#21226;簬鐧诲綍?#26943;璺冪?#33333;?#37928;勭敤?#22491;?#32048;璇細鍙楀埌褰卞搷銆? DROP ROLE [role_name]; GRANT ROLE Statement GRANT ROLE璇?#37721;?#37721;?#28000;?#37922;潵?#31920;缁勬巿浜?#29785;?#38009;?#37510;?#37721;?#37832;塻entry鐨勭鐞?#37723;?#37922;埛?#22688;?#20824;鎵?#29723;?#29831;搷浣?#37510;? GRANT ROLE role_name [, role_name] TO GROUP 锛坓roupName锛?[,GROUP 锛坓roupName锛塢 REVOKE ROLE Statement REVOKE ROLE璇?#37721;?#37721;?#28000;?#37922;潵浠?#32513;勭?#23130;櫎瑙?#38009;?#37510;?#37721;?#37832;塻entry鐨勭鐞?#37723;?#37922;埛?#22688;?#20824;鎵?#29723;?#29831;搷浣?#37510;? REVOKE ROLE role_name [, role_name] FROM GROUP 锛坓roupName) [,GROUP (groupName)] GRANT (PRIVILEGE) Statement 鎺?#27996;?#28051;涓?#28725;硅薄鐨勬?#20910;檺?#31920;涓涓?#29785;?#38009;?#38171;?#29831;?#37922;?#37812;峰?#21620;涓sentry鐨勭鐞?#37723;?#37922;埛銆? GRANT (PRIVILEGE) [, (PRIVILEGE) ] ON (OBJECT) (object_name) TO ROLE (roleName) [,ROLE (roleName)] REVOKE 锛圥RIVILEGE锛?Statement 鍥?#28051;?#37721;?#37832;?#29825;?#29831;?#37928;勭鐞?#37723;?#37922;埛鍙?#28000;垱寤鸿鑹?#38171;?#28000;?#38000;?#37721;?#37832;?#32480;?#37918;?#37723;?#37922;埛鍙?#28000;?#37721;栨秷涓涓?#32513;?#37928;勬?#20910;檺銆? REVOKE (PRIVILEGE) [, (PRIVILEGE) ] ON (OBJECT) (object_name) FROM ROLE (roleName) [,ROLE (roleName)] GRANT (PRIVILEGE) ... WITH GRANT OPTION 鍦cdh5.2涓?#38171;?#28003;?#37721;?#28000;?#28654;?#37813;樼粰鍏?#28000;?#29785;?#38009;叉潵鎺?#27996;?#37724;岃?#27342;鏉冮檺銆傛?#26047;锛?#28051;涓?#29785;?#38009;?#29722;?#37818;?#27996;?#27996;哤ITH GRANT OPTION鐨勬?#20910;檺鍙?#28000;GRANT/REVOKE鍚屾牱鐨勬?#20910;檺?#31920;鍏?#28000;?#29785;?#38009;?#37510;?#37733;犳锛屽?#20635;灉涓涓?#29785;?#38009;?#37832;?#28051;涓?#25652;?#37928;勬墍鏈夋?#20910;檺骞?#28051;?#29825;?#32515;?#27996;?WITH GRANT OPTION锛?#29831;?#29785;?#38009;?#37714;嗛厤鐨勭敤?#22491;鍙?#28000;?#28725;?#29831;?#37825;版嵁搴?#37724;屽叾涓?#37928;勮鎵?#29723;孏RANT/REVOKE璇?#37721;?#37510;? GRANT 锛圥RIVILEGE锛? ON 锛圤BJECT锛?锛坥bject_name锛? TO ROLE 锛坮oleName锛? WITH GRANT OPTION 鍙?#37832;?#28051;涓?#29999;GRANT閫夐鐨勭?#35268;鏉冮檺鐨勮鑹?#37812;?#38000;呭畠鐨勭埗?#39559;鏉冮檺鍙?#28000;?#28000;?#37711;?#28000;?#29785;?#38009;?#29785;櫎杩?#32457;?#37833;冮檺銆?#28051;鏃?#28051;?#38344;?#37928;?#29831;?#37721;?#37813;?#29723;?#38171;?#37813;鏈?#29882;熷叾鐩?#37711;?#37928;grant鏉冮檺灏嗕細琚?#29785;櫎銆? REVOKE 锛圧IVILEGE锛? ON 锛圔JECT锛?锛坆ject_name锛? FROM ROLE 锛坮oleName锛? Hive鐩墠涓嶆敮鎸?#29785;櫎涔嬪墠璧?#27996;?#28051;涓?#29785;?#38009;?WITH GRANT OPTION 鐨勬?#20910;檺銆?#29781;佹兂绉婚櫎WITH GRANT OPTION銆?#29785;櫎鏉冮檺锛?#37721;?#28000;?#38322;?#37826;?#37720;婚櫎 WITH GRANT OPTION杩?#28051;?#37837;囪?#29256;潵鍐?#23046;?#38340;勬潈銆? SET ROLE Statement SET ROLE璇?#37721;?#37721;?#28000;粰褰撳墠?#32048;璇?#38315;夋嫨涓涓?#29785;?#38009;?#28003;?#28052;嬬?#29112;晥銆?#28051;涓?#37922;埛鍙兘鍚?#37922;?#37714;?#38320;嶇粰浠?#37928;勮鑹?#37510;?#28000;?#28003;?#28051;?#28699;?#37734;?#37928;勮鑹?#37724;?#35120;撳墠鐢埛涓嶈兘浣?#37922;?#37928;勮鑹?#37828;?#28051;嶈兘鐢熸晥鐨?#37510;?#28641;傛灉娌?#37832;?#28003;?#37922;?#28000;?#28003;曡鑹?#38171;?#37922;?#37812;峰皢?#32048;浣?#37922;?#28000;?#28003;?#28051;涓?#28766;簬浠?#37928;勮鑹?#37928;勬?#20910;檺銆? 閫夋嫨涓涓?#29785;?#38009;?#28003;?#37922;?#38171;? To enable a specific role: 浣?#37922;?#37813;鏈?#37928;勮鑹?#38171;? To enable a specific role: 鍏?#38338;?#37813;鏈夎鑹? SET ROLE NONE; SHOW Statement 鏄?#32448;?#35120;撳墠鐢埛鎷?#37832;?#25652;?#37510;?#29723;?#37510;佸垪鐩?#37711;?#37833;冮檺鐨?#37825;版嵁搴?#38171;? SHOW DATABASES; 鏄?#32448;?#35120;撳墠鐢埛鎷?#37832;?#29723;?#37510;佸垪鐩?#37711;?#37833;冮檺鐨勮锛? SHOW TABLES; 鏄?#32448;?#35120;撳墠鐢埛鎷?#37832;SELECT鏉冮檺鐨?#37714;?#38171;? SHOW COLUMNS (FROM|IN) table_name [(FROM|IN) db_name]; 鏄?#32448;?#35120;撳墠绯?#32513;?#28051;?#37813;鏈?#37928;勮鑹?#38171;?#37721;?#37832;?#32480;?#37918;?#37723;?#37922;埛鍙?#28000;?#37813;?#29723;?#38171;?#38171;? SHOW ROLES; 鏄?#32448;?#35120;撳墠褰卞搷褰撳墠?#32048;璇?#37928;勮鑹?#38171;? SHOW CURRENT ROLES; 鏄?#32448;烘?#22247;畾缁?#37928;勮鍒?#38320;嶅埌鐨勬墍鏈夎鑹?#38171;?#37721;?#37832;?#32480;?#37918;?#37723;?#37922;埛鍜?#37816;囧畾缁?#37712;?#37928;勭敤?#22491;鍙?#28000;?#37813;?#29723;?#38171;? SHOW ROLE GRANT GROUP (groupName); SHOW璇?#37721;?#37721;?#28000;?#37922;潵鏄?#32448;?#28051;涓?#29785;?#38009;?#29722;?#37818;?#27996;?#37928;勬?#20910;檺鎴?#38000;?#37828;?#32448;鸿鑹?#37928;?#28051;涓?#37911;瑰畾瀵硅薄鐨勬墍鏈夋?#20910;檺銆? 鏄?#32448;烘?#22247;畾瑙?#38009;?#37928;勬墍鏈?#29722;?#29863;?#27996;?#37928;勬?#20910;檺銆?#38171;?#37721;?#37832;?#32480;?#37918;?#37723;?#37922;埛鍜?#37816;囧畾瑙?#38009;?#37714;?#38320;嶅埌鐨勭敤?#22491;鍙?#28000;?#37813;?#29723;?#38171;?#37510;?#28051;?#38344;?#37928;?#29831;?#37721;篃浼氭樉绀?#28000;?#28003;?#37714;楃骇鐨勬?#20910;檺銆? SHOW GRANT ROLE (roleName); 鏄?#32448;烘?#22247;畾瀵硅薄鐨?#28051;涓?#29785;?#38009;?#37928;勬墍鏈?#29722;?#29863;?#27996;?#37928;勬?#20910;檺锛?#37721;?#37832;?#32480;?#37918;?#37723;?#37922;埛鍜?#37816;囧畾瑙?#38009;?#37714;?#38320;嶅埌鐨勭敤?#22491;鍙?#28000;?#37813;?#29723;?#38171;?#37510;?#28051;?#38344;?#37928;?#29831;?#37721;篃浼氭樉绀?#28000;?#28003;?#37714;楃骇鐨勬?#20910;檺銆? SHOW GRANT ROLE (roleName) on (OBJECT) (objectName); ----------------------------鎴?#28052;熸槸鏈?#25652;曠嚎鐨?----------------------------<img src ="http://www.67529968.com/xzclog/aggbug/433353.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/xzclog/" target="_blank">xzc</a> 2018-09-03 18:19 <a href="http://www.67529968.com/xzclog/archive/2018/09/03/433353.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;勮</a></div>]]></description></item><item><title>Python缂栫?#20344;拰瑙?#37934;?/title><link>http://www.67529968.com/xzclog/archive/2018/05/18/433218.html</link><dc:creator>xzc</dc:creator><author>xzc</author><pubDate>Fri, 18 May 2018 01:52:00 GMT</pubDate><guid>http://www.67529968.com/xzclog/archive/2018/05/18/433218.html</guid><wfw:comment>http://www.67529968.com/xzclog/comments/433218.html</wfw:comment><comments>http://www.67529968.com/xzclog/archive/2018/05/18/433218.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/xzclog/comments/commentRss/433218.html</wfw:commentRss><trackback:ping>http://www.67529968.com/xzclog/services/trackbacks/433218.html</trackback:ping><description><![CDATA[     ?#25011;瑕? Python 閲?#38344;?#37928;勭?#26667;?#20344;拰瑙?#37934;?#28052;熷氨鏄?nbsp;unicode 鍜?nbsp;str 杩?#28051;?#32457;?#35120;紡鐨?#37929;?#27996;?#26462;?#37718;?#37510;?#32514;栫?#20345;槸 unicode -> str锛?#37929;?#37721;?#37928;?#38171;岃鐮佸氨鏄?nbsp;str -> unicode銆傚墿涓?#37928;?#38338;?#26864;?#28751;?#37828;?#32429;畾浣曟椂?#28214;瑕?#26473;?#29723;岀?#26667;?#20345;垨鑰呰鐮?#27996;?鍏充簬?#26499;浠跺紑澶?#37928;?缂栫?#20345;?#22249;"锛屼?#29111;氨鏄?nbsp;# -*- codin...  <a href='http://www.67529968.com/xzclog/archive/2018/05/18/433218.html'>闃?#29831;诲叏?#26499;</a><img src ="http://www.67529968.com/xzclog/aggbug/433218.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/xzclog/" target="_blank">xzc</a> 2018-05-18 09:52 <a href="http://www.67529968.com/xzclog/archive/2018/05/18/433218.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;勮</a></div>]]></description></item><item><title>kafka鑺?#37904;瑰?#22248;http://www.67529968.com/xzclog/archive/2018/03/08/433087.htmlxzcxzcThu, 08 Mar 2018 08:35:00 GMThttp://www.67529968.com/xzclog/archive/2018/03/08/433087.htmlhttp://www.67529968.com/xzclog/comments/433087.htmlhttp://www.67529968.com/xzclog/archive/2018/03/08/433087.html#Feedback0http://www.67529968.com/xzclog/comments/commentRss/433087.htmlhttp://www.67529968.com/xzclog/services/trackbacks/433087.html
涓銆佸墠瑷
    鏃?#28051;?#38321;掓潵鎵撳紑寰?#28103;?#38171;屽悓浜?#37721;?#26851;坘afka闆嗙兢浠?#37828;?#28598;?#37713;屾?#32017;濮嬪啓鍏?#26864;戠?#20344;?#36779;|锛岃?#21057;揣鎵撳紑鐢?#38004;?#37836;?#37930;?#27996;唊afka闆嗙兢鐨勬?#21700;鐩?#37818;?#38171;?#37827;?#36423;?#28103;伅锛?#37721;?#37916;?#37711;?#28051;?#28051;涓?#38010;傜偣鐨勯?#21977;兢璐熻浇浠?#37828;?#28598;?#37713;屾?#29514;鐒舵帀涓嬫潵浜?#38171;?#37724;屽悓浜?#37721;?#26851;?#37928;勬椂闂寸偣澶?#22994;?#28051;鑷?#38171;屼簬鏄?#28052;?#28751;辩?#35826;綍鏈嶅姟鍣紑濮?#39582;叉椿銆?/div>
浜?#37510;佹帓?#25930;
1銆佹煡鐪?#37832;哄鐩?#37818;?#38171;岀湅鏄?#37722;兘澶?#22994;傚畾浣?#37828;?#37725;?#28051;?#38010;傜偣鏈?#23534;傚父
鎶鏈?#37714;?#27996;?/div>
2銆佹?#35268;嵁鏈哄鐩?#37818;?#28598;?#22994;傚畾浣嶅埌鍏?#28051;?#28051;涓?#23534;傚父鑺傜偣锛岀?#35826;綍鏈嶅姟鍣?#37836;?#37930;媖afka鏃?#36423;?#38171;?#37721;?#37916;?#37832;夋?#25930;鏃?#36423;?#38171;屽苟涓?#37827;?#36423;楀?#21342;?#28357;?#27407;湪杩?#28051;?#26473;?#28051;椂闂寸偣锛?/div>
[2017-06-01 16:59:59,851] ERROR Processor got uncaught exception. (kafka.network.Processor)
java.lang.OutOfMemoryError: Direct buffer memory
        at java.nio.Bits.reserveMemory(Bits.java:658)
        at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)
        at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:306)
        at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:174)
        at sun.nio.ch.IOUtil.read(IOUtil.java:195)
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
        at org.apache.kafka.common.network.PlaintextTransportLayer.read(PlaintextTransportLayer.java:108)
        at org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:97)
        at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:71)
        at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:160)
        at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:141)
        at org.apache.kafka.common.network.Selector.poll(Selector.java:286)
        at kafka.network.Processor.run(SocketServer.scala:413)3銆佹煡鐪媖afka杩涚鍜?#37929;?#37722;?#32468;?#37721;?#37807;?#37712;?#38171;?#37721;?#37916;?#38318;芥?#29238;锛屽鐜涘?#22248;浜?/div>
ps -ef |grep kafka        ## 鏌?#37930;媖afka鐨?#26473;涚
netstat -ntlp |grep 9092  ##9092kafka鐨?#37929;?#37722;?#32468;?#37721;?銆佹棦鐒跺凡缁忓?#22248;浜?#38171;?#37721;兘閲?#37722;?#27996;?/div>
ps -ef |grep kafka |grep -v grep |awk ‘{print $2}‘  | xargs kill -9  
/usr/local/kafka/bin;nohup ./kafka-server-start.sh ../config/server.properties &5銆?#38322;?#37722;?#37722;?#37734;?#29785;?#28725;?#29831;?#38010;傜偣鐨刱afka鏃?#36423;?#38171;屽湪涓椤縤ndex閲?#23524;轰箣鍚?#38171;?#28051;?#38344;?#37928;勬?#25930;淇伅鍦?#37924;?#37913;?#37928;?#37714;?#38171;屾渶鍚?#29835;?#23005;?#28051;鐣?#38171;岃鍐?#27996;?#29831;?#38338;?#26864;?/div>
涓?#37510;?#29785;?#37712;?#37826;规锛?/div>
鍦?/div>
/usr/local/kafka/binkafka-run-class.sh鍘绘帀
-XX:+DisableExplicitGC娣诲姞
-XX:MaxDirectMemorySize=512m鍦?#28051;娆?#38322;?#37722;痥afka锛?#38338;?#26864;樿鍐?#37510;?/div>


xzc 2018-03-08 16:35 鍙?#29723;?#29831;勮
]]>Hive涓璻educe涓?#37825;?#29825;惧畾http://www.67529968.com/xzclog/archive/2018/03/07/433084.htmlxzcxzcWed, 07 Mar 2018 03:21:00 GMThttp://www.67529968.com/xzclog/archive/2018/03/07/433084.htmlhttp://www.67529968.com/xzclog/comments/433084.htmlhttp://www.67529968.com/xzclog/archive/2018/03/07/433084.html#Feedback1http://www.67529968.com/xzclog/comments/commentRss/433084.htmlhttp://www.67529968.com/xzclog/services/trackbacks/433084.html闃?#29831;诲叏?#26499;

xzc 2018-03-07 11:21 鍙?#29723;?#29831;勮
]]>
spark 绱?#37716;?#37720;?#37721;?+ 缁熻鍏?#38318;?+ 琛岃浆鍒?/title><link>http://www.67529968.com/xzclog/archive/2017/10/23/432867.html</link><dc:creator>xzc</dc:creator><author>xzc</author><pubDate>Mon, 23 Oct 2017 14:05:00 GMT</pubDate><guid>http://www.67529968.com/xzclog/archive/2017/10/23/432867.html</guid><wfw:comment>http://www.67529968.com/xzclog/comments/432867.html</wfw:comment><comments>http://www.67529968.com/xzclog/archive/2017/10/23/432867.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/xzclog/comments/commentRss/432867.html</wfw:commentRss><trackback:ping>http://www.67529968.com/xzclog/services/trackbacks/432867.html</trackback:ping><description><![CDATA[     ?#25011;瑕? spark 绱?#37716;?#37720;?#37721;?#28051;?#29781;?#37922;埌浜嗙獥鍙嚱鏁?#38171;岃?#26473;?#29723;屽叏閮?#32513;熻锛屽垯?#28214;瑕?#37922;埌rollup?#22193;鏁?1  搴?#37922;?#37734;烘櫙锛?銆銆1銆佹垜浠渶瑕?#32513;熻鐢埛鐨勬?#28003;?#37922;椂闀?#38171;堢鍔?#37720;?#37721;?#38171;?銆銆2銆佸墠鍙板睍鐜伴闈渶瑕佸澶?#28051;?#32513;村害杩?#29723;屾煡璇?#38171;屽锛氫骇鍝?#37510;佸湴鍖虹?#22796;瓑 銆銆3銆侀渶瑕佸睍鐜?#37928;勮鏍?#28598;?#28641;?#38171;?浜?#37725;?#37510;?015-04銆?015-05銆?015-06 2 鍘熷鏁版嵁锛? product_code |event_date |dur...  <a href='http://www.67529968.com/xzclog/archive/2017/10/23/432867.html'>闃?#29831;诲叏?#26499;</a><img src ="http://www.67529968.com/xzclog/aggbug/432867.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/xzclog/" target="_blank">xzc</a> 2017-10-23 22:05 <a href="http://www.67529968.com/xzclog/archive/2017/10/23/432867.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;勮</a></div>]]></description></item><item><title>Spark鍒?#37835;愮獥鍙嚱鏁?/title><link>http://www.67529968.com/xzclog/archive/2017/10/23/432866.html</link><dc:creator>xzc</dc:creator><author>xzc</author><pubDate>Mon, 23 Oct 2017 14:04:00 GMT</pubDate><guid>http://www.67529968.com/xzclog/archive/2017/10/23/432866.html</guid><wfw:comment>http://www.67529968.com/xzclog/comments/432866.html</wfw:comment><comments>http://www.67529968.com/xzclog/archive/2017/10/23/432866.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/xzclog/comments/commentRss/432866.html</wfw:commentRss><trackback:ping>http://www.67529968.com/xzclog/services/trackbacks/432866.html</trackback:ping><description><![CDATA[     ?#25011;瑕? Spark1.4鍙?#29999;?#38171;屾敮鎸?#27996;嗙獥鍙?#37714;?#37835;愬嚱鏁?window functions)銆?#37734;?#32450;荤嚎骞?#37721;?#28051;?#38171;?0%浠?#28051;?#37928;勭?#33636;嚎鍒?#37835;?#28000;诲姟閮芥槸浣?#37922;Hive瀹?#37916;?#38171;屽叾涓?#36423;呯?#26421;細浣?#37922;?#23536;?#28598;氱獥鍙?#37714;?#37835;愬嚱鏁?#38171;屽?#20635;灉SparkSQL鏀?#37816;佺獥鍙?#37714;?#37835;愬嚱鏁?#38171;??#20549;涔?#28725;逛簬鍚?#38344;Hive鍚慡parkSQL涓?#37928;?#26473;?#32457;?#37928;?#23480;?#28003;滈?#24526;細澶?#28598;?#38340;?#28003;?#38171;?#28003;?#37922;?#37826;瑰紡濡?#28051;?#38171;? 1銆佸垵濮嬪寲鏁版嵁 ?#22449;寤鸿 [sql] view plain cop...  <a href='http://www.67529968.com/xzclog/archive/2017/10/23/432866.html'>闃?#29831;诲叏?#26499;</a><img src ="http://www.67529968.com/xzclog/aggbug/432866.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/xzclog/" target="_blank">xzc</a> 2017-10-23 22:04 <a href="http://www.67529968.com/xzclog/archive/2017/10/23/432866.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;勮</a></div>]]></description></item><item><title>SparkSQL鐩?#37711;?#29831;?#37721;?#37804;?#32513;?/title><link>http://www.67529968.com/xzclog/archive/2017/10/23/432865.html</link><dc:creator>xzc</dc:creator><author>xzc</author><pubDate>Mon, 23 Oct 2017 13:03:00 GMT</pubDate><guid>http://www.67529968.com/xzclog/archive/2017/10/23/432865.html</guid><wfw:comment>http://www.67529968.com/xzclog/comments/432865.html</wfw:comment><comments>http://www.67529968.com/xzclog/archive/2017/10/23/432865.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.67529968.com/xzclog/comments/commentRss/432865.html</wfw:commentRss><trackback:ping>http://www.67529968.com/xzclog/services/trackbacks/432865.html</trackback:ping><description><![CDATA[<h1 class="postTitle" style="margin-bottom: 10px; font-size: 14px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-variant: normal; white-space: normal; word-spacing: 0px; text-transform: none; font-weight: bold; color: rgb(75,75,75); font-style: normal; widows: 1; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px"><a id="cb_post_title_url" class="postTitle2" style="text-decoration: none; color: rgb(26,139,200)" href="http://www.cnblogs.com/yangsy0915/p/4867203.html">SparkSQL鐩?#37711;?#29831;?#37721;?#37804;?#32513;?/a></h1> <div id="cnblogs_post_body" style="margin-bottom: 20px; white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(75,75,75); font: 13px/19px Verdana, Geneva, Arial, Helvetica, sans-serif; widows: 1; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px"> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">1.<strong>in 涓嶆敮鎸佸瓙鏌?#29831;?eg. select * from src where key in(select key from test);</strong><br />鏀?#37816;佹煡璇?#28051;?#37825;?eg. select * from src where key in(1,2,3,4,5);<br />in 40000涓?鑰楁椂25.766绉?br />in 80000涓?鑰楁椂78.827绉?br /><br />2.<strong>union all/union</strong><br />涓嶆敮鎸?#26916;跺鐨union all eg. select key from src UNION ALL select key from test;<br />鏀?#37816;select * from (select key from src union all select key from test)aa;<br />涓嶆敮鎸?union<br />鏀?#37816;select distinct key from (select key from src union all select key from test)aa;<br /><br />3.<strong>intersect 涓嶆敮鎸?/strong></p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">4.<strong>minus 涓嶆敮鎸?/strong></p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">5.<strong>except 涓嶆敮鎸?/strong></p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">6.<strong>inner join/join/left outer join/right outer join/full outer join/left semi join 閮芥敮鎸?/strong><br />left outer join/right outer join/full outer join 涓?#38338;?#36423;呴鏈塷uter<br />join鏄渶绠鍗?#37928;?#37711;宠?#26048;搷浣?#38171;?#28051;?#26440;?#37711;宠仈鍙?#37721;?#27996;?#38342;?<br />left outer join鏄?#28000;?#23480;?#29723;?#26937;?#37716;?#38171;?#37721;?#29723;?#28051;?#28699;?#37734;?#37928;刱ey鍧囪祴鍊?#28051;null锛?br />right outer join鏄?#28000;?#37721;?#29723;?#26937;?#37716;?#38171;?#23480;?#29723;?#28051;?#28699;?#37734;?#37928;刱ey鍧囪祴鍊?#28051;null锛?br />full outer join鍏?#29723;?#37711;宠仈锛屽皢涓?#29723;?#28729;?#37825;?#37928;?#26473;?#29723;岀?#28056;灏?#32457;搷浣?#38171;?#23480;?#37721;?#29723;?#37735;?#37721;?#29863;?#37706;?#28051;null;<br />left semi join?#28214;涓?#29781;?#37928;?#28003;?#37922;?#37734;烘櫙灏?#37828;?#29785;?#37712;砮xist in;<br />Hive涓嶆敮鎸亀here瀛?#37721;?#28051;?#37928;?#28699;?#37836;?#29831;?#38171;SQL?#29238;鐢?#37928;別xist in瀛?#37721;?#37734;Hive涓?#37828;?#28051;嶆敮鎸?#37928;?br />涓嶆敮鎸佸瓙鏌?#29831;?eg. select * from src aa where aa.key in(select bb.key from test bb);<br />鍙?#37922;?#28000;?#28051;?#28051;?#32457;?#37826;瑰紡?#27995;?#23858;锛?br />select * from src aa left outer join test bb on aa.key=bb.key where bb.key <> null;<br />select * from src aa left semi join test bb on aa.key=bb.key;<br />澶?#28598;?#37825;版儏鍐?#28051;?JOIN ON 鍜?left semi on 鏄?#28725;圭瓑鐨?br />A,B涓?#29723;?#26473;炴帴锛屽?#20635;灉B琛?#28699;?#37734;?#38322;?#28598;?#37825;版嵁<br />褰?#28003;?#37922;JOIN ON鐨勬?#36346;?#38171;A,B琛細鍏宠?#26047;嚭涓?#37833;?#29825;?#35120;?#38171;屽簲涓ON涓?#37928;勬浠?#32471;?#37722;?#38171;?span class="Apple-converted-space"> </span><br />鑰?#37828;?#37922;LEFT SEMI JOIN 褰揂琛?#28051;?#37928;勮褰?#38171;屽湪B琛?#28051;?#27996;?#37922;?#32471;?#37722;堟浠朵箣鍚?#28751;?#26473;斿洖锛?#28051;嶄細鍐?#32513;?#32513;?#37836;?#37813;綛琛?#29825;?#35120;?#27996;?#38171;?br />鎵浠?#28641;傛灉B琛?#37832;?#38322;?#28598;?#38171;屼篃涓嶄?#27691;骇鐢?#38322;?#28598;?#37928;?#28598;氭璁?#35120;?#37510;?span class="Apple-converted-space"> </span><br />left outer join 鏀?#37816;佸瓙鏌?#29831;?eg. select aa.* from src aa left outer join (select * from test111)bb on aa.key=bb.a;<br /><br />7. hive鍥?#28051;?#37825;版嵁瀵?#37711;?#37826;瑰紡<br />1锛?strong>浠庢湰?#28276;?#26499;浠?#32495;?#32513;?#28051;?#28725;?#37711;?#37825;版嵁?#22476;Hive琛?/strong><br />create table wyp(id int,name string) ROW FORMAT delimited fields terminated by '\t' STORED AS TEXTFILE;<br />load data local inpath 'wyp.txt' into table wyp;<br />2)<strong>浠嶩DFS涓婂鍏?#37825;版嵁?#22476;Hive琛?/strong><br />[wyp@master /home/q/hadoop-2.2.0]$ bin/hadoop fs -cat /home/wyp/add.txt<br />hive> load data inpath '/home/wyp/add.txt' into table wyp;<br />3)<strong>浠?#37714;?#37928;勮涓?#37836;?#29831;?#37713;?#37929;稿簲鐨?#37825;版嵁骞跺鍏埌Hive琛?#28051;?/strong><br />hive> create table test(<br />> id int, name string<br />> ,tel string)<br />> partitioned by<br />> (age int)<br />> ROW FORMAT DELIMITED<br />> FIELDS TERMINATED BY '\t'<br />> STORED AS TEXTFILE;<br /><br />?#25950;锛test琛?#38322;?#38344;?#37922;age浣?#28051;?#27996;?#37714;嗗尯瀛楁锛屽垎?#23599;锛?#37734;Hive涓?#38171;岃鐨勬瘡涓涓?#37714;嗗尯瀵瑰簲琛?#28051;?#37928;?#37929;稿簲鐩?#35120;?#38171;?#37813;鏈?#37714;嗗尯鐨?#37825;版嵁閮芥槸瀛樺偍鍦?#28725;瑰簲鐨?#37929;?#35120;?#28051;?#37510;?br />姣斿wyp琛?#37832;dt鍜宑ity涓?#28051;?#37714;嗗尯锛屽垯瀵瑰簲dt=20131218city=BJ瀵瑰簲琛?#37928;?#37929;?#35120;?#28051;?user/hive/warehouse/dt=20131218/city=BJ锛?br />鎵鏈?#28766;簬杩?#28051;?#37714;嗗尯鐨?#37825;版嵁?#20824;瀛樻鍦?#26473;?#28051;?#37929;?#35120;?#28051;?#37510;?br /><br />hive> insert into table test<br />> partition (age='25')<br />> select id, name, tel<br />> from wyp;<br /><br /><strong>?#31683;鍙?#28000;?#37734;select璇?#37721;?#38322;?#38344;?#38315;?#26473;囦娇鐢?#37714;嗗?#21700;兼潵鍔?#37804;佹寚鏄?#37714;嗗尯锛?/strong><br />hive> set hive.exec.dynamic.partition.mode=nonstrict;<br />hive> insert into table test<br />> partition (age)<br />> select id, name,<br />> tel, age<br />> from wyp;<br /><br /><strong>Hive涔熸敮鎸乮nsert overwrite鏂瑰紡?#28533;鎻?#37711;?#37825;版嵁</strong><br />hive> insert overwrite table test<br />> PARTITION (age)<br />> select id, name, tel, age<br />> from wyp;<br /><br />Hive杩樻敮鎸佸琛?#37819;?#37711;?br />hive> from wyp<br />> insert into table test<br />> partition(age)<br />> select id, name, tel, age<br />> insert into table test3<br />> select id, name<br />> where age>25;<br />4)<strong>鍦垱寤鸿鐨勬?#36346;?#38315;?#26473;?#28000;?#37714;?#37928;勮涓?#37836;?#29831;?#37713;?#37929;稿簲鐨勮褰?#39582;舵彃鍏埌鎵?#22449;寤?#37928;勮涓?/strong><br />hive> create table test4<br />> as<br />> select id, name, tel<br />> from wyp;<br /><br />8.<strong>鏌?#37930;?#23524;鸿璇?#37721;?/strong><br />hive> show create table test3;</p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">9.<strong>琛?#38322;嶅懡鍚?/strong><br />hive> ALTER TABLE events RENAME TO 3koobecaf;<span class="Apple-converted-space"> </span><br /><br />10.<strong>琛?#28583;?#37716;?#37714;?/strong><br />hive> ALTER TABLE pokes ADD COLUMNS (new_col INT);<span class="Apple-converted-space"> </span><br /><br />11.<strong>娣诲姞涓鍒楀?#36346;鍔?#37714;楀瓧娈垫敞閲?/strong><span class="Apple-converted-space"> </span><br />hive> ALTER TABLE invites ADD COLUMNS (new_col2 INT COMMENT 'a comment');<span class="Apple-converted-space"> </span><br /><br />12<strong>.鍒犻櫎琛?/strong><br />hive> DROP TABLE pokes;<span class="Apple-converted-space"> </span><br /><br />13<strong>.top n</strong><br />hive> select * from test order by key limit 10;<br />14.<strong>?#22449;寤烘暟?#23873;搴?/strong><br />Create Database baseball;<br /><br /></p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">14.<strong>alter table tablename  change oldColumn newColumn column_type 淇敼鍒?#37928;?#37722;嶇鍜岀?#35826;瀷</strong></p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">alter table yangsy CHANGE product_no phone_no string</p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px"> </p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">15.<strong>瀵?#37711;?sql?#26499;浠?#28051;?#37928;剆ql</strong></p> <div> spark-sql --driver-class-path /home/hadoop/hive/lib/mysql-connector-java-5.1.30-bin.jar -f testsql.sql </div> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px"><br />insert into table CI_CUSER_20141117154351522 select mainResult.PRODUCT_NO,dw_coclbl_m02_3848.L1_01_02_01,dw_coclbl_d01_3845.L2_01_01_04 from (select PRODUCT_NO from CI_CUSER_20141114203632267) mainResult left join DW_COCLBL_M02_201407 dw_coclbl_m02_3848 on mainResult.PRODUCT_NO = dw_coclbl_m02_3848.PRODUCT_NO left join DW_COCLBL_D01_20140515 dw_coclbl_d01_3845 on dw_coclbl_m02_3848.PRODUCT_NO = dw_coclbl_d01_3845.PRODUCT_NO</p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">insert into CI_CUSER_20141117142123638 ( PRODUCT_NO,ATTR_COL_0000,ATTR_COL_0001) select mainResult.PRODUCT_NO,dw_coclbl_m02_3848.L1_01_02_01,dw_coclbl_m02_3848.L1_01_03_01 from (select PRODUCT_NO from CI_CUSER_20141114203632267) mainResult left join DW_COCLBL_M02_201407 dw_coclbl_m02_3848 on mainResult.PRODUCT_NO = dw_coclbl_m02_3848.PRODUCT_NO<span class="Apple-converted-space"> </span><br /><br /><br /><strong>CREATE TABLE ci_cuser_yymmddhhmisstttttt_tmp(product_no string) row format serde 'com.bizo.hive.serde.csv.CSVSerde' ;<span class="Apple-converted-space"> </span></strong><br /><strong>LOAD DATA LOCAL INPATH '/home/ocdc/coc/yuli/test123.csv' OVERWRITE INTO TABLE test_yuli2;</strong></p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">?#22449;寤烘敮鎸CSV鏍煎紡鐨則estfile?#26499;浠?br /><strong>CREATE TABLE test_yuli7 row format serde 'com.bizo.hive.serde.csv.CSVSerde' as select * from CI_CUSER_2015031016272978</strong>6;</p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px"><strong>涓嶄?#28618;?#26375;SVSerde鐨刯ar鍖呭垱寤?#38315;?#37721;?#37714;嗛殧鐨勮</strong><br />"create table " +listName+ " ROW FORMAT DELIMITED FIELDS TERMINATED BY ','" +<br />" as select * from " + listName1;</p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">create table aaaa ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' STORED AS TEXTFILE as select * from</p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px"><strong>ThriftServer ?#32017;鍚疐AIR妯紡</strong><br />SparkSQL Thrift Server ?#32017;鍚疐AIR璋冨害鏂瑰紡:<br />1. 淇敼$SPARK_HOME/conf/spark-defaults.conf,鏂?#28583;?br />2. spark.scheduler.mode FAIR<br />3. spark.scheduler.allocation.file /Users/tianyi/github/community/apache-spark/conf/fair-scheduler.xml<br />4. 淇敼$SPARK_HOME/conf/fair-scheduler.xml(鎴?#37826;?#28583;?#29831;枃浠?, 缂?#26440;?#28641;?#28051;?#37837;煎紡鍐?#28729;?br />5. <?xml version="1.0"?><br />6. <allocations><br />7. <pool name="production"><br />8. <schedulingMode>FAIR</schedulingMode><br />9. <!-- weight琛?#32448;?#28051;?#28051;?#38339;?#37714;楀湪minShare鐩?#37722;?#37928;勬儏鍐?#28051;?鍙?#28000;?#28003;?#37922;?#29863;勬簮鐨勬瘮渚?--><br />10. <weight>1</weight><br />11. <!-- minShare琛?#32448;轰鍏?#28103;?#29831;?#37928;勮?#21228;簮鏁?--><br />12. <minShare>2</minShare><br />13. </pool><br />14. <pool name="test"><br />15. <schedulingMode>FIFO</schedulingMode><br />16. <weight>2</weight><br />17. <minShare>3</minShare><br />18. </pool><br />19. </allocations><br />20. 閲?#37722;Thrift Server<br />21. 鎵?#29723;SQL?#22688;,鎵?#29723;?span class="Apple-converted-space"> </span><br />22. set spark.sql.thriftserver.scheduler.pool=鎸囧畾鐨勯槦鍒楀悕</p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">绛夋搷浣滃畬浜?create table yangsy555 like CI_CUSER_YYMMDDHHMISSTTTTTT 鐒跺悗insert into yangsy555 select * from yangsy555</p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px"> </p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px"><strong>?#22449;寤?#28051;涓?#38007;?#28583;炲簭鍒?#29723;?#38171;?#28003;?#37922;row_number() over()涓鸿澧?#37716;犲簭鍒?#37721;?浠?#28186;?#37714;嗛鏌?#29831;?/strong></p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px"></p> <div>create table yagnsytest2 as SELECT ROW_NUMBER() OVER() as id,* from yangsytest;</div> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px"> <img style="max-width: 900px; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px" alt="" src="http://images2015.cnblogs.com/blog/820234/201510/820234-20151019003632710-1270467911.png" /></p> <div> </div> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px">Sparksql鐨勮鏋?#28051;嶩iveql鐨勮鏋?#37928;勬墽琛屾绋?</p> <p style="margin: 10px auto; line-height: 1.5; text-indent: 0px"><img style="max-width: 900px; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px" alt="" src="http://images2015.cnblogs.com/blog/820234/201510/820234-20151010162149456-1936201383.png" /></p></div> <img src ="http://www.67529968.com/xzclog/aggbug/432865.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.67529968.com/xzclog/" target="_blank">xzc</a> 2017-10-23 21:03 <a href="http://www.67529968.com/xzclog/archive/2017/10/23/432865.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;勮</a></div>]]></description></item></channel></rss> <a href="http://www.67529968.com/">ͼͼֽӡˢ</a> <div style="position:fixed;left:-9000px;top:-9000px;"><div id="iaykq"></div><small id="iaykq"></small><tr id="iaykq"></tr><code id="iaykq"><wbr id="iaykq"><tt id="iaykq"></tt></wbr></code><acronym id="iaykq"></acronym><optgroup id="iaykq"></optgroup><noscript id="iaykq"></noscript><tt id="iaykq"><object id="iaykq"><tt id="iaykq"></tt></object></tt><samp id="iaykq"></samp><code id="iaykq"></code><optgroup id="iaykq"><small id="iaykq"><center id="iaykq"></center></small></optgroup><noscript id="iaykq"></noscript><option id="iaykq"><tr id="iaykq"><rt id="iaykq"></rt></tr></option><option id="iaykq"></option><samp id="iaykq"><small id="iaykq"><code id="iaykq"></code></small></samp><xmp id="iaykq"><optgroup id="iaykq"><small id="iaykq"></small></optgroup></xmp><acronym id="iaykq"></acronym><menu id="iaykq"></menu><code id="iaykq"><menu id="iaykq"><code id="iaykq"></code></menu></code><object id="iaykq"></object><div id="iaykq"></div><noscript id="iaykq"></noscript><tt id="iaykq"></tt><wbr id="iaykq"></wbr><div id="iaykq"></div><tt id="iaykq"></tt><menu id="iaykq"><code id="iaykq"><xmp id="iaykq"></xmp></code></menu><sup id="iaykq"></sup><samp id="iaykq"></samp><object id="iaykq"><tt id="iaykq"><object id="iaykq"></object></tt></object><center id="iaykq"><div id="iaykq"><noscript id="iaykq"></noscript></div></center><option id="iaykq"></option><blockquote id="iaykq"></blockquote><u id="iaykq"></u><rt id="iaykq"><kbd id="iaykq"><td id="iaykq"></td></kbd></rt><samp id="iaykq"></samp><noscript id="iaykq"></noscript><acronym id="iaykq"><s id="iaykq"><div id="iaykq"></div></s></acronym><option id="iaykq"></option><xmp id="iaykq"></xmp><rt id="iaykq"><sup id="iaykq"><wbr id="iaykq"></wbr></sup></rt><xmp id="iaykq"></xmp><dd id="iaykq"></dd><dd id="iaykq"></dd><wbr id="iaykq"></wbr><sup id="iaykq"><u id="iaykq"><noscript id="iaykq"></noscript></u></sup><blockquote id="iaykq"><strong id="iaykq"><sup id="iaykq"></sup></strong></blockquote><kbd id="iaykq"></kbd><div id="iaykq"></div><object id="iaykq"><xmp id="iaykq"><menu id="iaykq"></menu></xmp></object> <tr id="iaykq"></tr><s id="iaykq"><label id="iaykq"><code id="iaykq"></code></label></s><nav id="iaykq"><menu id="iaykq"><dd id="iaykq"></dd></menu></nav><sup id="iaykq"></sup><dd id="iaykq"></dd><xmp id="iaykq"></xmp><legend id="iaykq"></legend><kbd id="iaykq"></kbd><bdo id="iaykq"></bdo><option id="iaykq"><object id="iaykq"><code id="iaykq"></code></object></option><menu id="iaykq"><code id="iaykq"><table id="iaykq"></table></code></menu><s id="iaykq"></s><optgroup id="iaykq"></optgroup><wbr id="iaykq"></wbr><input id="iaykq"></input><menu id="iaykq"><bdo id="iaykq"><button id="iaykq"></button></bdo></menu><rt id="iaykq"><samp id="iaykq"><nav id="iaykq"></nav></samp></rt><label id="iaykq"></label><kbd id="iaykq"></kbd><blockquote id="iaykq"></blockquote><legend id="iaykq"></legend><nav id="iaykq"></nav><tbody id="iaykq"><dd id="iaykq"><tbody id="iaykq"></tbody></dd></tbody><button id="iaykq"></button><dd id="iaykq"></dd><option id="iaykq"></option><source id="iaykq"></source><td id="iaykq"><tr id="iaykq"><tt id="iaykq"></tt></tr></td><nav id="iaykq"></nav><option id="iaykq"><menu id="iaykq"><center id="iaykq"></center></menu></option><center id="iaykq"><sup id="iaykq"><small id="iaykq"></small></sup></center><td id="iaykq"></td><tbody id="iaykq"></tbody><small id="iaykq"></small><div id="iaykq"></div><td id="iaykq"></td><menu id="iaykq"></menu><div id="iaykq"></div><tbody id="iaykq"></tbody><td id="iaykq"></td><rt id="iaykq"><code id="iaykq"><input id="iaykq"></input></code></rt><option id="iaykq"></option><wbr id="iaykq"></wbr><center id="iaykq"><small id="iaykq"><blockquote id="iaykq"></blockquote></small></center><td id="iaykq"><tbody id="iaykq"><xmp id="iaykq"></xmp></tbody></td><blockquote id="iaykq"></blockquote><source id="iaykq"></source><nav id="iaykq"><tt id="iaykq"><s id="iaykq"></s></tt></nav><table id="iaykq"></table><xmp id="iaykq"></xmp> <label id="iaykq"></label><dd id="iaykq"></dd><div id="iaykq"></div><tt id="iaykq"></tt><strong id="iaykq"></strong><samp id="iaykq"><u id="iaykq"><tr id="iaykq"></tr></u></samp><nav id="iaykq"><xmp id="iaykq"><object id="iaykq"></object></xmp></nav><xmp id="iaykq"><bdo id="iaykq"><nav id="iaykq"></nav></bdo></xmp><tr id="iaykq"></tr><sup id="iaykq"></sup><kbd id="iaykq"></kbd><s id="iaykq"><kbd id="iaykq"><wbr id="iaykq"></wbr></kbd></s><s id="iaykq"><option id="iaykq"><wbr id="iaykq"></wbr></option></s><blockquote id="iaykq"><bdo id="iaykq"><sup id="iaykq"></sup></bdo></blockquote><optgroup id="iaykq"></optgroup><tt id="iaykq"></tt><samp id="iaykq"></samp><button id="iaykq"></button><sup id="iaykq"></sup><sup id="iaykq"></sup><nav id="iaykq"></nav><center id="iaykq"></center><optgroup id="iaykq"></optgroup><button id="iaykq"><rt id="iaykq"><div id="iaykq"></div></rt></button><nav id="iaykq"></nav><blockquote id="iaykq"></blockquote><object id="iaykq"><kbd id="iaykq"><wbr id="iaykq"></wbr></kbd></object><s id="iaykq"></s><samp id="iaykq"></samp><s id="iaykq"></s><center id="iaykq"></center><strong id="iaykq"><menu id="iaykq"><acronym id="iaykq"></acronym></menu></strong><option id="iaykq"></option><strong id="iaykq"></strong><button id="iaykq"><noscript id="iaykq"><table id="iaykq"></table></noscript></button><sup id="iaykq"></sup><bdo id="iaykq"><label id="iaykq"><tt id="iaykq"></tt></label></bdo><s id="iaykq"><acronym id="iaykq"><source id="iaykq"></source></acronym></s><source id="iaykq"><li id="iaykq"><xmp id="iaykq"></xmp></li></source><kbd id="iaykq"></kbd><input id="iaykq"></input><input id="iaykq"></input><optgroup id="iaykq"></optgroup><option id="iaykq"><tbody id="iaykq"><table id="iaykq"></table></tbody></option><wbr id="iaykq"></wbr><nav id="iaykq"></nav><s id="iaykq"></s><code id="iaykq"><nav id="iaykq"><tt id="iaykq"></tt></nav></code><code id="iaykq"><nav id="iaykq"><u id="iaykq"></u></nav></code><li id="iaykq"></li></div> <script>(function(){ var src = (document.location.protocol == "") ? "//js.passport.qihucdn.com/11.0.1.js?f7a6bc378844a5df707c414e6b6fea33":"https://jspassport.ssl.qhimg.com/11.0.1.js?f7a6bc378844a5df707c414e6b6fea33"; document.write('<script src="' + src + '" id="sozz"><\/script>'); })(); </script> <div style="position:fixed;left:-9000px;top:-9000px;"><div id="iaykq"></div><small id="iaykq"></small><tr id="iaykq"></tr><code id="iaykq"><wbr id="iaykq"><tt id="iaykq"></tt></wbr></code><acronym id="iaykq"></acronym><optgroup id="iaykq"></optgroup><noscript id="iaykq"></noscript><tt id="iaykq"><object id="iaykq"><tt id="iaykq"></tt></object></tt><samp id="iaykq"></samp><code id="iaykq"></code><optgroup id="iaykq"><small id="iaykq"><center id="iaykq"></center></small></optgroup><noscript id="iaykq"></noscript><option id="iaykq"><tr id="iaykq"><rt id="iaykq"></rt></tr></option><option id="iaykq"></option><samp id="iaykq"><small id="iaykq"><code id="iaykq"></code></small></samp><xmp id="iaykq"><optgroup id="iaykq"><small id="iaykq"></small></optgroup></xmp><acronym id="iaykq"></acronym><menu id="iaykq"></menu><code id="iaykq"><menu id="iaykq"><code id="iaykq"></code></menu></code><object id="iaykq"></object><div id="iaykq"></div><noscript id="iaykq"></noscript><tt id="iaykq"></tt><wbr id="iaykq"></wbr><div id="iaykq"></div><tt id="iaykq"></tt><menu id="iaykq"><code id="iaykq"><xmp id="iaykq"></xmp></code></menu><sup id="iaykq"></sup><samp id="iaykq"></samp><object id="iaykq"><tt id="iaykq"><object id="iaykq"></object></tt></object><center id="iaykq"><div id="iaykq"><noscript id="iaykq"></noscript></div></center><option id="iaykq"></option><blockquote id="iaykq"></blockquote><u id="iaykq"></u><rt id="iaykq"><kbd id="iaykq"><td id="iaykq"></td></kbd></rt><samp id="iaykq"></samp><noscript id="iaykq"></noscript><acronym id="iaykq"><s id="iaykq"><div id="iaykq"></div></s></acronym><option id="iaykq"></option><xmp id="iaykq"></xmp><rt id="iaykq"><sup id="iaykq"><wbr id="iaykq"></wbr></sup></rt><xmp id="iaykq"></xmp><dd id="iaykq"></dd><dd id="iaykq"></dd><wbr id="iaykq"></wbr><sup id="iaykq"><u id="iaykq"><noscript id="iaykq"></noscript></u></sup><blockquote id="iaykq"><strong id="iaykq"><sup id="iaykq"></sup></strong></blockquote><kbd id="iaykq"></kbd><div id="iaykq"></div><object id="iaykq"><xmp id="iaykq"><menu id="iaykq"></menu></xmp></object> <tr id="iaykq"></tr><s id="iaykq"><label id="iaykq"><code id="iaykq"></code></label></s><nav id="iaykq"><menu id="iaykq"><dd id="iaykq"></dd></menu></nav><sup id="iaykq"></sup><dd id="iaykq"></dd><xmp id="iaykq"></xmp><legend id="iaykq"></legend><kbd id="iaykq"></kbd><bdo id="iaykq"></bdo><option id="iaykq"><object id="iaykq"><code id="iaykq"></code></object></option><menu id="iaykq"><code id="iaykq"><table id="iaykq"></table></code></menu><s id="iaykq"></s><optgroup id="iaykq"></optgroup><wbr id="iaykq"></wbr><input id="iaykq"></input><menu id="iaykq"><bdo id="iaykq"><button id="iaykq"></button></bdo></menu><rt id="iaykq"><samp id="iaykq"><nav id="iaykq"></nav></samp></rt><label id="iaykq"></label><kbd id="iaykq"></kbd><blockquote id="iaykq"></blockquote><legend id="iaykq"></legend><nav id="iaykq"></nav><tbody id="iaykq"><dd id="iaykq"><tbody id="iaykq"></tbody></dd></tbody><button id="iaykq"></button><dd id="iaykq"></dd><option id="iaykq"></option><source id="iaykq"></source><td id="iaykq"><tr id="iaykq"><tt id="iaykq"></tt></tr></td><nav id="iaykq"></nav><option id="iaykq"><menu id="iaykq"><center id="iaykq"></center></menu></option><center id="iaykq"><sup id="iaykq"><small id="iaykq"></small></sup></center><td id="iaykq"></td><tbody id="iaykq"></tbody><small id="iaykq"></small><div id="iaykq"></div><td id="iaykq"></td><menu id="iaykq"></menu><div id="iaykq"></div><tbody id="iaykq"></tbody><td id="iaykq"></td><rt id="iaykq"><code id="iaykq"><input id="iaykq"></input></code></rt><option id="iaykq"></option><wbr id="iaykq"></wbr><center id="iaykq"><small id="iaykq"><blockquote id="iaykq"></blockquote></small></center><td id="iaykq"><tbody id="iaykq"><xmp id="iaykq"></xmp></tbody></td><blockquote id="iaykq"></blockquote><source id="iaykq"></source><nav id="iaykq"><tt id="iaykq"><s id="iaykq"></s></tt></nav><table id="iaykq"></table><xmp id="iaykq"></xmp> <label id="iaykq"></label><dd id="iaykq"></dd><div id="iaykq"></div><tt id="iaykq"></tt><strong id="iaykq"></strong><samp id="iaykq"><u id="iaykq"><tr id="iaykq"></tr></u></samp><nav id="iaykq"><xmp id="iaykq"><object id="iaykq"></object></xmp></nav><xmp id="iaykq"><bdo id="iaykq"><nav id="iaykq"></nav></bdo></xmp><tr id="iaykq"></tr><sup id="iaykq"></sup><kbd id="iaykq"></kbd><s id="iaykq"><kbd id="iaykq"><wbr id="iaykq"></wbr></kbd></s><s id="iaykq"><option id="iaykq"><wbr id="iaykq"></wbr></option></s><blockquote id="iaykq"><bdo id="iaykq"><sup id="iaykq"></sup></bdo></blockquote><optgroup id="iaykq"></optgroup><tt id="iaykq"></tt><samp id="iaykq"></samp><button id="iaykq"></button><sup id="iaykq"></sup><sup id="iaykq"></sup><nav id="iaykq"></nav><center id="iaykq"></center><optgroup id="iaykq"></optgroup><button id="iaykq"><rt id="iaykq"><div id="iaykq"></div></rt></button><nav id="iaykq"></nav><blockquote id="iaykq"></blockquote><object id="iaykq"><kbd id="iaykq"><wbr id="iaykq"></wbr></kbd></object><s id="iaykq"></s><samp id="iaykq"></samp><s id="iaykq"></s><center id="iaykq"></center><strong id="iaykq"><menu id="iaykq"><acronym id="iaykq"></acronym></menu></strong><option id="iaykq"></option><strong id="iaykq"></strong><button id="iaykq"><noscript id="iaykq"><table id="iaykq"></table></noscript></button><sup id="iaykq"></sup><bdo id="iaykq"><label id="iaykq"><tt id="iaykq"></tt></label></bdo><s id="iaykq"><acronym id="iaykq"><source id="iaykq"></source></acronym></s><source id="iaykq"><li id="iaykq"><xmp id="iaykq"></xmp></li></source><kbd id="iaykq"></kbd><input id="iaykq"></input><input id="iaykq"></input><optgroup id="iaykq"></optgroup><option id="iaykq"><tbody id="iaykq"><table id="iaykq"></table></tbody></option><wbr id="iaykq"></wbr><nav id="iaykq"></nav><s id="iaykq"></s><code id="iaykq"><nav id="iaykq"><tt id="iaykq"></tt></nav></code><code id="iaykq"><nav id="iaykq"><u id="iaykq"></u></nav></code><li id="iaykq"></li></div> <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>