Apache Tajo - 儲存外掛



Tajo 支援各種儲存格式。要註冊儲存外掛配置,你應將更改新增到配置檔案“storage-site.json”。

storage-site.json

結構定義如下 −

{ 
   "storages": { 
      “storage plugin name“: { 
         "handler": "${class name}”, "default-format": “plugin name" 
      } 
   } 
}

透過 URI 標識每個儲存例項。

PostgreSQL 儲存處理器

Tajo 支援 PostgreSQL 儲存處理器。它使使用者查詢能夠訪問 PostgreSQL 中的資料庫物件。它是 Tajo 中的預設儲存處理器,因此你可以輕鬆地對其進行配置。

配置

{ 
   "spaces": {  
      "postgre": {  
         "uri": "jdbc:postgresql://hostname:port/database1"  
         "configs": {  
            "mapped_database": “sampledb”  
            "connection_properties": { 
               "user":“tajo", "password": "pwd" 
            } 
         } 
      } 
   } 
} 		  

此處,“database1”指的是對映到 Tajo 中資料庫“sampledb”postgreSQL資料庫。

廣告
© . All rights reserved.