Skip to Content

SAP HANA 基础架构简介(二)


IndexServer–Connection 和Session 管理

  • 为Clients 创建和管理sessions and connections
  • 一旦a session 创建clients 用SQL statements 与index server通讯
    • Analytical applications may also use the multidimensional query language MDX (MultiDimensionaleXpressions)
  • Connection ID in trace file entries: [11097]{421970}[117779] 2013-05-21 15:03:15.318517 e CalcEngine

IndexServer–Transaction Manager

  • Each SQL statement is processed in the context of a transaction
  • New sessions 指定到a new transaction
  • Coordinates transactions
  • Controls transactional isolation
  • 追踪running and closed transactions
  • 当一个transaction committed 或rolled back, 通知相关engine(s)
  • Transaction ID in trace file entries:

[11097]{421970}[117779] 2013-05-21 15:03:15.318517 e CalcEngine

Index Server –Repository

  • 通过Repository REST API通信
    • Request and response consist of a document in JavaScript Object Notation (JSON) and not HTTP
    • Repository REST access is tunneled through the SQL layer via SQL procedure REPOSITORY_REST
  • remote access 通过REST 接口打开和关闭transaction
  • 维护~ 30 (Column Store) tables in schema _SYS_REPO object 信息, e.g.:
  • 用object ID (OID) and version定义一个Object
  • Repository object 有命名和种类(e.g. table, procedure, view, web content, JavaScript for XSEngine,…)

Index Server –Authorization Manager

  • 确保授权用户只能操作它们被授予权限的作业
  • For each SQL statement type (e.g. SELECT, UPDATE, EXECUTE) a corresponding privilege exists that the executing user needs to have
    • Additionally, objects in the database (e.g. tables, views, stored procedures) have an owner, that can access the objects and grant privileges on them
  • Scenario: The SQL Processor or CalcEngine executes a query where a certain table, view or stored procedure is accessed
    • Then the SQL Processor or CalcEnginewill call the Authorization Manager to check whether the required privilege has been granted to the current user

Index Server –Metadata Manager

  • Metadata of all objects 存储在Catalog中
    • Metadata Manager manages the catalog
    • Catalog is stored in Row Store tables
  • 在多节点系统中the metadata 共享在所有服务器上
    • The master nodes Index Server acts as a metadata master
    • The metadata managers on the slave nodes retrieve the metadata from the metadata master and store it in a local cache as read-only copies

Index Server –SQL Processor

  • SQL Processor 接收incoming SQL requests
  • 执行data manipulation statements
  • Forwards…
    • data definition statements to the Metadata Manager
    • transaction control statements to the Transaction Manager
    • planning commands to the planning engine
  • SQL Processor and Calculation Engine 都包含optimizer
    • To execute these plans, the SQL Processor and Calculation Engine invoke the row store or column store

Index Server –Planning Engine

  • 允许数据库层面执行planningoperations
    • e.g. Create a new version of a data set as a copy of an existing one while applying filters and transformations
  • Uses case is mainly financial planning
    • Example: Planning data for a new year is created as a copy of the data from the previous year
  • Implements planning commands that are used by integrated planning in SAP NetWeaverBusiness Warehouse
    • Typically these planning commands 在 the ABAP application server执行
    • 使用planning engine 可以在HANA database 层面更有效

Index Server –Calculation Engine

  • Orchestrates OLAP Engine and Join Engine
  • 事项商务逻辑
    • e.g. currency conversion
  • Users create in the modeler a Calc. Plan to define data sources (e.g. tables, views, other Calc. Scenarios, everything the Column Store supports) as inputs and different operations (Join, aggregation, projection) for data manipulation
    • Stored Procedures are realized as Calc. Models
    • Calc. Models≡ Calc. Scenarios
  • To execute SELECT on a Calc. Scenario, a Calc. View is created that points to the Calc. Scenario
    • Modeler does this when a scenario is activated
  • Calc. Views 存储在 the Catalog
  • Calc. Scenarios 存储在 Repository
    • Stored in JavaScript Object Notation (JSON)
  • 重要的 Monitors:
      • Shows what views point to what Calc. Scenarios
      • Multiple entries per Calc. Scenario are possible

No comments