首页 文章 精选 留言 我的

精选列表

搜索[TDSQL PostgreSQL 版],共10000篇文章
优秀的个人博客,低调大师

ES配置文件中文版

1 ##################### Elasticsearch Configuration Example ##################### 2 3 # This file contains an overview of various configuration settings, 4 # targeted at operations staff. Application developers should 5 # consult the guide at <http://elasticsearch.org/guide>. 6 # 7 # The installation procedure is covered at 8 # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>. 9 # 10 # Elasticsearch comes with reasonable defaults for most settings, 11 # so you can try it out without bothering with configuration. 12 # 13 # Most of the time, these defaults are just fine for running a production 14 # cluster. If you're fine-tuning your cluster, or wondering about the 15 # effect of certain configuration option, please _do ask_ on the 16 # mailing list or IRC channel [http://elasticsearch.org/community]. 17 18 # Any element in the configuration can be replaced with environment variables 19 # by placing them in ${...} notation. For example: 20 #所有的配置都可以使用环境变量,例如 21 #node.rack: ${RACK_ENV_VAR} 22 23 # For information on supported formats and syntax for the config file, see 24 # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html> 25 26 27 ################################### Cluster ################################### 28 29 # Cluster name identifies your cluster for auto-discovery. If you're running 30 # multiple clusters on the same network, make sure you're using unique names. 31 # 集群名称,默认为elasticsearch 32 #cluster.name: elasticsearch 33 34 35 #################################### Node ##################################### 36 37 # Node names are generated dynamically on startup, so you're relieved 38 # from configuring them manually. You can tie this node to a specific name: 39 #节点名称,es启动时会自动创建节点名称,但你也可进行配置 40 #这些名称默认是在es的lib目录下的elasticsearch-1.4.4.jar文件中的config目录下的names.txt文件中 41 #node.name: "Franz Kafka" 42 43 # Every node can be configured to allow or deny being eligible as the master, 44 # and to allow or deny to store the data. 45 # 46 # Allow this node to be eligible as a master node (enabled by default): 47 #(是否具备成为主节点的资格)是否作为主节点,每个节点都可以被配置成为主节点,默认值为true: 48 #node.master: true 49 # 50 # Allow this node to store data (enabled by default): 51 #是否存储数据,即存储索引片段,默认值为true 52 #node.data: true 53 54 # You can exploit these settings to design advanced cluster topologies. 55 #当master为false,而data为true时,会对该节点产生严重负荷; 56 # 1. You want this node to never become a master node, only to hold data. 57 # This will be the "workhorse" of your cluster. 58 # 59 #node.master: false 60 #node.data: true 61 #当master为true,而data为false时,该节点作为一个协调者; 62 # 2. You want this node to only serve as a master: to not store any data and 63 # to have free resources. This will be the "coordinator" of your cluster. 64 # 65 #node.master: true 66 #node.data: false 67 #当master为false,data也为false时,该节点就变成了一个负载均衡器。 68 # 3. You want this node to be neither master nor data node, but 69 # to act as a "search load balancer" (fetching data from nodes, 70 # aggregating results, etc.) 71 # 72 #node.master: false 73 #node.data: false 74 75 # Use the Cluster Health API [http://localhost:9200/_cluster/health], the 76 # Node Info API [http://localhost:9200/_nodes] or GUI tools 77 # such as <http://www.elasticsearch.org/overview/marvel/>, 78 # <http://github.com/karmi/elasticsearch-paramedic>, 79 # <http://github.com/lukas-vlcek/bigdesk> and 80 # <http://mobz.github.com/elasticsearch-head> to inspect the cluster state. 81 82 # A node can have generic attributes associated with it, which can later be used 83 # for customized shard allocation filtering, or allocation awareness. An attribute 84 # is a simple key value pair, similar to node.key: value, here is an example: 85 #每个节点都可以定义一些与之关联的通用属性,用于后期集群进行分片分配时的过滤: 86 #node.rack: rack314 87 88 # By default, multiple nodes are allowed to start from the same installation location 89 # to disable it, set the following: 90 #默认情况下,多个节点可以在同一个安装路径启动,如果你想让你的es只启动一个节点,可以进行如下设置: 91 #node.max_local_storage_nodes: 1 92 93 94 #################################### Index #################################### 95 96 # You can set a number of options (such as shard/replica options, mapping 97 # or analyzer definitions, translog settings, ...) for indices globally, 98 # in this file. 99 # 100 # Note, that it makes more sense to configure index settings specifically for 101 # a certain index, either when creating it or by using the index templates API. 102 # 103 # See <http://elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules.html> and 104 # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/indices-create-index.html> 105 # for more information. 106 107 # Set the number of shards (splits) of an index (5 by default): 108 #设置一个索引库的分片数量,默认值为5: 109 #index.number_of_shards: 5 110 111 # Set the number of replicas (additional copies) of an index (1 by default): 112 #设置一个索引库可被复制的数量,默认值为1: 113 #index.number_of_replicas: 1 114 115 # Note, that for development on a local machine, with small indices, it usually 116 # makes sense to "disable" the distributed features: 117 #当你想要禁用分布式时,你可以进行如下设置: 118 #index.number_of_shards: 1 119 #index.number_of_replicas: 0 120 121 # These settings directly affect the performance of index and search operations 122 # in your cluster. Assuming you have enough machines to hold shards and 123 # replicas, the rule of thumb is: 124 # 这两个属性的设置直接影响集群中索引和搜索操作的执行。假设你有足够的机器来持有分片和复制品, 125 # 那么可以按如下规则设置这两个值: 126 # 1. Having more *shards* enhances the _indexing_ performance and allows to 127 # _distribute_ a big index across machines. 128 #拥有更多的分片可以提升索引执行能力,并允许通过机器分发一个大型的索引; 129 # 2. Having more *replicas* enhances the _search_ performance and improves the 130 # cluster _availability_. 131 #拥有更多的复制器能够提升搜索执行能力以及集群能力。 132 # The "number_of_shards" is a one-time setting for an index. 133 #对于一个索引来说,number_of_shards只能设置一次 134 # The "number_of_replicas" can be increased or decreased anytime, 135 # by using the Index Update Settings API. 136 #而number_of_replicas可以使用索引更新设置API在任何时候被增加或者减少 137 # 138 # Elasticsearch takes care about load balancing, relocating, gathering the 139 # results from nodes, etc. Experiment with different settings to fine-tune 140 # your setup. 141 # ElasticSearch关注负载均衡、迁移、从节点聚集结果等等。可以尝试多种设计来完成这些功能。 142 # Use the Index Status API (<http://localhost:9200/A/_status>) to inspect 143 # the index status. 144 #可以连接http://localhost:9200/A/_status来检测索引的状态。 145 146 147 #################################### Paths #################################### 148 149 # Path to directory containing configuration (this file and logging.yml): 150 #配置文件所在的位置,即elasticsearch.yml和logging.yml所在的位置: 151 #path.conf: /path/to/conf 152 153 # Path to directory where to store index data allocated for this node. 154 #分配给当前节点的索引数据所在的位置: 155 #path.data: /path/to/data 156 # 157 # Can optionally include more than one location, causing data to be striped across 158 # the locations (a la RAID 0) on a file level, favouring locations with most free 159 # space on creation. For example: 160 #可以可选择的包含一个以上的位置,使得数据在文件级别跨越位置,这样在创建时就有更多的自由路径,如: 161 #path.data: /path/to/data1,/path/to/data2 162 163 # Path to temporary files: 164 # 临时文件位置: 165 #path.work: /path/to/work 166 167 # Path to log files: 168 #日志文件所在位置: 169 #path.logs: /path/to/logs 170 171 # Path to where plugins are installed: 172 # 插件安装位置: 173 #path.plugins: /path/to/plugins 174 175 176 #################################### Plugin ################################### 177 178 # If a plugin listed here is not installed for current node, the node will not start. 179 #若列表中的某一个插件未安装,则节点无法启动: 180 #plugin.mandatory: mapper-attachments,lang-groovy 181 182 183 ################################### Memory #################################### 184 185 # Elasticsearch performs poorly when JVM starts swapping: you should ensure that 186 # it _never_ swaps. 187 # 188 # Set this property to true to lock the memory: 189 #JVM开始交换时,ElasticSearch表现并不好:你需要保障JVM不进行交换,可以将bootstrap.mlockall设置为true禁止交换 190 #bootstrap.mlockall: true 191 192 # Make sure that the ES_MIN_MEM and ES_MAX_MEM environment variables are set 193 # to the same value, and that the machine has enough memory to allocate 194 # for Elasticsearch, leaving enough memory for the operating system itself. 195 #请确保ES_MIN_MEM和ES_MAX_MEM的值是一样的,并且能够为ElasticSearch分配足够的内在,并为系统操作保留足够的内存 196 # You should also make sure that the Elasticsearch process is allowed to lock 197 # the memory, eg. by using `ulimit -l unlimited`. 198 #你应该确保Elasticsearch 进程可以锁定内存。通过使用"ulimit -l unlimited" 199 200 ############################## Network And HTTP ############################### 201 202 # Elasticsearch, by default, binds itself to the 0.0.0.0 address, and listens 203 # on port [9200-9300] for HTTP traffic and on port [9300-9400] for node-to-node 204 # communication. (the range means that if the port is busy, it will automatically 205 # try the next port). 206 # 默认情况下,ElasticSearch使用0.0.0.0地址,并为http传输开启9200-9300端口, 207 # 为节点到节点的通信开启9300-9400端口,也可以自行设置IP地址 208 # (如果节点被占用了,es将会自动尝试使用下一个端口) 209 # Set the bind address specifically (IPv4 or IPv6): 210 # 211 #network.bind_host: 192.168.0.1 212 213 # Set the address other nodes will use to communicate with this node. If not 214 # set, it is automatically derived. It must point to an actual IP address. 215 # publish_host设置其他节点连接此节点的地址,如果不设置的话,则自动获取,publish_host的地址必须为真实地址 216 #network.publish_host: 192.168.0.1 217 218 # Set both 'bind_host' and 'publish_host': 219 #bind_host和publish_host可以一起设置 220 #network.host: 192.168.0.1 221 222 # Set a custom port for the node to node communication (9300 by default): 223 #可以定制该节点与其他节点交互的端口 224 #transport.tcp.port: 9300 225 226 # Enable compression for all communication between nodes (disabled by default): 227 #节点间交互时,可以设置是否压缩,默认为不压缩 228 #transport.tcp.compress: true 229 230 # Set a custom port to listen for HTTP traffic: 231 #可以为Http传输监听定制端口 232 #http.port: 9200 233 234 # Set a custom allowed content length: 235 #设置内容的最大长度 236 #http.max_content_length: 100mb 237 238 # Disable HTTP completely: 239 #禁止HTTP 240 #http.enabled: false 241 242 243 ################################### Gateway ################################### 244 245 # The gateway allows for persisting the cluster state between full cluster 246 # restarts. Every change to the state (such as adding an index) will be stored 247 # in the gateway, and when the cluster starts up for the first time, 248 # it will read its state from the gateway. 249 # 网关允许在所有集群重启后持有集群状态,集群状态的变更都会被保存下来, 250 # 当第一次启用集群时,可以从网关中读取到状态, 251 252 # There are several types of gateway implementations. For more information, see 253 # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-gateway.html>. 254 255 # The default gateway type is the "local" gateway (recommended): 256 #默认文件类型是本地local: 257 #gateway.type: local 258 259 # Settings below control how and when to start the initial recovery process on 260 # a full cluster restart (to reuse as much local data as possible when using shared 261 # gateway). 262 263 # Allow recovery process after N nodes in a cluster are up: 264 #允许在N个节点启动后恢复过程 265 #gateway.recover_after_nodes: 1 266 267 # Set the timeout to initiate the recovery process, once the N nodes 268 # from previous setting are up (accepts time value): 269 #设置初始化恢复过程的超时时间 270 #gateway.recover_after_time: 5m 271 272 # Set how many nodes are expected in this cluster. Once these N nodes 273 # are up (and recover_after_nodes is met), begin recovery process immediately 274 # (without waiting for recover_after_time to expire): 275 #设置该集群中可存在的节点上限 276 #gateway.expected_nodes: 2 277 278 279 ############################# Recovery Throttling ############################# 280 281 # These settings allow to control the process of shards allocation between 282 # nodes during initial recovery, replica allocation, rebalancing, 283 # or when adding and removing nodes. 284 285 # Set the number of concurrent recoveries happening on a node: 286 #设置一个节点的并发数量,有两种情况, 287 #一种是在初始复苏过程中: 288 # 1. During the initial recovery 289 # 290 #cluster.routing.allocation.node_initial_primaries_recoveries: 4 291 # 292 # 2. During adding/removing nodes, rebalancing, etc 293 #另一种是在添加、删除节点及调整时: 294 #cluster.routing.allocation.node_concurrent_recoveries: 2 295 296 # Set to throttle throughput when recovering (eg. 100mb, by default 20mb): 297 #设置复苏时的吞吐量,默认情况下是无限的 298 #indices.recovery.max_bytes_per_sec: 20mb 299 300 # Set to limit the number of open concurrent streams when 301 # recovering a shard from a peer: 302 #设置从对等节点恢复片段时打开的流的数量上限 303 #indices.recovery.concurrent_streams: 5 304 305 306 ################################## Discovery ################################## 307 308 # Discovery infrastructure ensures nodes can be found within a cluster 309 # and master node is elected. Multicast discovery is the default. 310 311 # Set to ensure a node sees N other master eligible nodes to be considered 312 # operational within the cluster. This should be set to a quorum/majority of 313 # the master-eligible nodes in the cluster. 314 #设置一个集群中主节点的数量,当多于三个节点时,该值可在2-4之间 315 #discovery.zen.minimum_master_nodes: 1 316 317 # Set the time to wait for ping responses from other nodes when discovering. 318 # Set this option to a higher value on a slow or congested network 319 # to minimize discovery failures: 320 #设置ping其他节点时的超时时间,网络比较慢时可将该值设大 321 #discovery.zen.ping.timeout: 3s 322 323 # For more information, see 324 # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-zen.html> 325 326 # Unicast discovery allows to explicitly control which nodes will be used 327 # to discover the cluster. It can be used when multicast is not present, 328 # or to restrict the cluster communication-wise. 329 # 330 # 1. Disable multicast discovery (enabled by default): 331 # 禁止当前节点发现多个集群节点, 332 # 默认启用发现节点机制,设为false的话表示禁用自动发现机制 333 #discovery.zen.ping.multicast.enabled: false 334 # 335 # 2. Configure an initial list of master nodes in the cluster 336 # to perform discovery when new nodes (master or data) are started: 337 #设置新节点被启动时能够发现的主节点列表 338 #discovery.zen.ping.unicast.hosts: ["host1", "host2:port"] 339 340 # EC2 discovery allows to use AWS EC2 API in order to perform discovery. 341 # 342 # You have to install the cloud-aws plugin for enabling the EC2 discovery. 343 # 344 # For more information, see 345 # <http://elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-ec2.html> 346 # 347 # See <http://elasticsearch.org/tutorials/elasticsearch-on-ec2/> 348 # for a step-by-step tutorial. 349 350 # GCE discovery allows to use Google Compute Engine API in order to perform discovery. 351 # 352 # You have to install the cloud-gce plugin for enabling the GCE discovery. 353 # 354 # For more information, see <https://github.com/elasticsearch/elasticsearch-cloud-gce>. 355 356 # Azure discovery allows to use Azure API in order to perform discovery. 357 # 358 # You have to install the cloud-azure plugin for enabling the Azure discovery. 359 # 360 # For more information, see <https://github.com/elasticsearch/elasticsearch-cloud-azure>. 361 362 ################################## Slow Log ################################## 363 364 # Shard level query and fetch threshold logging. 365 366 #index.search.slowlog.threshold.query.warn: 10s 367 #index.search.slowlog.threshold.query.info: 5s 368 #index.search.slowlog.threshold.query.debug: 2s 369 #index.search.slowlog.threshold.query.trace: 500ms 370 371 #index.search.slowlog.threshold.fetch.warn: 1s 372 #index.search.slowlog.threshold.fetch.info: 800ms 373 #index.search.slowlog.threshold.fetch.debug: 500ms 374 #index.search.slowlog.threshold.fetch.trace: 200ms 375 376 #index.indexing.slowlog.threshold.index.warn: 10s 377 #index.indexing.slowlog.threshold.index.info: 5s 378 #index.indexing.slowlog.threshold.index.debug: 2s 379 #index.indexing.slowlog.threshold.index.trace: 500ms 380 381 ################################## GC Logging ################################ 382 383 #monitor.jvm.gc.young.warn: 1000ms 384 #monitor.jvm.gc.young.info: 700ms 385 #monitor.jvm.gc.young.debug: 400ms 386 387 #monitor.jvm.gc.old.warn: 10s 388 #monitor.jvm.gc.old.info: 5s 389 #monitor.jvm.gc.old.debug: 2s 390 391 ################################## Security ################################ 392 393 # Uncomment if you want to enable JSONP as a valid return transport on the 394 # http server. With this enabled, it may pose a security risk, so disabling 395 # it unless you need it is recommended (it is disabled by default). 396 #如果你想要启用JSONP作为HTTP服务器的有效传输的话取消注释。 397 #启用此功能,它可能会带来风险。因此,禁用它,除非你必须需要它(默认禁用) 398 #http.jsonp.enable: true 本文转自SummerChill博客园博客,原文链接:http://www.cnblogs.com/DreamDrive/p/6035771.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

hbase+opentsdb 单机版搭建

2018年2月19日星期一 Lee 这个实验步骤比较简单,只能用来演示下搭建过程,实际生产环境复杂的很多。 实验环境: centos6.5 x86_64 IP: 10.0.20.25 这里实验没有用HDFS,生产环境的话,hbase还是要把数据存到hdfs上比较安全的。 1. 安装单机zookeeper cd /root/ tar xf zookeeper-3.4.8.tar.gz -C ./ mv zookeeper-3.4.8 /opt/zk cd /opt/zk cat conf/zoo.cfg 内容如下: tickTime=2000 initLimit=10 syncLimit=5 dataDir=/tmp/zookeeper clientPort=2181 /opt/zk/bin/zkServer.sh start /opt/zk1/zk1.cfg /opt/zk/bin/zkCli.sh -server 10.0.20.25:2181 2. 安装单机hbase tar xf hbase-1.2.6-bin.tar.gz –C /usr/local cd /usr/local/ ln –s hbase-1.2.6 hbase cd hbase mkdir data // 用来存放hbase的data数据【生产环境下,处于安全性考虑,hbase数据是存放到hdfs的】 cd conf vim hbase-env.sh 最后追加3行: export JAVA_HOME=/usr/java/jdk1.8.0_91 export PATH=${JAVA_HOME}/bin:$PATH export HBASE_MANAGES_ZK=false cat hbase-site.xml 添加红色部分的代码: <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>hbase.rootdir</name> <value>/usr/local/hbase/data/</value> </property> <property> <name>hbase.master.info.port</name> <value>16001</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> <!-- false是单机模式,true是分布式模式。若为false,Hbase和Zookeeper会运行在同一个JVM里面。--> </property> <property> <name>hbase.zookeeper.quorum</name> <value>localhost:2181</value> </property> </configuration> 更详细的可参看:https://www.cnblogs.com/yangsy0915/p/5544533.html cat regionservers 内容如下:localhost 注意regionservers 里面写的内容和上面的hbase.zookeeper.quorum里面的hostname一样。 启动hbase: cd /usr/local/hbase/bin ./start-hbase.sh 即可启动hbase 验证: ss –lnt | grep 16001 ps aux|grep hbase 补充,HDFS+hbase+3节点zk的 hbase-site.xml配置文件写法: <configuration> //设置将数据写入hdfs的目录 <property> <name>hbase.rootdir</name> <value>hdfs://master:9000/usr/local/hadoop-2.6.0/hbaseData</value> </property> //设置hbase模式为集群模式 <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> //设置hbase的master端口地址 <property> <name>hbase.master</name> <value>hdfs://master:60000</value> </property> //HBase Master web界面绑定的端口,默认为0.0.0.0 <property> <name>hbase.master.info.port</name> <value>60010</value> </property> //连接zookeeper的端口设置 <property> <name>hbase.zookeeper.property.clientPort</name> <value>2183</value> </property> //设置zookeeper的连接地址(必须为基数个) <property> <name>hbase.zookeeper.quorum</name> <value>master,slave1,slave2</value> </property> //Zookeeper的zoo.conf中的路径配置,快照的存储位置 <property> <name>hbase.zookeeper.property.dataDir</name> <value>/usr/local/zookeeper-3.4.6/data</value> </property> //Zookeeper连接超时时间 <property> <name>zookeeper.session.timeout</name> <value>60000</value> </property> </configuration> 3. 安装opentsdb 官方网站:http://opentsdb.net/docs/build/html/installation.html#id1 rpm –ivh opentsdb-2.3.0.rpm cd /etc/opentsdb vim opentsdb.conf 内容如下: tsd.network.port = 4242 tsd.network.bind = 0.0.0.0 tsd.network.worker_threads = 8 tsd.http.staticroot = /usr/share/opentsdb/static/ tsd.http.cachedir = /tmp/opentsdb tsd.core.auto_create_metrics = true tsd.core.plugin_path = /usr/share/opentsdb/plugins tsd.storage.hbase.zk_quorum = localhost:2181 启动之前,需要到hbase上面去创建表: cd /usr/share/opentsdb/tools env COMPRESSION=NONE HBASE_HOME=/usr/local/hbase ./create_table.sh 启动及验证: /etc/init.d/opentsdb start ss -lnt | grep 4242 ps aux|grep opentsdb 访问浏览器的http://10.0.20.25:4242 4. 写数据测试 http api写数据方法: 官方文档:http://opentsdb.net/docs/build/html/api_http/put.html 可以使用chrome插件,如下方式post数据到opentsdb。【返回值204表示提交成功】 也可以使用tcollector来采集系统数据,并写入到opentsdb,方法如下: git clonehttps://github.com/OpenTSDB/tcollector.git cd tcollector 如果不修改tcollector.py文件的话,默认采集程序会把采集的东西上送到localhost本地的opentsdb里面。【默认参数如下图】 ./tcollector start // 即可在后台启动采集程序 ps aux | grep tcollector 如果需要采集mysql等其他软件的监控状态,需要去 collectors/etc/ 这个目录下的对应脚本里面,添加相关的账户名和密码,以便采集程序搜集信息。 然后,就可以到opentsdb的web界面去绘图了,下面是我采集了好几个小时的数据展示: 放到grfana里面,数据显示会更好看点。 配置大致这样的: 本文转自 lirulei90 51CTO博客,原文链接:http://blog.51cto.com/lee90/2071936,如需转载请自行联系原作者

优秀的个人博客,低调大师

CDH版Phoenix的安装(图文详解)

其中,cmbigdata1即做server,又做agent。 cmbigdata2、cmbigdata3和cmbigdata4都是做agent。 注意: CDH版本的Phoenix的安装,需要我们自己编译。 1、下载 https://github.com/chiastic-security/phoenix-for-cloudera/tree/4.8-HBase-1.2-cdh5.8 2、编译(编译时间较长,耐心等待) mvn clean package -DskipTests 3、解压 将编译好的phoenix-4.8.0-cdh5.8.0.tar.gz解压出来 [root@cmbigdata1 phoenix]# tar -zxvf phoenix-4.8.0-cdh5.8.0.tar.gz [root@cmbigdata1 phoenix]# cd phoenix-4.8.0-cdh5.8.0 [root@cmbigdata1 phoenix-4.8.0-cdh5.8.0]# ll total 166152 drwxr-xr-x 2 root root 4096 Apr 18 16:41 bin -rw-r--r-- 1 root root 1930 Aug 8 2016 build.txt drwxr-xr-x 3 root root 4096 Aug 8 2016 dev drwxr-xr-x 2 root root 4096 Aug 8 2016 docs drwxr-xr-x 3 root root 4096 Aug 8 2016 examples drwxr-xr-x 2 root root 4096 Apr 18 16:40 lib -rw-r--r-- 1 root root 113247548 Apr 18 14:43 phoenix-4.8.0-cdh5.8.0-client.jar -rw-r--r-- 1 root root 6619716 Apr 18 14:30 phoenix-4.8.0-cdh5.8.0-queryserver.jar -rw-r--r-- 1 root root 22498517 Apr 18 14:43 phoenix-4.8.0-cdh5.8.0-server.jar -rw-r--r-- 1 root root 27739579 Apr 18 14:29 phoenix-4.8.0-cdh5.8.0-thin-client.jar 4、将phoenix-4.8.0-cdh5.8.0-server.jar拷贝到每一个RegionServer下 [root@cmbigdata2~]# find / -name 'phoenix-4.8.0-cdh5.8.0-server.jar' /soft/bigdata/clouderamanager/cloudera/parcels/CDH-5.10.0-1.cdh5.10.0.p0.41/lib/hbase/lib/phoenix-4.8.0-cdh5.8.0-server.jar cmbigdata2和cmbigdata3和cmbigdata4一样。 5、增加hbase-site.xml 配置 <property> <name>hbase.table.sanity.checks</name> <value>false</value> </property> CDH修改方法: 在集群管理页面点击Hbase,进入Hbase管理界面 点击配置: 选择高级: 增加如下配置: 6、重启Hbase 这个很简单,不多说,会玩cloudermanager的人都知道。 7、登录phoenix 进入phoenix-4.8.0-cdh5.8.0/bin目录执行。 [root@cmbigdata1 phoenix-4.8.0-cdh5.8.0]# cd /soft/phoenix/phoenix-4.8.0-cdh5.8.0/bin/ [root@cmbigdata1 bin]# ll total 140 -rwxr-xr-x 1 root root 32440 Aug 8 2016 daemon.py -rwxr-xr-x 1 root root 1881 Aug 8 2016 end2endTest.py -rw-r--r-- 1 root root 1621 Aug 8 2016 hadoop-metrics2-hbase.properties -rw-r--r-- 1 root root 3056 Aug 8 2016 hadoop-metrics2-phoenix.properties -rw-r--r-- 1 root root 1084 Aug 8 2016 hbase-site.xml -rw-r--r-- 1 root root 2583 Aug 8 2016 log4j.properties -rwxr-xr-x 1 root root 5128 Aug 8 2016 performance.py -rwxr-xr-x 1 root root 3249 Aug 8 2016 pherf-cluster.py -rwxr-xr-x 1 root root 2729 Aug 8 2016 pherf-standalone.py -rwxr-xr-x 1 root root 9354 Aug 8 2016 phoenix_utils.py -rw-r--r-- 1 root root 6082 Apr 18 16:41 phoenix_utils.pyc -rwxr-xr-x 1 root root 2739 Aug 8 2016 psql.py -rwxr-xr-x 1 root root 7659 Aug 8 2016 queryserver.py -rw-r--r-- 1 root root 1820 Aug 8 2016 readme.txt -rwxr-xr-x 1 root root 4315 Aug 8 2016 sqlline.py -rwxr-xr-x 1 root root 5426 Aug 8 2016 sqlline-thin.py -rw-r--r-- 1 root root 6895 Aug 8 2016 tephra -rwxr-xr-x 1 root root 2037 Aug 8 2016 tephra-env.sh -rwxr-xr-x 1 root root 6884 Aug 8 2016 traceserver.py [root@cmbigdata1 bin]# ./sqlline.py slave1:2181 Setting property: [incremental, false] Setting property: [isolation, TRANSACTION_READ_COMMITTED] issuing: !connect jdbc:phoenix:slave1:2181 none none org.apache.phoenix.jdbc.PhoenixDriver Connecting to jdbc:phoenix:slave1:2181 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/soft/phoenix/phoenix-4.8.0-cdh5.8.0/phoenix-4.8.0-cdh5.8.0-client.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/soft/bigdata/clouderamanager/cloudera/parcels/CDH-5.10.0-1.cdh5.10.0.p0.41/jars/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] 17/04/18 20:48:14 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Connected to: Phoenix (version 4.8) Driver: PhoenixEmbeddedDriver (version 4.8) Autocommit status: true Transaction isolation: TRANSACTION_READ_COMMITTED Building list of tables and columns for tab-completion (set fastconnect to true to skip)... 264/264 (100%) Done Done sqlline version 1.1.9 0: jdbc:phoenix:cmbigdata1:2181> 8、简单测试 本文转自大数据躺过的坑博客园博客,原文链接:http://www.cnblogs.com/zlslch/p/7096402.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

openstack i版常用命令

查看openstack的运行状态 nova节点nova service-list (nova-scheduler、nova-conductor、nova-cert、nova-consoleauth)监控服务状态时除nova-consoleauth中有一台作为准备down状态外其余为up neutron节点neutron agent-list (Metadata agent、DHCP agent、Open vSwitch agent) 监控状态时非:-)时为异常 cinder节点 cinder service-list (cinder-backup、cinder-scheduler、cinder-volume) 监控状态时非up时为异常 注: 监控采用api的方式获取,命令加入--debug即可获得api请求cinder --debug service-list 查看云主机信息 特定tenant下所有云主机 nova list 所有tenant下的云主机信息 nova list --all-tenants (admin keyfile) 注:nova api配置限制返回条目nova.conf 1 2 3 #Themaximumnumberofitemsreturnedinasingleresponse #fromacollectionresource(integervalue) osapi_max_limit=1000 根据IP过滤查询 nova list --all-tenant --ip 10.199.133.152 keyfile文件示例 1 2 3 4 5 6 cat keystonerc_admin export OS_USERNAME=admin export OS_TENANT_NAME=admin export OS_PASSWORD=openstack_pass export OS_AUTH_URL=http: //keystone_ip :5000 /v2 .0/ export PS1= '[\u@\h\W(keystone_admin)]\$' 查看详细信息 nova show uuid 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 +--------------------------------------+-------------------------------------------------------------+ |Property|Value| +--------------------------------------+-------------------------------------------------------------+ |OS-DCF:diskConfig|MANUAL| |OS-EXT-AZ:availability_zone|qa-zone| |OS-EXT-SRV-ATTR:host|hh-yun-compute-130128.vclound.com| |OS-EXT-SRV-ATTR:hypervisor_hostname|hh-yun-compute-130128.vclound.com| |OS-EXT-SRV-ATTR:instance_name|instance-00021e62| |OS-EXT-STS:power_state|1| |OS-EXT-STS:task_state|-| |OS-EXT-STS:vm_state|active| |OS-SRV-USG:launched_at|2017-01-04T06:39:22.000000| |OS-SRV-USG:terminated_at|-| |QATOOL_NETnetwork|10.199.133.152| |accessIPv4|| |accessIPv6|| |availability_zone|qa-zone| |config_drive|| |created|2017-01-04T06:38:18Z| |flavor|4core-4g(dc98e6d6-143f-42c2-9482-ee6efb04ff7e)| |hostId|38e138eb165ba7732ce3f40b6830eb158ef8788bdc4279c63e2a024f| | id |e2bbc0ff-a16a-4dea-8c5e-1e9bb7445c13| |image|Centos7_Generic_1503(5aa770b3-8636-4532-9ffd-e1b0dca982be)| |key_name|-| |metadata|{}| |name|harbor-ui.vclound.com| |os-extended-volumes:volumes_attached|[{ "id" : "ee67e9a3-3b63-41dd-bd4a-ef778dbe89d4" }]| |progress|0| |security_groups|default| |status|ACTIVE| |tenant_id|359df7f169214333a7562c7a3095beb8| |updated|2017-01-04T06:39:22Z| |user_id|e69ce5e92b4c427189269c0d6df38fb7| +--------------------------------------+-------------------------------------------------------------+ 查看flavor nova flavor-list 查看镜像 nova image-list glance image-list 查看网络 neutron net-list 查看用zonenova aggregate-list 查看zone下的物理主机 nova aggregate-details qa-zone 创建并启动一台名为adams_test_vm的云主机 创建云主机指定物理主机及密码 nova boot --flavor flavor_name --image image_name --security_group default --nic net-id=net_uuid --availability-zone qa-nova:computer_name vm_host_name --user-data ./passwd.sh --poll 1 2 3 passwd .sh内容如下: #!/bin/bash echo qwe123qwe| passwd --stdinroot 下载镜像 glance image-download image_id --file Win7 上传镜像 glance image-create --name image_name --disk-format qcow2 --file /root/Win7 --container-format bare --is-public True 卸载云盘 nova volume-detach 云主机uuid 云盘uuid 挂载云盘 novavolume-attach云主机uuid 云盘uuid 查看用户信息keystone user-getuser_id 查看tenant信息keystone tenant-get tenant_id 查看compute节点列表nova hypervisor-list 查看compute节点信息nova hypervisor-show compute_node_name 查看宿主机节点上的所有云主机信息nova hypervisor-serverscompute_node_name 查看compute节点资源使用情况nova hypervisor-stats 删除云主机nova delete uuid 创建云盘cinder create size_by_G --availability-zone nova --volume-type ceph-sata --display-name harbor-ui-01 --display-description "ui log disk" --metadata create_user_login=jack01.wu readonly=False create_user_id=xxx attached_mode=rw 迁移云主机nova live-migration uuid compute_node_name (挂载有云硬盘的实例,需要先卸载后操作) 禁用compute节点服务nova service-disable compute_node_name IP分配信息neutron port-list 租户列表keystone tenant-list 配额信息nova quota-show 变更实例配置nova resize instance_uuid|instance_nameflavor_name|flavor_id 重新配置实例nova instance_uuid|instance_nameflavor_name|flavor_id--rebuild-password test Openstack超配设置 1 nova.conf(默认值) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 CPU #VirtualCPUtophysicalCPUallocationratiowhichaffects #allCPUfilters.Thisconfigurationspecifiesaglobalratio #forCoreFilter.ForAggregateCoreFilter,itwillfallback #tothisconfigurationvalueifnoper-aggregatesetting #found.(floatingpointvalue) #cpu_allocation_ratio=16.0 DISK磁盘超配如云主机使用宿主机存储易导致灾难事故 #Virtualdisktophysicaldiskallocationratio(floating #pointvalue) #disk_allocation_ratio=1.0 MEM #Virtualramtophysicalramallocationratiowhichaffects #allramfilters.Thisconfigurationspecifiesaglobalratio #forRamFilter.ForAggregateRamFilter,itwillfallbackto #thisconfigurationvalueifnoper-aggregatesettingfound. #(floatingpointvalue) #ram_allocation_ratio=1.5 #Enablesdynamicmemoryallocation(ballooning)whensettoa #valuegreaterthan1.Thevalueexpressestheratiobetween #thetotalRAMassignedtoaninstanceanditsstartupRAM #amount.Forexamplearatioof2.0foraninstancewith #1024MBofRAMimplies512MBofRAMallocatedatstartup #(floatingpointvalue) #dynamic_memory_ratio=1.0 从14的开发测试环境开始使用openstack,整体架构初期采用openstack底层、页面抛弃原生Horizon自主开发集成后台界面,实现全套的从物理机裸机至云主机业务上线使用、监控报警的流程。初期采用puppet用于管理云主机,glusterfs文件存储作为后端存储。 后续由于时间及研究未深入原因,puppet不适合用于管理3k+以上云主机,后续采用特定用户密钥+自研发布系统的方式管理云主机的管理软件。及机房断电时glusterfs的恢复能力、文件丢失情况严重问题后续后端采用ceph的rbd块存储的方式稳定提供高可用服务。 大致功能模块如下: 本文转自 qwjhq 51CTO博客,原文链接:http://blog.51cto.com/bingdian/1708902

优秀的个人博客,低调大师

linux下安装zookeeper(单机版)

Zookeeper 分布式服务框架是用来解决分布式应用中经常遇到的一些数据管理问题,如:统一命名服务、状态同步服务、集群管理、分布式应用配置项的管理等。本文主要从使用者角度来介绍一下Zookeeper的安装,配置及应用。 单机模式 Zookeeper可以单机安装,这种应用模式主要用在测试或demo的情况下,在生产环境下一般不会采用。 1. 首先可以从Zookeeper的官方网站下载最新的安装包:http://www.apache.org/dist/zookeeper/ 2、上传刚下载的zookeeper-3.4.8.tar.gz 到/home/hadoop目录中 3、解压: tar-zxvfzookeeper-3.4.8.tar.gz 4、重命名: mvzookeeper-3.4.8.tar.gzzookeeper 5、修改环境变量: vim/etc/profile 在文件最后添加: exportZOOKEEPER_HOME=/home/hadoop/zookeeper exportPATH=$PATH:$ZOOKEEPER_HOME/bin 重新编译文件: source/etc/profile 6、修改zookeeper的配置文件 cd/home/hadoop/zookeeper/conf cpzoo_sample.cfgzoo.cfg vimzoo.cfg 修改: dataDir=/home/hadoop/zookeeper/data (在/home/hadoop/zookeeper/目录下创建data目录) 7、启动zookeeper: zkServer.sh zkServer.sh status #可查看zookeeper是否正常启动,若正常启动应如下图 8、客户端连接zookeeper zkCli.sh 数秒之后连接到zkServer: 到这zookeeper已安装并启动完成 zookeeper命令行操作: 运行zkCli.sh–server<ip>进入命令行工具 分析创建节点: -s:序列化 -e:短暂的。 类型: 创建短暂非序列化节点:-e 创建短暂序列化:-s–e 创建持久非序列化:空 创建持久序列化:-s 1、使用ls命令来查看当前ZooKeeper中所包含的内容: [zk:202.115.36.251:2181(CONNECTED)1]ls/ 2、创建一个新的znode,使用create/zkmyData。这个命令创建了一个新的znode节点“zk”以及与它关联的字符串: [zk:202.115.36.251:2181(CONNECTED)2]create/zk myData 3、我们运行get命令来确认znode是否包含我们所创建的字符串: [zk:202.115.36.251:2181(CONNECTED)3]get/zk 4、下面我们通过set命令来对zk所关联的字符串进行设置: [zk:202.115.36.251:2181(CONNECTED)4]set/zk"zsl“ 5、下面我们将刚才创建的znode删除: [zk:202.115.36.251:2181(CONNECTED)5]delete/zk 本文转自 兴趣e族 51CTO博客,原文链接:http://blog.51cto.com/simplelife/1875882

优秀的个人博客,低调大师

关于Windows操作主机(易懂版)

环境介绍: 一台DC,一台辅助DC 将DC上的五种角色转移到辅助DC上 查看五种角色: 运行如下命令(用于查看操作主机)打开用户和计算机: 运行如下命令打开活动目录域和信任关系(查看操作主机): 在运行中键入如下命令: 打开mmc控制台: 从上图看得出五种角色全在主DC(yunjing5-108-8.yunjing.com)上 现在开始进行各主机角色的转换到辅助DC上: 转移架构操作主机: 转移域命名操作主机: 转移PDC操作主机: 转移相对ID操作主机: 转移基础结构操作主机: OK!转移成功。 在辅助DC上进行查看: 执行活动目录数据库的授权还原 一台DC(兼任DNS服务器),另一台为辅助DC 使用管理员帐号登录到主DC,并创建OU:testsA和testsB 并到辅助DC检查这两个OU是否存在: 到辅助DC上进行查看: OK!现在在主DC上开始做备份: 在主DC上删除OU: 重启,按F8进入目录服务还原模式: 输入管理员帐号和还原口令: 双击备份文件进行还原: 还原之后请注意不要重启。 打开cmd: OK!还原成功。 重启计算机进行测试。 OK!查看OU与用户还原成功。 附件:http://down.51cto.com/data/2353731 本文转自 tomsjack 51CTO博客,原文链接:http://blog.51cto.com/tom110/192928

优秀的个人博客,低调大师

“中国版的CES”是怎样的?

AWE中国家电博览会这两天在上海开幕,包括笔者在内的很多人都会把它看作“中国的CES”,或者“上海的高交会”。但据官方的解释,AWE属于家电产业链展,CES更侧重消费电子和移动互联网(AWE上超过70%面积展出的白电产品、厨卫电器及小家电产品在CES上并不会展出,这是两者的区别)。 智能家电并无新奇 AWE的大部头必然是各家传统家电厂商,这些厂商多数都在1号和2号馆。如果用一句话总结家电厂商便是:黑电厂商晒电视,白电厂商晒冰箱和空调。 晒电视包括:更清晰的电视(4K); 更多的电视; 和更薄的电视(美女告诉我们厚度仅8毫米)。 白电厂商则是,这样 和这样。 轻智能家居淡出 2013-2014年大热并且雷锋网(公众号:雷锋网)也曾大篇幅报道的轻智能家居,如创业公司做的智能插座,互联网大厂掐得激烈的智能路由器,今年在展会上已经很少看到。 硕果仅存

优秀的个人博客,低调大师

iOS 版 Skype支持群组语音聊天

现在,用户只需在群组聊天界面下点击下方的电话图标即可打开一场群组语音电话。 当你是这场群组语音电话主持人的时候,你可以看到群组内的所有成员,而且你能在不需要结束通话的情况下即可移除当中的一些组员。 igzcadkojd6tya9apebt.png 如果你已经开始跟一位好友在语音聊天了,同样你也可以在不需要结束通话的情况下添加其他好友进来。 现在,用户可以在App Store上下载到更新,而用户必须保证其手机系统的版本在iOS 7或更高。文章转载自 开源中国社区 [http://www.oschina.net]

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册
修改密码
忘记密码