2006年12月21日

          Haddop 配置引起的
          WARN org.mortbay.log: /getimage: java.io.IOException: GetImage failed. java.io.IOException: Content-Length header is not provided by  the namenode when trying to fetch http://127.0.1.1:50090/getimage?getimage=1

          最近在翻看NameNode的log時發現經常有這一段信息出現:



          看來是SecondNameNode在向NameNode獲取Image時出的問題。雖然不影響hdfs使用,但是SecondName
          備份功能失效,任其下去萬一NameNode掛了那可就無處申冤了。
          經過Google大神幫助,得知需要在hdfs-site.xml中手動配置dfs.secondary.http.address,這個配置項的默認值如下
          <property>
            
          <name>dfs.namenode.secondary.http-address</name>
            
          <value>0.0.0.0:50090</value>
            
          <description>
              The secondary namenode http server address and port.
              If the port is 
          0 then the server will start on a free port.
            
          </description>
          </property>
          需要明確指明SecondName,與conf/master里面的名稱一樣
          <property>
            
          <name>dfs.namenode.secondary.http-address</name>
            
          <value>test-dn2:50090</value>
            
          <description>
              The secondary namenode http server address and port.
              If the port is 
          0 then the server will start on a free port.
            
          </description>
          </property>
          posted @ 2011-09-13 11:44 Juliashine 閱讀(886) | 評論 (1)編輯 收藏
           
          1、IE有全局event對象window.event,FF沒有,FF中的?event?只能在事件發生的現場使用,即必須通過事件綁定函數的參數來使用。
          <input?type="text"?name="input_content"?onkeydown="exeCode(event)"/>

          <script?language="javascript">
          function?exeCode()?{
          ??
          //取得事件對象
          ??var?event?=?arguments[0]?||?window.event;
          ??
          //取得事件的發生源對象
          ??var?element?=?event.srcElement?||?event.target;
          }

          </script>


          2、FireFox下沒有preserveWhiteSpace這個屬性,即:把空白也當作一個節點。而IE則默認為false,即把空白不看成一個節點。所以在FireFox下previousSibling可能是空白節點,除非兩個HTML標簽之間沒有任何形式的空格。

          3、IE下可以用document.frames("name").document的方式取得frame中所嵌頁面的document對象,FF下卻會得到null,解決的的辦法是document.getElementById(framename).contentWindow.document,也可以使用
          window.frames[frameName].document 直接獲取frame里的document對象


          最后推薦一篇文章:Javascript的IE和Firefox兼容性匯編
          posted @ 2007-03-29 15:06 Juliashine 閱讀(752) | 評論 (0)編輯 收藏
           
          在Hibernate中配置Proxool連接池
          1:在applicationContext.xml中配置SessionFactory
          <bean?id="sessionfactory"?class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
          ????<property?name="hibernateProperties">
          ????????<props>
          ????????????<prop?key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
          ????????????<prop?key="hibernate.show_sql">true</prop>
          ????????????<!--指定Proxool配置文件-->
          ????????????<prop?key="hibernate.proxool.properties">conf/proxool.properties</prop>
          ????????????<!--<prop?key="hibernate.proxool.xml">conf/proxool.xml</prop>-->
          ????????????<!--指定Proxool的alias,必須與Proxool的配置文件中的alias一致-->
          ????????????<prop?key="hibernate.proxool.pool_alias">hibernate-oracle</prop>
          ????????</props>
          ????</property>
          </bean>
          2:配置Proxool(conf/proxool.properties)
          #jdbc-0.proxool.alias=mysql
          #jdbc-0.proxool.driver-class=org.gjt.mm.mysql.Driver
          #jdbc-0.proxool.driver-url=jdbc:mysql://localhost:3306/contestdb?user=root&password=1234&useUnicode=true&characterEncoding=utf8
          #jdbc-0.user=root
          #jdbc-0.password=1234

          jdbc-0.proxool.alias=hibernatea-oracle
          jdbc-0.proxool.driver-class=oracle.jdbc.driver.OracleDriver
          jdbc-0.proxool.driver-url=jdbc:oracle:thin:@172.16.2.6:1521:dbname
          jdbc-0.user=username
          jdbc-0.password=username
          jdbc-0.proxool.maximum-connection-count=20
          jdbc-0.proxool.house-keeping-test-sql=SELECT?SYSDATE?FROM?DUAL;
          #DEBUG,?INFO,?WARN,?ERROR,?FATAL.
          jdbc-0.proxool.statistics-log-level=ERROR
          posted @ 2006-12-21 15:13 Juliashine 閱讀(430) | 評論 (0)編輯 收藏
           
          ???????? The?URL?extension?to?use?to?determine?if?the?request?is?meant?for?a?Struts?action?
          ???????????用URL擴展名來確定是否這個請求是被用作Struts?action,其實也就是設置?action的后綴,例如login.do的'do'字。

          struts.configuration
          ??????????The?org.apache.struts2.config.Configuration?implementation?class
          ????????????org.apache.struts2.config.Configuration接口名

          struts.configuration.files
          ??????????A?list?of?configuration?files?automatically?loaded?by?Struts?
          ???????????struts自動加載的一個配置文件列表

          struts.configuration.xml.reload
          ??????????Whether?to?reload?the?XML?configuration?or?not
          ???????????是否加載xml配置(true,false)

          struts.continuations.package
          ???????????The?package?containing?actions?that?use?Rife?continuations
          ???????????含有actions的完整連續的package名稱

          struts.custom.i18n.resources
          ??????????Location?of?additional?localization?properties?files?to?load?
          ???????????加載附加的國際化屬性文件(不包含.properties后綴)

          struts.custom.properties
          ??????????Location?of?additional?configuration?properties?files?to?load
          ???????????加載附加的配置文件的位置


          struts.devMode
          ??????????Whether?Struts?is?in?development?mode?or?not
          ???????????是否為struts開發模式

          struts.dispatcher.parametersWorkaround
          ??????????Whether?to?use?a?Servlet?request?parameter?workaround?necessary?for?some?versions?of?WebLogic
          ????????????(某些版本的weblogic專用)是否使用一個servlet請求參數工作區(PARAMETERSWORKAROUND)

          struts.enable.DynamicMethodInvocation
          ??????????Allows?one?to?disable?dynamic?method?invocation?from?the?URL
          ????????????允許動態方法調用

          struts.freemarker.manager.classname
          ??????????The?org.apache.struts2.views.freemarker.FreemarkerManager?implementation?class?
          ???????????org.apache.struts2.views.freemarker.FreemarkerManager接口名

          struts.i18n.encoding
          ??????????The?encoding?to?use?for?localization?messages
          ???????????國際化信息內碼

          struts.i18n.reload
          ??????????Whether?the?localization?messages?should?automatically?be?reloaded
          ???????????是否國際化信息自動加載?

          struts.locale
          ??????????The?default?locale?for?the?Struts?application
          ???????????默認的國際化地區信息

          struts.mapper.class
          ??????????The?org.apache.struts2.dispatcher.mapper.ActionMapper?implementation?class
          ????????????org.apache.struts2.dispatcher.mapper.ActionMapper接口

          struts.multipart.maxSize
          ??????????The?maximize?size?of?a?multipart?request?(file?upload)
          ???????????multipart請求信息的最大尺寸(文件上傳用)?

          struts.multipart.parser
          ??????????The?org.apache.struts2.dispatcher.multipart.
          ??????????MultiPartRequest?parser?implementation?for?a?multipart?request?(file?upload)?
          ??????????專為multipart請求信息使用的org.apache.struts2.dispatcher.multipart.MultiPartRequest解析器接口(文件上傳用)


          struts.multipart.saveDir
          ??????????The?directory?to?use?for?storing?uploaded?files?
          ???????????設置存儲上傳文件的目錄夾

          struts.objectFactory
          ??????????The?com.opensymphony.xwork2.ObjectFactory?implementation?class
          ???????????com.opensymphony.xwork2.ObjectFactory接口(spring)

          struts.objectFactory.spring.autoWire
          ??????????Whether?Spring?should?autoWire?or?not
          ???????????是否自動綁定Spring

          struts.objectFactory.spring.useClassCache
          ??????????Whether?Spring?should?use?its?class?cache?or?not
          ???????????是否spring應該使用自身的cache?

          struts.objectTypeDeterminer
          ??????????The?com.opensymphony.xwork2.util.ObjectTypeDeterminer?implementation?class
          ????????????com.opensymphony.xwork2.util.ObjectTypeDeterminer接口

          struts.serve.static.browserCache
          ??If?static?content?served?by?the?Struts?filter?should?set?browser?caching?header?properties?or?not?
          ???????????是否struts過濾器中提供的靜態內容應該被瀏覽器緩存在頭部屬性中

          struts.serve.static
          ??????????Whether?the?Struts?filter?should?serve?static?content?or?not?
          ???????????是否struts過濾器應該提供靜態內容

          struts.tag.altSyntax
          ??????????Whether?to?use?the?alterative?syntax?for?the?tags?or?not?
          ???????????是否可以用替代的語法替代tags

          struts.ui.templateDir
          ??????????The?directory?containing?UI?templates
          ???????????UI?templates的目錄夾?

          struts.ui.theme
          ??????????The?default?UI?template?theme
          ???????????默認的UI?template主題

          struts.url.http.port
          ??????????The?HTTP?port?used?by?Struts?URLs
          ???????????設置http端口

          struts.url.https.port
          ??????????The?HTTPS?port?used?by?Struts?URLs?
          ???????????設置https端口

          struts.url.includeParams
          ??????????The?default?includeParams?method?to?generate?Struts?URLs?
          ??????????在url中產生?默認的includeParams


          struts.velocity.configfile
          ??????????The?Velocity?configuration?file?path
          ???????????velocity配置文件路徑

          struts.velocity.contexts
          ??????????List?of?Velocity?context?names
          ???????????velocity的context列表


          struts.velocity.manager.classname
          ??????????org.apache.struts2.views.velocity.VelocityManager?implementation?class
          ???????????org.apache.struts2.views.velocity.VelocityManager接口名

          struts.velocity.toolboxlocation
          ??????????The?location?of?the?Velocity?toolbox
          ???????????velocity工具盒的位置?
          struts.xslt.nocache
          ??????????Whether?or?not?XSLT?templates?should?not?be?cached
          ???????????是否XSLT模版應該被緩存
          posted @ 2006-12-21 15:11 Juliashine 閱讀(552) | 評論 (0)編輯 收藏
           
          主站蜘蛛池模板: 阳原县| 萨嘎县| 台前县| 黄陵县| 叙永县| 孙吴县| 刚察县| 克山县| 阳山县| 灌阳县| 会宁县| 磴口县| 新泰市| 潜山县| 潢川县| 都昌县| 金山区| 民乐县| 马边| 余庆县| 宁德市| 肃南| 类乌齐县| 阳东县| 沭阳县| 隆子县| 如皋市| 平果县| 柏乡县| 宁乡县| 大同市| 黎平县| 阿鲁科尔沁旗| 县级市| 景宁| 和顺县| 鄢陵县| 滕州市| 阳谷县| 登封市| 蒙城县|