HugeGraphServer 部署安装

官方文档链接:https://hugegraph.github.io/hugegraph-doc

HugeGraphServer Quick Start

1 概述

HugeGraph-Server 是 HugeGraph 项目的核心部分,包含Core、Backend、API等子模块。

Core模块是Tinkerpop接口的实现,Backend模块用于管理数据存储,目前支持的后端包括:Memory、Cassandra、ScyllaDB以及RocksDB,API模块提供HTTP Server,将Client的HTTP请求转化为对Core的调用。

文档中会大量出现HugeGraph-ServerHugeGraphServer这两种写法,其他组件也类似。这两种写法含义上并无大的差异,可以这么区分:HugeGraph-Server表示服务端相关组件代码,HugeGraphServer表示服务进程。

2 依赖

2.1 安装JDK-1.8

HugeGraph-Server 基于jdk-1.8开发,代码用到了较多jdk-1.8中的类和方法,请用户自行安装配置。

在往下阅读之前务必执行java -version命令查看jdk版本

java -version

2.2 安装GCC-4.3.0(GLIBCXX_3.4.10)或更新版本(可选)

如果使用的是RocksDB后端,请务必执行gcc --version命令查看gcc版本;若使用其他后端,则不需要。

gcc --version

版本对应关系 

3 部署

有三种方式可以部署HugeGraph-Server组件:

  • 方式1:一键部署
  • 方式2:下载tar包
  • 方式3:源码编译

3.1 一键部署

HugeGraph-Tools提供了一键部署的命令行工具,用户可以使用该工具快速地一键下载、解压、配置并启动HugeGraphServer和HugeGraphStudio。 当然,还是得先下载HugeGraph-Tools的tar包。

wget https://github.com/hugegraph/hugegraph-tools/releases/download/v${version}/hugegraph-tools-${version}.tar.gz
tar -zxvf hugegraph-tools-${version}.tar.gz
cd hugegraph-tools-${version}

注:${version}为版本号,最新版本号可参考Download页面,或直接从Download页面点击链接下载

HugeGraph-Tools 的总入口脚本是bin/hugegraph,用户可以使用help子命令查看其用法,这里只介绍一键部署的命令。

bin/hugegraph deploy -v {hugegraph-version} -p {install-path} [-u {download-path-prefix}]

{hugegraph-version}表示要部署的HugeGraphServer及HugeGraphStudio的版本,用户可查看conf/version-mapping.yaml文件获取版本信息,{install-path}指定HugeGraphServer及HugeGraphStudio的安装目录,{download-path-prefix}可选,指定HugeGraphServer及HugeGraphStudio tar包的下载地址,不提供时使用默认下载地址,比如要启动 0.6 版本的HugeGraph-Server及HugeGraphStudio将上述命令写为bin/hugegraph deploy -v 0.6 -p services即可。

3.2 下载tar包

所有版本目录,我们这里使用 0.10.4 版本

https://github.com/hugegraph/hugegraph/releases
wget 
https://github.com/hugegraph/hugegraph/releases/download/v0.10.4/hugegraph-0.10.4.tar.gz
tar -zxvf hugegraph-0.10.4.tar.gz

3.3 源码编译

下载HugeGraph源代码

git clone https://github.com/hugegraph/hugegraph.git

编译打包生成tar包

cd hugegraph
mvn package -DskipTests

执行日志如下:

......
[INFO] Reactor Summary:
[INFO] 
[INFO] hugegraph .......................................... SUCCESS [  0.003 s]
[INFO] hugegraph-core ..................................... SUCCESS [ 15.335 s]
[INFO] hugegraph-api ...................................... SUCCESS [  0.829 s]
[INFO] hugegraph-cassandra ................................ SUCCESS [  1.095 s]
[INFO] hugegraph-scylladb ................................. SUCCESS [  0.313 s]
[INFO] hugegraph-rocksdb .................................. SUCCESS [  0.506 s]
[INFO] hugegraph-mysql .................................... SUCCESS [  0.412 s]
[INFO] hugegraph-palo ..................................... SUCCESS [  0.359 s]
[INFO] hugegraph-dist ..................................... SUCCESS [  7.470 s]
[INFO] hugegraph-example .................................. SUCCESS [  0.403 s]
[INFO] hugegraph-test ..................................... SUCCESS [  1.509 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
......

执行成功后,在hugegraph目录下生成 hugegraph-*.tar.gz 文件,就是编译生成的tar包。

4 配置

如果需要快速启动HugeGraph仅用于测试,那么只需要进行少数几个配置项的修改即可(见下一节)。 详细的配置介绍请参考配置文档及配置项介绍

5 启动

启动分为"首次启动"和"非首次启动",这么区分是因为在第一次启动前需要初始化后端数据库,然后启动服务。 而在人为停掉服务后,或者其他原因需要再次启动服务时,因为后端数据库是持久化存在的,直接启动服务即可。

HugeGraphServer启动时会连接后端存储并尝试检查后端存储版本号,如果未初始化后端或者后端已初始化但版本不匹配时(旧版本数据),HugeGraphServer会启动失败,并给出错误信息。

如果需要外部访问HugeGraphServer,请修改rest-server.propertiesrestserver.url配置项 (默认为http://127.0.0.1:8080),修改成机器名或IP地址。

由于各种后端所需的配置(hugegraph.properties)及启动步骤略有不同,下面逐一对各后端的配置及启动做介绍。

HugeGraphServer的默认配置只能是本机访问,可以修改配置,使其能在其他机器访问。

 vim conf/rest-server.propertiesrestserver.url=http://0.0.0.0:8080

 

5.1 Memory (建议测试学习时使用)

修改 hugegraph.properties

backend=memory
serializer=text

Memory后端的数据是保存在内存中无法持久化的,不需要初始化后端,这也是唯一一个不需要初始化的后端。

启动 server

bin/start-hugegraph.sh
Starting HugeGraphServer...
Connecting to HugeGraphServer (http://127.0.0.1:8080/graphs)....OK

提示的 url 与 rest-server.properties 中配置的 restserver.url 一致

5.2 HBase

用户需自行安装 HBase,要求版本 2.0 以上,下载地址

修改 hugegraph.properties

backend=hbase
serializer=hbase# hbase backend config
hbase.hosts=localhost
hbase.port=2181

初始化数据库(仅第一次启动时需要)

cd hugegraph-${version}
bin/init-store.sh

查看日志,发现会在hbase创建一些表

2020-01-08 14:23:37 8612  [main] [INFO ] com.baidu.hugegraph.cmd.InitStore [] - Init graph with config file: conf/hugegraph.properties
2020-01-08 14:23:37 8697  [main] [INFO ] com.baidu.hugegraph.HugeGraph [] - Opening backend store 'hbase' for graph 'hugegraph'
2020-01-08 14:23:37 8944  [main] [WARN ] org.apache.hadoop.util.NativeCodeLoader [] - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2020-01-08 14:23:37 9285  [main] [INFO ] org.apache.hadoop.hbase.zookeeper.ReadOnlyZKClient [] - Connect 0x38aa816f to 192.168.2.116:2181 with session timeout=90000ms, retries 3, retry interval 1000ms, keepAlive=60000ms
2020-01-08 14:23:38 10101 [main] [INFO ] org.apache.hadoop.hbase.zookeeper.ReadOnlyZKClient [] - Connect 0x2c7b5824 to 192.168.2.116:2181 with session timeout=90000ms, retries 3, retry interval 1000ms, keepAlive=60000ms
2020-01-08 14:23:39 11019 [main] [INFO ] org.apache.hadoop.hbase.zookeeper.ReadOnlyZKClient [] - Connect 0x6bb2d00b to 192.168.2.116:2181 with session timeout=90000ms, retries 3, retry interval 1000ms, keepAlive=60000ms
2020-01-08 14:23:41 12754 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_di completed
2020-01-08 14:23:41 13472 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_ie completed
2020-01-08 14:23:43 14700 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_vi completed
2020-01-08 14:23:43 15414 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_hi completed
2020-01-08 14:23:44 16127 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_li completed
2020-01-08 14:23:45 16852 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_ui completed
2020-01-08 14:23:46 17566 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_v completed
2020-01-08 14:23:46 18278 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_si completed
2020-01-08 14:23:47 18990 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_ii completed
2020-01-08 14:23:48 20205 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_oe completed
2020-01-08 14:23:49 20917 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_fi completed
2020-01-08 14:23:50 21631 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_ei completed
2020-01-08 14:23:51 22842 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:s_ai completed
2020-01-08 14:23:52 23783 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_di completed
2020-01-08 14:23:53 25071 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_ie completed
2020-01-08 14:23:54 25784 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_vi completed
2020-01-08 14:23:54 26497 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_hi completed
2020-01-08 14:23:55 27211 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_li completed
2020-01-08 14:23:56 27923 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_ui completed
2020-01-08 14:23:57 28638 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_v completed
2020-01-08 14:23:58 29850 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_si completed
2020-01-08 14:23:59 30584 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_ii completed
2020-01-08 14:23:59 31299 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_oe completed
2020-01-08 14:24:01 32567 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_fi completed
2020-01-08 14:24:09 41383 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_ei completed
2020-01-08 14:24:10 42187 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:g_ai completed
2020-01-08 14:24:11 43427 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:vl completed
2020-01-08 14:24:12 44156 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:el completed
2020-01-08 14:24:13 44923 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:m_si completed
2020-01-08 14:24:14 46156 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:il completed
2020-01-08 14:24:15 47533 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:pk completed
2020-01-08 14:24:16 48291 [main] [INFO ] org.apache.hadoop.hbase.client.HBaseAdmin [] - Operation: CREATE, Table Name: hugegraph:c completed
2020-01-08 14:24:18 50524 [main] [INFO ] com.baidu.hugegraph.HugeGraph [] - Graph 'hugegraph' has been initialized
2020-01-08 14:24:18 50524 [main] [INFO ] com.baidu.hugegraph.HugeGraph [] - Close graph hugegraph[hugegraph]
2020-01-08 14:24:18 50529 [main] [INFO ] org.apache.hadoop.hbase.client.ConnectionImplementation [] - Closing master protocol: MasterService
2020-01-08 14:24:18 50529 [main] [INFO ] org.apache.hadoop.hbase.zookeeper.ReadOnlyZKClient [] - Close zookeeper connection 0x6bb2d00b to 192.168.2.116:2181
2020-01-08 14:24:18 50540 [main] [INFO ] org.apache.hadoop.hbase.client.ConnectionImplementation [] - Closing master protocol: MasterService
2020-01-08 14:24:18 50540 [main] [INFO ] org.apache.hadoop.hbase.zookeeper.ReadOnlyZKClient [] - Close zookeeper connection 0x2c7b5824 to 192.168.2.116:2181
2020-01-08 14:24:18 50540 [main] [INFO ] org.apache.hadoop.hbase.client.ConnectionImplementation [] - Closing master protocol: MasterService
2020-01-08 14:24:18 50544 [main] [INFO ] org.apache.hadoop.hbase.zookeeper.ReadOnlyZKClient [] - Close zookeeper connection 0x38aa816f to 192.168.2.116:2181
2020-01-08 14:24:19 50606 [Thread-1] [INFO ] com.baidu.hugegraph.HugeGraph [] - HugeGraph is shutting down

 

启动server

bin/start-hugegraph.sh
Starting HugeGraphServer...
Connecting to HugeGraphServer (http://127.0.0.1:8080/graphs)....OK

6 访问Server

6.1 服务启动状态校验

jps查看服务进程

jps
6475 HugeGraphServer

curl请求RestfulAPI

echo `curl -o /dev/null -s -w %{http_code} "http://localhost:8080/graphs/hugegraph/graph/vertices"`

返回结果200,代表server启动正常

7 停止Server

$cd hugegraph-${version}
$bin/stop-hugegraph.sh

 

异常

1.启动之前未进行初始化操作,第一次启动需要先

bin/init-store.sh

 再执行

bin/start-hugegraph.sh

 异常内容

2020-01-08 14:20:50 13629 [main] [ERROR] com.baidu.hugegraph.dist.HugeGraphServer [] - HugeRestServer start error: 
com.baidu.hugegraph.backend.BackendException: The backend store of 'hugegraph' has not been initializedat com.baidu.hugegraph.core.GraphManager.checkBackendVersionOrExit(GraphManager.java:206) ~[hugegraph-api-0.10.4.jar:0.48.0.0]at com.baidu.hugegraph.core.GraphManager.<init>(GraphManager.java:76) ~[hugegraph-api-0.10.4.jar:0.48.0.0]at com.baidu.hugegraph.server.ApplicationConfig$GraphManagerFactory$1.onEvent(ApplicationConfig.java:108) ~[hugegraph-api-0.10.4.jar:0.48.0.0]at org.glassfish.jersey.server.internal.monitoring.CompositeApplicationEventListener.onEvent(CompositeApplicationEventListener.java:74) ~[jersey-server-2.25.1.jar:?]at org.glassfish.jersey.server.internal.monitoring.MonitoringContainerListener.onStartup(MonitoringContainerListener.java:81) ~[jersey-server-2.25.1.jar:?]at org.glassfish.jersey.server.ApplicationHandler.onStartup(ApplicationHandler.java:1180) ~[jersey-server-2.25.1.jar:?]at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.start(GrizzlyHttpContainer.java:357) ~[jersey-container-grizzly2-http-2.25.1.jar:?]at org.glassfish.grizzly.http.server.HttpHandlerChain.start(HttpHandlerChain.java:422) ~[grizzly-http-server-2.3.28.jar:2.3.28]at org.glassfish.grizzly.http.server.HttpServer.setupHttpHandler(HttpServer.java:314) ~[grizzly-http-server-2.3.28.jar:2.3.28]at org.glassfish.grizzly.http.server.HttpServer.start(HttpServer.java:290) ~[grizzly-http-server-2.3.28.jar:2.3.28]at com.baidu.hugegraph.server.RestServer.start(RestServer.java:62) ~[hugegraph-api-0.10.4.jar:0.48.0.0]at com.baidu.hugegraph.server.RestServer.start(RestServer.java:113) ~[hugegraph-api-0.10.4.jar:0.48.0.0]at com.baidu.hugegraph.dist.HugeRestServer.start(HugeRestServer.java:58) ~[hugegraph-dist-0.10.4.jar:?]at com.baidu.hugegraph.dist.HugeGraphServer.<init>(HugeGraphServer.java:55) [hugegraph-dist-0.10.4.jar:?]at com.baidu.hugegraph.dist.HugeGraphServer.main(HugeGraphServer.java:100) [hugegraph-dist-0.10.4.jar:?]
2020-01-08 14:20:50 13645 [main] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Shutting down OpProcessor[]
2020-01-08 14:20:50 13645 [main] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Shutting down OpProcessor[session]
2020-01-08 14:20:50 13646 [main] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Shutting down OpProcessor[traversal]
2020-01-08 14:20:50 13646 [main] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Shutting down thread pools.
2020-01-08 14:20:50 13652 [gremlin-server-stop] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Executing shutdown LifeCycleHook
2020-01-08 14:20:50 13652 [gremlin-server-stop] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Executed once at shutdown of Gremlin Server.
2020-01-08 14:20:52 15854 [gremlin-server-stop] [INFO ] com.baidu.hugegraph.HugeGraph [] - Close graph hugegraph[hugegraph]
2020-01-08 14:20:52 15862 [gremlin-server-stop] [WARN ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Exception while closing Graph instance [hugegraph]
java.lang.IllegalStateException: Ensure tx closed in all threads when closing graph 'hugegraph'at com.google.common.base.Preconditions.checkState(Preconditions.java:199) ~[guava-19.0.jar:?]at com.baidu.hugegraph.util.E.checkState(E.java:68) ~[hugegraph-common-1.6.16.jar:1.6.16.0]at com.baidu.hugegraph.HugeGraph.close(HugeGraph.java:503) ~[hugegraph-core-0.10.4.jar:0.10.4.0]at org.apache.tinkerpop.gremlin.server.GremlinServer.lambda$null$7(GremlinServer.java:298) ~[gremlin-server-3.4.3.jar:3.4.3]at java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4649) ~[?:1.8.0_121]at org.apache.tinkerpop.gremlin.server.GremlinServer.lambda$stop$8(GremlinServer.java:295) ~[gremlin-server-3.4.3.jar:3.4.3]at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
2020-01-08 14:20:52 15863 [gremlin-server-stop] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Closed Graph instance [hugegraph]
2020-01-08 14:20:52 15864 [gremlin-server-stop] [INFO ] org.apache.tinkerpop.gremlin.server.GremlinServer [] - Gremlin Server - shutdown complete
Exception in thread "main" com.baidu.hugegraph.backend.BackendException: The backend store of 'hugegraph' has not been initializedat com.baidu.hugegraph.core.GraphManager.checkBackendVersionOrExit(GraphManager.java:206)at com.baidu.hugegraph.core.GraphManager.<init>(GraphManager.java:76)at com.baidu.hugegraph.server.ApplicationConfig$GraphManagerFactory$1.onEvent(ApplicationConfig.java:108)at org.glassfish.jersey.server.internal.monitoring.CompositeApplicationEventListener.onEvent(CompositeApplicationEventListener.java:74)at org.glassfish.jersey.server.internal.monitoring.MonitoringContainerListener.onStartup(MonitoringContainerListener.java:81)at org.glassfish.jersey.server.ApplicationHandler.onStartup(ApplicationHandler.java:1180)at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.start(GrizzlyHttpContainer.java:357)at org.glassfish.grizzly.http.server.HttpHandlerChain.start(HttpHandlerChain.java:422)at org.glassfish.grizzly.http.server.HttpServer.setupHttpHandler(HttpServer.java:314)at org.glassfish.grizzly.http.server.HttpServer.start(HttpServer.java:290)at com.baidu.hugegraph.server.RestServer.start(RestServer.java:62)at com.baidu.hugegraph.server.RestServer.start(RestServer.java:113)at com.baidu.hugegraph.dist.HugeRestServer.start(HugeRestServer.java:58)at com.baidu.hugegraph.dist.HugeGraphServer.<init>(HugeGraphServer.java:55)at com.baidu.hugegraph.dist.HugeGraphServer.main(HugeGraphServer.java:100)

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/509815.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

JanusGraph: 可视化 Gephi 插件安装

下载地址 https://gephi.org/ 安装 下一步默认安装即可 打开安装插件 打开后发现提示无法连接&#xff0c;并且可用插件显示为0 &#xff08;我更新过所以不为0&#xff09; 点击“代理配置” 设置代理 安装插件 Graph Streaming 继续 重新启动&#xff0c;安装完成 点击概…

JanusGraph(HugeGraph通用): 可视化 GraphEXP 插件安装

JanusGraph&#xff1a; 可视化 Gephi 插件安装可参考&#xff1a;https://datamining.blog.csdn.net/article/details/103894994 下载地址&#xff1a;https://github.com/bricaud/graphexp 安装 解压&#xff0c;在根目录下修改 graphexp.html <div class"nav inp…

迁移 Cloudera Manager 节点 ,迁移Cloudera Scm Server端

目录 1.迁移节点信息&#xff1a;212 -> 44 2.压缩存储目录&#xff0c;备份SCM Server数据 3.在新服务器安装server端 4.修改 cloudera-scm-server 配置文件 5.解压恢复备份数据到新服务器指定配置的目录中 6.修改所有agent节点的配置文件内容 7.迁移ClouderaManage…

CM,CDH 修改迁移元数据库

目录 1.停止所有服务 2.停止Cloudera Management Service服务 3.登录CM所在服务器&#xff0c;停止cloudera-scm-server服务&#xff0c;命令如下&#xff1a; 4.停止CM服务和CDH集群后&#xff0c;对数据库进行迁移 5.登录cloudera-scm-server服务所在服务器&#xff0c;…

Cloudera-Manager-agent 误删恢复

场景&#xff1a; 同事操作失误&#xff0c;将agent节点误删了 解决方法 1.对比正常agent节点与被删除节点安装包差异 yum list installed |grep cloudera 2.通过和正常的服务器对比我们发现&#xff0c;丢失的只有cloudera-manager-agent.x86_64 3.查看yum源中所有clouder…

java中的内部类

内部类&#xff1a;定义在类结构中的另一个类&#xff1a; 类中的定义的成员&#xff1a;字段、方法、内部类 为什么使用内部类&#xff1f; 增强封装&#xff0c;把内部类隐藏在外部类之内&#xff0c;不许其他类访问该类。内部类能提高代码的可读性和可维护性&#xff0c;…

java中枚举类型详解

枚举类型的引入&#xff1a; 枚举是从java5开始提供的一种新的数据类型&#xff0c;是一个特殊的类&#xff0c;就是固定的多个常量对象的集合。 定义格式&#xff1a; [修饰]enum 枚举类名 { 常量A,常量B,常量C; } 代码&#xff1a; package com.test;enum Weekday {…

Hbase 预写日志WAL处理源码分析之 LogCleaner

目录 Hlog WALs和oldWALs 整体流程 HMaster 初始化 定时执行 LogCleaner 日志清理类 ReplicationLogCleaner 日志清理类 总结 Hlog WALs和oldWALs 这里先介绍一下Hlog失效和Hlog删除的规则 HLog失效&#xff1a;写入数据一旦从MemStore中刷新到磁盘&#xff0c;…

Dubbo 2.7.x admin 控制台管理提示 : 无元数据信息,请升级至Dubbo2.7及以上版本

版本&#xff1a;2.7.3 安装完Dubbo admin 运行后&#xff0c;查询服务提示 无元数据信息&#xff0c;请升级至Dubbo2.7及以上版本&#xff0c;或者查看application.properties中关于config center的配置&#xff0c;详见 这里 这里描述着处理方法&#xff1a;https://github…

Unity在运行时(代码中)设置材质的渲染模式(RenderingMode)

在Unity中&#xff0c;有些少数情况下我们需要用代码来创建材质。比如说在材质非常多&#xff0c;而仅仅是纹理不一样的时候。 而用代码创建的材质是没有对应的资源文件的&#xff0c;我们也就无法使用Inspector来设置它的Rendering Mode。 关于Rendering Mode&#xff0c;许我…

java中String与new String的区别

String类&#xff1a;表示不可改变的字符串&#xff0c;当前对象创建完毕之后&#xff0c;该对象的内容&#xff08;字符序列&#xff09;是不能改变的&#xff0c;一旦内容改变就是一个新的对象。 String对象的创建&#xff1a; 1&#xff09;&#xff1a;直接赋一个字面量&a…

Yarn 监控 - 监控任务运行状态 (包括Spark,MR 所有在Yarn中运行的任务)

目录 Maven pom引用 配置文件 代码 平时开发中可以在yarn的web页面查看应用程序运行状态&#xff0c;如下图 下面代码实现了&#xff0c;代码监控Yarn运行程序&#xff0c;可以对部分任务进行实时监控 Maven pom引用 这里Demo使用的hadoop版本是 3.0.0 <dependency>…

HugeGraph 图数据库索引介绍 - 范围索引,全文索引

目录 HugeGraph 索引介绍 二级索引 组合索引 范围索引 全文索引 HugeGraph 索引介绍 二级索引 创建schema和添加数据 schema.propertyKey("name").asText().ifNotExist().create();schema.propertyKey("uid").asLong().ifNotExist().create();schem…

Hbase JMX 监控 - Region

获取Region监控信息页面&#xff1a; http://regionServerName:16030/jmx?qryHadoop:serviceHBase,nameRegionServer,subRegions 获得数据如下 参数代表含义 *** 为前缀代表&#xff1a;Namespace_${namespace}_table_${tableName}_region_${regionName} ***_metric_storeCo…

c++ 之类的前置声明

转自&#xff1a;http://blog.csdn.net/fjb2080/archive/2010/04/27/5533514.aspx 作者&#xff1a;清林&#xff0c;博客名&#xff1a;飞空静渡 刚开始学习c的人都会遇到这样的问题&#xff1a; 定义一个类 class A&#xff0c;这个类里面使用了类B的对象b&#xff0c;然后定…

Hbase Compaction 源码分析 - RatioBasedCompactionPolicy 策略

目录 类的关系图 ​ RatioBasedCompactionPolicy selectCompaction 方法 getCurrentEligibleFiles方法 skipLargeFiles方法 createCompactionRequest方法 filterBulk方法 applyCompactionPolicy方法 removeExcessFiles方法 setIsMajor方法 其他相关文章 Hbase Compa…

Hbase Compaction 源码分析 - CompactSplitThread 线程池选择

目录 CompactSplitThread requestCompactionInternal方法 selectCompaction方法 requestCompaction方法 其他相关文章 Hbase Compaction 源码分析 - CompactionChecker Hbase Compaction 源码分析 - RatioBasedCompactionPolicy 策略 Hbase Compaction 源码分析 - CompactS…

Hbase Compaction 队列数量较大分析

目录 问题 问题原因分析 总结建议 问题 前几天朋友公司Hbase集群出现Compaction队列持续处于比较大的情况&#xff0c;并且mem flush队列也比较大&#xff0c;一起看了下问题&#xff0c;大概情况如下图 从图中可以看出来压缩队列总和持续在1000-2000&#xff0c;平对压缩队列…

Hbase 2.x Region in transition (永久RIT) 异常解决

环境 Hbase 版本&#xff1a;2.0 问题原因 hbase长时间出现RIT&#xff0c;并且发生RIT的Region是已经删除了的Hbase表&#xff0c;表未删除的情况下执行assgin可以消除该问题 Hbase Region in transition (RIT) 异常解决&#xff1a;https://datamining.blog.csdn.net/artic…