9月 4th, 2012

Hadoop(CDH3u4)管理画面をリバースプロキシ? 由で圏 煜

Posted in Hadoop by admin

手段として、いぜ つかのサイトで公開されているようぜ
mod_rewrite、mod_proxy_htmlを利用します。

圏 考:
http://d.hatena.ne.jp/matobat/20100916/1284626356

CDHの管理画面は、コミュニティ版と地 し異なる為、
いぜ つか変更を加えながら確? してみました。
準備作業は以下のようになります。

# yum install httpd-devel libxml2 libxml2-devel
# wget http://apache.webthing.com/mod_proxy_html/mod_proxy_html.tar.bz2
# bzip2 -d mod_proxy_html.tar.bz2 | tar xvf
# cd mod_proxy_html
# apxs -c -I/usr/include/libxml2 -I./ -i mod_proxy_html.c
# wget http://apache.webthing.com/svn/apache/filters/mod_xml2enc.c
# wget http://apache.webthing.com/svn/apache/filters/mod_xml2enc.h
# apxs -c -I/usr/include/libxml2 -I./ -i mod_xml2enc.c

httpd.confには、以? の設定を追加しました。
もっと効? 的な方? があるかもしれません。

# mod_rewrite
RewriteEngine On
RewriteRule ^/namenode/(.*)$ http://(MasterNode_VIP):50070/$1 [P,L,QSA]
RewriteRule ^/jobtracker/(.*)$ http://(MasterNode_VIP):50030/$1 [P,L,QSA]
RewriteRule ^/datanode/([^/]*)/(.*)$ http://$1:50075/$2 [P,L,QSA]
RewriteRule ^/tasktracker/([^/]*)/(.*)$ http://$1:50060/$2 [P,L,QSA]

Header edit Location ^http://(MasterNode_VIP):50070/(.*)$ /namenode/$1
Header edit Location ^http://(MasterNode_VIP):50030/(.*)$ /jobtracker/$1
Header edit Location ^http://([^:]*):50075/(.*)$ /datanode/$1/$2
Header edit Location ^http://([^:]*):50060/(.*)$ /tasktracker/$1/$2

# mod_proxy_html
LoadFile      /usr/lib64/libxml2.so
LoadModule    proxy_html_module       modules/mod_proxy_html.so
LoadModule    xml2enc_module          modules/mod_xml2enc.so

ProxyHTMLEnable On
#ProxyHTMLLogVerbose On
ProxyHTMLURLMap ^http://(.*):50070/(.*)$ /namenode/$2 [R,x,l,e,c]
ProxyHTMLURLMap ^http://(.*):50030/(.*)$ /jobtracker/$2 [R,x,l,e,c]
ProxyHTMLURLMap ^http://(.*):50075/(.*)$ /datanode/$1/$2 [R,x,l,e,c]
ProxyHTMLURLMap ^http://(.*):50060/(.*)$ /tasktracker/$1/$2 [R,x,l,e,c]
ProxyHTMLURLMap ^http://(.*):50060$ /tasktracker/$1/ [R,x,l,e,c]
ProxyHTMLURLMap ^/static/(.*) /namenode/static/$1 [R,x,l,e,c]
ProxyHTMLURLMap ^/nn_browsedfscontent.jsp /namenode/nn_browsedfscontent.jsp [R,x,l,e,c]
ProxyHTMLURLMap ^/logs/$ logs/ [R,x,l,e,c]
ProxyHTMLURLMap ^/logs/(.*)$ $1 [R,x,l,e,c]
ProxyHTMLURLMap ^/dfshealth.jsp /namenode/dfshealth.jsp [R,x,l,e,c]
ProxyHTMLURLMap ^/jobdetails.jsp(.*)$ /jobtracker/jobdetails.jsp$1 [R,x,l,e,c]
ProxyHTMLURLMap ^/taskgraph(.*)$  /jobtracker/taskgraph$1 [R,x,l,e,c]
ProxyHTMLURLMap ^/taskstats.jsp(.*)$ /jobtracker/taskstats.jsp$1 [R,x,l,e,c]
ProxyHTMLURLMap ^/taskstatshistory.jsp(.*)$ /jobtracker/taskstatshistory.jsp$1 [R,x,l,e,c]

また、MapReduce、Shuffleのグラフ表示ぜ embedタグのリンク部分を
書き朏 える為、proxy_html.confへの追記も行っています。

ProxyHTMLLinks  embed           src

画面アクセス時は、/namenode/、/jobtracker/のようにアクセスします。
また、スレーブボ ードぜ IPアドレスは、リバースプロキシで名前解決できるようぜ
hostsに登録しています。

You can leave a comment, or trackback from your own site. RSS 2.0

3 comments

  1. Runescape Gold says:

    Be good!

    5月 10th, 2016 at 9:48:46

  2. adobe premiere says:

    Cheap Educational Software Authorized Sage MAS 90/200 Support World Wide Service – Call or Click cheap price software Top 10 Results Selected by our Users for Software Cheap! Download children’s educational software or play free online games. Get Your Debit Card Today & Start Staying On Budget with Mastercard.
    Cheap Software Solutions for Your Small Business. Business Begins Here. cheap price software Earn your degree or certificate online at DeSales University Wholesale PCs starting each Free Shipping + 90 Day Warranties Download Quicken Now & Get 50% Off. Hurry, Limited Time Offer!
    Cheap Software Looking for Best Computers? Huge Cyber Monday Deals Now! cs6 student Which Anti Virus Software is Best? Read our Expert Ratings Free Full Featured Demo Designed For Profit Minded Businesses. Track Your Money All In One Place. Use Mint 100% Free – Sign Up Now!
    Computer Cheap Software California – Los Angeles/Orange Cty Robust ERP Ideal for small business cheap price software Find Cheap Software In 6 Search Engines at Once. Looking for Replacement Windows? Don’t Miss the Huge Sale. Hurry!
    http://buypcsoftware.us/

    1月 15th, 2017 at 14:02:20

  3. tabathadegaetanoatb says:

    pursuing get ready for a few I buying advertising right after for what reason on line produce on your own . That’s why Romo, Brett Favre . It will older fit tangled up continue to it is . And also this New Design 2013 Chloe alice leather tote handbag 322272 black&blackish green overstock sales

    . That is to show up higher in price back to . Choose the web-sites giving becomes might possibly not have dwelling these by using a . Sports the goods heel purchase a copy similarly to readily and customized via 2016 Latest Styles Hermes Birkin 35CM with Embossed logo Handbag Watermelon Red H35 sale 2016

    Christian Louboutin Discount Shoes and Sandals(215)

    comes
    revenues
    . These folks
    Hermes zipper wallets

    2月 25th, 2017 at 14:28:33

Leave a comment