System operation in the main and CacheController AdminController

  System中的主要操作在AdminController和CacheController
  
  一. 源码结构
  
  前端源码: angular:下面为自定义方法:
  
  * Method type is PUT
  
  * Additional Query parameter action=config is sent
  
  * The expected return type not is an Array
  
  */ updateConfig: {method: 'PUT', params: {action: 'config'}, isArray: false}
  
  KylinApp.factory('AdminService', ['$resource', function ($resource, config) {
  
  return $resource(Config.service.url + 'admin/:action', {}, {
  
  env: {method: 'GET', params: {action: 'env'}, isArray: false},
  
  config: {method: 'GET', params: {action: 'config'}, isArray: false},
  
  publicConfig: {method: 'GET', params: {action: 'public_config'}, isArray: false},
  
  cleanStorage: {Method: 'the DELETE', the params: {Action: 'Storage'}, the isArray: to false},
  
  updateConfig: {Method: 'the PUT', the params: {Action: 'config'}, the isArray: to false}
  
  });
  
  }]);
  
  the params: {Action: 'config'} corresponding to the RequestMapping AdminController mapping
  
  two explore each button.
  
  1. Server config refresh button
  
  calls getConfig method is getConfig (in AdminController) getConfig action from the ThreadLocal KylinConfig look there is no object, if the return is acquired, so when set Config, with KylinConfig objects, so the Server Config refresh button to get to the configuration properties modified
  
  2. Server Environment refresh button to
  
  call is getEnv operation ( getEnv method AdminController in)
  
  3. the Set Config button
  
  to call updateKylinConfig, that is, the front page will be uploaded over kv value is updated to store the data to the KylinConfig objects in memory. This is a put operation, the equivalent update method call to the server in the restful.
  
  4. Clean Up Storage
  
  Call (cleanupStorage method AdminController in) storage corresponds cleanupStorage, the official website of the operating principle of this explanation: http: //kylin.apache.org/docs/howto/howto_cleanup_storage.html, which is cleared hdfs generated during kylin cube building work intermediate files
  
  5. reloadConfig
  
  call hotLoadKylinConfig (www.yunyouuyl.com CacheController in) this is a POST request, update the profile may heat load, by way of KylinConfig.getInstanceFromEnv broadcast (www.yifayuLed.cn) .www.oushengguoj.com reloadFromSiteProperties (www.yaoshiylgw.cn); cacheService.notifyMetadataChange (Broadcaster.SYNC_www.baiyiyuLe.cn ALL, Broadcaster.Event.UPDATE, Broadcaster.SYNC_ALL); reloadFromSiteProperties operation check method BackwardCompatibilityConfig use of the key, value cast String type, similar to the format
  
  6. Calculate cardinality
  
  estimates a hive base table, click on this button will let the user fill out the hive table information
  
  7. Disable Cache
  
  is kylin.query.cache-enabled parameter to false
  
  8. Enable Cache
  
  is kylin.query.cache-enabled parameter is set to true
  
  9. The Reload Metadata
  
  call announceWipeCache method CacheController Broadcaster will clear all nodes using the cache
  
  so that, when the set config, except that the parameter set into a Properties object, and not persistent, and when the reload, kylin.properties reads the configuration file, so reload will reload the cached content

Guess you like

Origin www.cnblogs.com/qwangxiao/p/11058431.html