We have started elasticsearch in the previous article, and then we can communicate with elasticsearch, such as inserting data, retrieving data, deleting data, and so on. Elasticsearch provides two ways to communicate with Java APIs and restful APIs. Java API
If you are using the Java,elasticsearch built-in two client, you can use it in your code:Node client: The node client joins a cluster as a non-data node. In other words, it doesn't have any data on its own, but he knows what data is on which
referenced to the official Docker library, which is the version of this installation 3.11.3 . docker run --name cassandra-3.11.3 -p 7000:7000 -p 7001:7001 -p 7199:7199 -p 9042:9042 -p 9160:9160 -d cassandra:3.11.32. Elasticsearch InstallationThe installation of Elasticsearch is referenced to the official Docker library, which is the version of this installation 5.5.2 . docker run --name es-5.5.2 -p 9200:9200 -p 9300:
(we can also log in to your Docker-hub account and upload your own image)
Docker Pull Elasticsearch
3. Use image as a template to start Docker-container, you can provide ES services
Docker run-it--name es-p 9200:9200-p 9300:9300-v d:/docker/data/es:/usr/share/elasticsearch/data-v D:/docker/logs/es /:/user/share/elasticsearch/logs Elasticsearch
A) Run: Create a new container and run the specified command
Springboot Integrated ElasticsearchIn the Pom.xml file, the following versions of the jar packages are dependent:The Creates a new config package in the project, in which a Esconfig configuration class is created to construct the client instance object for ES. The code is as follows: Package Org.zero01.elasticsearch.demo.config;import Org.elasticsearch.client.transport.transportclient;import Org.elasticsearch.common.settings.settings;import org.elasticsearch.common.transport.InetSocketTransport
to the number of ports; Support Gigabit/Gigabit high-speed connection; High-performance Easy to use, Plug and Play; have certain network service quality and control ability.
Service Operation management Platform implementation. As a common operation network providing access service, community network should consider the problems of user authentication and billing as well as network security in Operation Service Management.
Thus, the design, construction and matching of network operation manag
Join the dependencyMy local Elasticsearch version is 2.1.0, so join the corresponding Maven dependencyCreate ClientThe Elasticsearch client is divided into node client and transportclient.
Node Client: Nodes themselves are nodes of the Elasticsearch cluster, as well as nodes in the Elasticsearch cluster and other elasticsearch clusters
Transportclient: Lightweight client, using Netty thread pool, socket connected to ES cluster. itself does not join the cluster, only as the processin
configuration files in ElasticsearchVim Config/elasticsearch.ymlLocate the following configuration:Discovery.zen.ping.unicast.hosts:["192.168. : 9300 "," 192.168. . : 9300 "]In general, there is a problem with the configuration here, note the writing format
Question 9:
Org.elasticsearch.transport.RemoteTransportException:Failed to deserialize exception response from streamReason: JDK version inconsistency
between the corresponding versions of them.
Spring Boot Version (x)
Spring Data elasticsearch Version (y)
elasticsearch Version (z)
X
Y
Z
X >= 1.4.x
2.0.0
2.0.0
The springboot version We use here is 1.5.9, and theelasticsearch version is 2.3.5.
Using springboot to consolidate elasticsearchis typically encapsulated using springdata , and then the DAO layer interface inherits Elasticsearchrepository class, which imp
something more ambitious, you can run a Ubuntu container with: $ docker run-it Ubuntu bash Share images, automa Te workflows, and more with a free Docker Hub account:https://hub.docker.com for more examplesand ideas, visit:https://docs.docker.com/engine/userguide/
2.5. Install Docker-compose
To execute a command:
sudo curl-l https://github.com/docker/compose/releases/download/1.8.1/docker-compose-' uname-s '-' uname-m ' >/usr /local/bin/docker-compose
chmod +x/usr/local/bin/docker-compose
environment support, because the client is using the Filebeat software, it does not rely on the Java environment, so do not need to install
Second, Elk service-side Operation1. Installing JDK8 and Elasticsearch
RPM-IVH jdk-8u102-linux-x64.rpm
Yum Localinstall elasticsearch-2.3.3.rpm-y
Start the service
Service Elasticsearch Start
Chkconfig Elasticsearch on
Check Service
RPM-QC Elasticsearch
/etc/elasticsearch/elasticsearch.yml
/etc/elasticsearch/logging.yml
/etc/init.d/elasticsear
/iOS_ICE_AND_FIRE0x01 Mach-O LC_LOAD_DYLIB Hook
If I have read the android dynamic debugging Seven Weapons hook-Hooking (on) http://drops.wooyun.org/tips/9300 and Android dynamic debugging Seven Weapons hook-Hooking (on) http://drops.wooyun.org/papers/10156 students should know in android hook method can be five flowers eight books. In fact, there are many hook methods on iOS, but most of them need to be jailbroken (for example, Cydia Substrate, whic
to excessive network trafficConnection Times (MS)Min MEAN[+/-SD] Median maxconnect:0 102 886.7 16 8875processing:188 9357 1702.7 9906 10156Waiting:16 9300 1954.0 9906 10156total:188 9458 1562.2 9922 11281Decomposition of time consumed on the networkPercentage of the requests served within a certain time (MS)50% 992266% 1001675% 1004780% 1006390% 1012595% 1015698% 1015699% 11281100% 11281 (Longest request)The response of all requests in the entire sce
under the es root directory.
Bootstrap. mlockall: trueSet to true to lock the memory. When the jvm starts swapping, the es efficiency is reduced, so to ensure that it is not swap, you can set the ES_MIN_MEM and ES_MAX_MEM environment variables to the same value, and ensure that the machine has enough memory to allocate to es. At the same time, elasticsearch processes must be allowed to lock the memory. in Linux, you can run the 'ulimit-l unlimited' command.
Network. bind_host: 192.168.0.1Set th
1. Add Maven DependencyXML code
dependency>
groupId>org.elasticsearchgroupId>
artifactid>elasticsearchartifactid>
version>0.90.0version>
Dependency>
It is recommended to use MAVEN to manage the project because Elasticsearch has a lot of dependencies and manual maintenance is cumbersome2. Create a client that connects to the Elasticsearch serviceJava code
Settings Settings = Immutablesettings.settingsbuilder (). Put ("Client.transport.sniff", true). Put ("Cl
I know a tool named ElasticSearch-jdbc. I also read the official documentation and wrote a test according to the official documentation (for the command, see the bottom), but it cannot be synchronized in real time, it will be updated in about one minute. I don't know where the problem is. Please let us know before you go! Command: { quot; type quot;: quot; jdbc quot;, quot; jdbc quot ;:{ quot; url quot ;: quot; jdbc: mysql: xxx. xxx. xxx. xxx: 3306 world quot;, quot; user synchronize m
file, and write the following code: Discovery.zen.ping.multicast.enabled:false #关闭广播, if the LAN has a machine open 9300 port, the service will start Can't move.network.host:192.168.1.91 #指定主机地址, in fact, is optional, but it is better to specify that the following HTTP connection error is reported when the Kibana is integrated (visual representation of Monitored::: 9200 instead of 0.0.0.0:9200)Http.cors.a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.