hadoop 配置history server 和timeline server

一,配置history server

1.配置history server,在etc/hadoop/mapred-site.xml中配置以下内容.

  
    mapreduce.jobhistory.address
     localhost:10020
  
  
    mapreduce.jobhistory.webapp.address
    localhost:19888
  

2.把配置分发到所有服务器

3.启动服务,以localhost这台服务器上执行以下语句:

mr-jobhistory-daemon.sh  start historyserver



二 ,配置timeline server

1.配置history server,在etc/hadoop/yarn-site.xml中配置以下内容.


  
      
    yarn.timeline-service.hostname
    localhost
  
  
  Address for the Timeline server to start the RPC server.
  yarn.timeline-service.address
  ${yarn.timeline-service.hostname}:10200



  The http address of the Timeline service web application.
  yarn.timeline-service.webapp.address
  ${yarn.timeline-service.hostname}:8188



  The https address of the Timeline service web application.
  yarn.timeline-service.webapp.https.address
  ${yarn.timeline-service.hostname}:8190



  Handler thread count to serve the client RPC requests.
  yarn.timeline-service.handler-thread-count
  10



  Enables cross-origin support (CORS) for web services where
  cross-origin web response headers are needed. For example, javascript making
  a web services request to the timeline server.
  yarn.timeline-service.http-cross-origin.enabled
  false



  Comma separated list of origins that are allowed for web
  services needing cross-origin (CORS) support. Wildcards (*) and patterns
  allowed
  yarn.timeline-service.http-cross-origin.allowed-origins
  *



  Comma separated list of methods that are allowed for web
  services needing cross-origin (CORS) support.
  yarn.timeline-service.http-cross-origin.allowed-methods
  GET,POST,HEAD



  Comma separated list of headers that are allowed for web
  services needing cross-origin (CORS) support.
  yarn.timeline-service.http-cross-origin.allowed-headers
  X-Requested-With,Content-Type,Accept,Origin



  The number of seconds a pre-flighted request can be cached
  for web services needing cross-origin (CORS) support.
  yarn.timeline-service.http-cross-origin.max-age
  1800


  Indicate to ResourceManager as well as clients whether
  history-service is enabled or not. If enabled, ResourceManager starts
  recording historical data that Timelien service can consume. Similarly,
  clients can redirect to the history service when applications
  finish if this is enabled.
  yarn.timeline-service.generic-application-history.enabled
  true



  Store class name for history store, defaulting to file system
  store
  yarn.timeline-service.generic-application-history.store-class
  org.apache.hadoop.yarn.server.applicationhistoryservice.FileSystemApplicationHistoryStore


  Indicate to clients whether Timeline service is enabled or not.
  If enabled, the TimelineClient library used by end-users will post entities
  and events to the Timeline server.
  yarn.timeline-service.enabled
  true



  Store class name for timeline store.
  yarn.timeline-service.store-class
  org.apache.hadoop.yarn.server.timeline.LeveldbTimelineStore



  Enable age off of timeline store data.
  yarn.timeline-service.ttl-enable
  true



  Time to live for timeline store data in milliseconds.
  yarn.timeline-service.ttl-ms
  6048000000

  

2.把配置分发到所有服务器

3.启动服务,以localhost这台服务器上执行以下语句:

yarn-daemon.sh start timelineserver



你可能感兴趣的:(hadoop)