Skip to content

Commit

Permalink
doc: update computer namespace in example (#292) 2be4629
Browse files Browse the repository at this point in the history
  • Loading branch information
imbajin committed Nov 3, 2023
1 parent ddc7acb commit dfbf74b
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 69 deletions.
12 changes: 6 additions & 6 deletions cn/docs/_print/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>apiVersion</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph.apache.org/v1</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>kind</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>HugeGraphComputerJob</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>metadata</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>namespace</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph-computer-system</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>namespace</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph-computer-operator-system</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic>&amp;jobName</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>pagerank-sample</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#204a87;font-weight:700>spec</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>jobId</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic>*jobName</span><span style=color:#f8f8f8;text-decoration:underline>
Expand All @@ -1435,20 +1435,20 @@
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>hugegraph.url</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>http://${hugegraph-server-host}:${hugegraph-server-port}</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># hugegraph server url</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#204a87;font-weight:700>hugegraph.name</span><span style=color:#000;font-weight:700>:</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>hugegraph</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#8f5902;font-style:italic># hugegraph graph name</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#000>EOF</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span></code></pre></div><h4 id=226-显示作业>2.2.6 显示作业</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>kubectl get hcjob/pagerank-sample -n hugegraph-computer-system
</span></span></span></code></pre></div><h4 id=226-显示作业>2.2.6 显示作业</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>kubectl get hcjob/pagerank-sample -n hugegraph-computer-operator-system
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span>NAME JOBID JOBSTATUS
</span></span><span style=display:flex><span>pagerank-sample pagerank-sample RUNNING
</span></span></code></pre></div><h4 id=227-显示节点日志>2.2.7 显示节点日志</h4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Show the master log</span>
</span></span><span style=display:flex><span>kubectl logs -l <span style=color:#000>component</span><span style=color:#ce5c00;font-weight:700>=</span>pagerank-sample-master -n hugegraph-computer-system
</span></span><span style=display:flex><span>kubectl logs -l <span style=color:#000>component</span><span style=color:#ce5c00;font-weight:700>=</span>pagerank-sample-master -n hugegraph-computer-operator-system
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Show the worker log</span>
</span></span><span style=display:flex><span>kubectl logs -l <span style=color:#000>component</span><span style=color:#ce5c00;font-weight:700>=</span>pagerank-sample-worker -n hugegraph-computer-system
</span></span><span style=display:flex><span>kubectl logs -l <span style=color:#000>component</span><span style=color:#ce5c00;font-weight:700>=</span>pagerank-sample-worker -n hugegraph-computer-operator-system
</span></span><span style=display:flex><span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># Show diagnostic log of a job</span>
</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic># 注意: 诊断日志仅在作业失败时存在,并且只会保存一小时。</span>
</span></span><span style=display:flex><span>kubectl get event --field-selector <span style=color:#000>reason</span><span style=color:#ce5c00;font-weight:700>=</span>ComputerJobFailed --field-selector involvedObject.name<span style=color:#ce5c00;font-weight:700>=</span>pagerank-sample -n hugegraph-computer-system
</span></span></code></pre></div><h4 id=228-显示作业的成功事件>2.2.8 显示作业的成功事件</h4><blockquote><p>NOTE: it will only be saved for one hour</p></blockquote><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>kubectl get event --field-selector <span style=color:#000>reason</span><span style=color:#ce5c00;font-weight:700>=</span>ComputerJobSucceed --field-selector involvedObject.name<span style=color:#ce5c00;font-weight:700>=</span>pagerank-sample -n hugegraph-computer-system
</span></span><span style=display:flex><span>kubectl get event --field-selector <span style=color:#000>reason</span><span style=color:#ce5c00;font-weight:700>=</span>ComputerJobFailed --field-selector involvedObject.name<span style=color:#ce5c00;font-weight:700>=</span>pagerank-sample -n hugegraph-computer-operator-system
</span></span></code></pre></div><h4 id=228-显示作业的成功事件>2.2.8 显示作业的成功事件</h4><blockquote><p>NOTE: it will only be saved for one hour</p></blockquote><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-bash data-lang=bash><span style=display:flex><span>kubectl get event --field-selector <span style=color:#000>reason</span><span style=color:#ce5c00;font-weight:700>=</span>ComputerJobSucceed --field-selector involvedObject.name<span style=color:#ce5c00;font-weight:700>=</span>pagerank-sample -n hugegraph-computer-operator-system
</span></span></code></pre></div><h4 id=229-查询算法结果>2.2.9 查询算法结果</h4><p>如果输出到 <code>Hugegraph-Server</code> 则与 Locally 模式一致,如果输出到 <code>HDFS</code> ,请检查 <code>hugegraph-computerresults{jobId}</code>目录下的结果文件。</p><h2 id=3-内置算法文档>3 内置算法文档</h2><h3 id=31-支持的算法列表>3.1 支持的算法列表:</h3><h6 id=中心性算法>中心性算法:</h6><ul><li>PageRank</li><li>BetweennessCentrality</li><li>ClosenessCentrality</li><li>DegreeCentrality</li></ul><h6 id=社区算法>社区算法:</h6><ul><li>ClusteringCoefficient</li><li>Kcore</li><li>Lpa</li><li>TriangleCount</li><li>Wcc</li></ul><h6 id=路径算法>路径算法:</h6><ul><li>RingsDetection</li><li>RingsDetectionWithFilter</li></ul><p>更多算法请看: <a href=https://github.com/apache/hugegraph-computer/tree/master/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm>Built-In algorithms</a></p><h3 id=32-算法描述>3.2 算法描述</h3><p>TODO</p><h2 id=4-算法开发指南>4 算法开发指南</h2><p>TODO</p><h2 id=5-注意事项>5 注意事项</h2><ul><li>如果computer-k8s模块下面的某些类不存在,你需要运行<code>mvn compile</code>来提前生成对应的类。</li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-5074334c73aa450364a31470231ebff8>4 - Config</h1></div><div class=td-content><h1 id=pg-af7e8f1dc385b255c4f38b3cbafe224a>4.1 - HugeGraph 配置</h1><h3 id=1-概述>1 概述</h3><p>配置文件的目录为 hugegraph-release/conf,所有关于服务和图本身的配置都在此目录下。</p><p>主要的配置文件包括:gremlin-server.yaml、rest-server.properties 和 hugegraph.properties</p><p>HugeGraphServer 内部集成了 GremlinServer 和 RestServer,而 gremlin-server.yaml 和 rest-server.properties 就是用来配置这两个 Server 的。</p><ul><li><a href=http://tinkerpop.apache.org/docs/3.2.3/reference/#gremlin-server>GremlinServer</a>:GremlinServer 接受用户的 gremlin 语句,解析后转而调用 Core 的代码。</li><li>RestServer:提供 RESTful API,根据不同的 HTTP 请求,调用对应的 Core API,如果用户请求体是 gremlin 语句,则会转发给 GremlinServer,实现对图数据的操作。</li></ul><p>下面对这三个配置文件逐一介绍。</p><h3 id=2-gremlin-serveryaml>2 gremlin-server.yaml</h3><p>gremlin-server.yaml 文件默认的内容如下:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-yaml data-lang=yaml><span style=display:flex><span><span style=color:#8f5902;font-style:italic># host and port of gremlin server, need to be consistent with host and port in rest-server.properties</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#8f5902;font-style:italic>#host: 127.0.0.1</span><span style=color:#f8f8f8;text-decoration:underline>
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline></span><span style=color:#8f5902;font-style:italic>#port: 8182</span><span style=color:#f8f8f8;text-decoration:underline>
Expand Down
Loading

0 comments on commit dfbf74b

Please sign in to comment.