<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Geode/Gemfire OQL 解釋器 原文鏈接 : [http://zeppelin.apache.org/docs/0.7.2/interpreter/geode.html](http://zeppelin.apache.org/docs/0.7.2/interpreter/geode.html) 譯文鏈接 : [http://www.apache.wiki/pages/viewpage.action?pageId=10030798](http://www.apache.wiki/pages/viewpage.action?pageId=10030798) 貢獻者 : [片刻](/display/~jiangzhonglian) [ApacheCN](/display/~apachecn) [Apache中文網](/display/~apachechina) ## 概述 | 名稱 | 類 | 描述 | | --- | --- | --- | | %geode.oql | GeodeOqlInterpreter | 為Apache Geode提供OQL環境 | 此解釋器支持[Geode?](http://geode.incubator.apache.org/)[對象查詢語言(OQL)](http://geode-docs.cfapps.io/docs/developing/querying_basics/oql_compared_to_sql.html)。使用基于OQL的查詢語言: [![飛艇視圖](http://img.youtube.com/vi/zvzzA9GXu3Q/3.jpg)](https://www.youtube.com/watch?v=zvzzA9GXu3Q) * 您可以查詢任何任意對象 * 您可以瀏覽對象集合 * 您可以調用方法并訪問對象的行為 * 支持數據映射 * 您不需要聲明類型。由于您不需要類型定義,您可以跨多種語言工作 * 您不受模式約束 本[視頻教程](https://www.youtube.com/watch?v=zvzzA9GXu3Q)說明了該功能提供的一些功能`Geode Interpreter`。 ## 創建解釋器 默認情況下,Zeppelin創建一個`Geode/OQL`實例。您可以刪除它或創建更多的實例。 可以創建多個Geode實例,每個實例都配置為相同或不同的后端Geode集群。但是隨著時間的推移,?`Notebook`可以只有一個Geode解釋器實例`bound`。這意味著您_無法_連接到同一個不同的Geode集群`Notebook`。這是一個已知的Zeppelin限制。 要創建新的Geode實例,請打開該`Interpreter`部分,然后單擊該`+Create`按鈕。選擇`Name`您的選擇,并從`Interpreter`下拉列表中選擇`geode`。然后按照配置說明和`Save`新實例進行操作。 > 注意:該`Name`實例僅用于區分實例,同時綁定它們`Notebook`。這`Name`是不相干的`Notebook`。在`Notebook`你必須使用`%geode.oql`標簽。 [?](http://zeppelin.apache.org/docs/0.7.1/interpreter/geode.html#bind-to-notebook) ## 綁定到筆記本 在`Notebook`上點擊`settings`在右上角的圖標。選擇/取消選擇要與之綁定的口譯員`Notebook`。 [?](http://zeppelin.apache.org/docs/0.7.1/interpreter/geode.html#configuration) ## 配置 您可以從`Interpreter`部分修改Geode的配置。Geode解釋器表示以下屬性: | 屬性名稱 | 描述 | 默認值 | | --- | --- | --- | | geode.locator.host | Geode定位器主機 | 本地主機 | | geode.locator.port | Geode定位器端口 | 10334 | | geode.max.result | 顯示OQL結果的最大數量,以防止瀏覽器過載 | 1000 | ## 如何使用? > _提示1:使用(CTRL +。)進行OQL自動完成。_ > > _提示2:始終使用完整的`%geode.oql`前綴標簽啟動段落!簡短的符號:`%geode`仍然可以運行OQL查詢,但語法突出顯示和自動完成將被禁用。_ ### 創建/銷毀區域 OQL規范不支持?[Geode Regions](https://cwiki.apache.org/confluence/display/GEODE/Index#Index-MainConceptsandComponents)突變操作。對`create`/?`destroy`區域應該使用[GFSH](http://geode-docs.cfapps.io/docs/tools_modules/gfsh/chapter_overview.html)?shell工具。在下文中,假設GFSH與Zeppelin服務器共同配置。 ``` %sh source /etc/geode/conf/geode-env.sh gfsh << EOF connect --locator=ambari.localdomain[10334] destroy region --name=/regionEmployee destroy region --name=/regionCompany create region --name=regionEmployee --type=REPLICATE create region --name=regionCompany --type=REPLICATE exit; EOF? ``` 以上片段重新創建了兩個區域:`regionEmployee`和`regionCompany`。請注意,您必須明確指定定位器主機和端口。這些值應與Geode Interpreter配置中使用的值相匹配。功能[區GFSH命令](http://geode-docs.cfapps.io/docs/tools_modules/gfsh/gfsh_quick_reference.html)綜合清單。 ### 基本OQL ``` %geode.oql SELECT count(*) FROM /regionEmployee? ``` OQL?`IN`和`SET`過濾器 ``` %geode.oql SELECT * FROM /regionEmployee WHERE companyId IN SET(2) OR lastName IN SET('Tzolov13', 'Tzolov73')? ``` OQL?`JOIN`操作 ``` %geode.oql SELECT e.employeeId, e.firstName, e.lastName, c.id as companyId, c.companyName, c.address FROM /regionEmployee e, /regionCompany c WHERE e.companyId = c.id? ``` 默認情況下,QOL響應僅包含區域條目值。要訪問密鑰,請查詢`EntrySet`: ``` %geode.oql SELECT e.key, e.value.companyId, e.value.email FROM /regionEmployee.entrySet e? ``` 以下查詢將返回EntrySet值作為Blob: ``` %geode.oql SELECT e.key, e.value FROM /regionEmployee.entrySet e? ``` > 注意:您可以在同一段落中有多個查詢,但只顯示第一個查詢結果。[?[1](https://issues.apache.org/jira/browse/ZEPPELIN-178)?],[?[2](https://issues.apache.org/jira/browse/ZEPPELIN-212)?]。 ### Shell的GFSH命令 使用Shell 解釋器(`%sh`)從命令行運行OQL命令: ``` %sh source /etc/geode/conf/geode-env.sh gfsh -e "connect" -e "list members"? ``` ### [應用Zeppelin動態表單](http://zeppelin.apache.org/docs/0.7.1/interpreter/geode.html#apply-zeppelin-dynamic-forms) 您可以在OQL查詢內使用[Zeppelin 動態表單](http://www.apache.wiki/pages/viewpage.action?pageId=10030585)。您可以同時使用`text input`和`select form`參數化功能 ``` %geode.oql SELECT * FROM /regionEmployee e WHERE e.employeeId > ${Id}? ``` ### [自動完成](http://zeppelin.apache.org/docs/0.7.1/interpreter/geode.html#auto-completion) Geode解釋器提供基本的自動完成功能。在`(Ctrl+.)`其中列出最相關的建議在彈出窗口。 ## Geode REST API 要列出定義的區域,您可以使用[Geode REST API](http://geode-docs.cfapps.io/docs/geode_rest/chapter_overview.html): ``` http://<geode server hostname>phd1.localdomain:8484/gemfire-api/v1/? ``` ``` { "regions" : [{ "name" : "regionEmployee", "type" : "REPLICATE", "key-constraint" : null, "value-constraint" : null }, { "name" : "regionCompany", "type" : "REPLICATE", "key-constraint" : null, "value-constraint" : null }] } ``` > 要使用JSON支持Geode REST API,請將以下屬性添加到geode.server.properties.file并重新啟動: ``` http-service-port=8484 start-dev-rest-api=true? ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看