python concurrent server for connecting multi process, multi thread and single process

Connection oriented concurrent server def main(): # 1. Create socket socket tcp_server = socket(AF_INET, SOCK_STREAM) # 2. Bind IP address and port tcp_server.bind(("", 8888)) # 3. Change the active mode to the passive mode, and only receive and not send data tcp_server.listen(5) while True: # 4. ...

Posted on Fri, 06 Dec 2019 04:07:40 -0500 by theprofession

Talk about the pullFromWhichNodeTable of rocketmq

order This paper mainly studies the pullFromWhichNodeTable of rocketmq pullFromWhichNodeTable rocketmq-all-4.6.0-source-release/client/src/main/java/org/apache/rocketmq/client/impl/consumer/PullAPIWrapper.java public class PullAPIWrapper { private final InternalLogger log = ClientLogger.getLog(); private final MQClientInstance mQClientF ...

Posted on Fri, 06 Dec 2019 03:42:44 -0500 by tlenker09

Regular expression three swordsmen and file processor in shell programming

Preface: Basic regular expression Extended regular expression How to use sed tool How to use awk tools One: regular expression I have learned the basic usage of Shell script before, and I can edit Shell script with conditional judgment, loop and other statements. Next, we will introduce a very important concept - regular expression (RE). Reg ...

Posted on Fri, 06 Dec 2019 01:25:35 -0500 by zc1

Troubleshooting of container printing log to console block

original text Today, the production environment found that some containers stopped responding, but the containers did not die. Docker exec - it < container name > / bin / bash can also be used normally. Use jstack < PID > inside the container to find that the Console Appender of log4j2 is always running: "AsyncAppender-asyncConsole" ...

Posted on Fri, 06 Dec 2019 00:29:20 -0500 by cdm2

request.getInputStream read request in stream mode can only be read once

When the project uses request.getInputStream to read the request in the way of stream, but in the actual project, some interceptors are usually used to do some verification. It is found that the request can only be read once, and it can't be used in the Controller. For example, when the front-end request is submitted in json mode, the back-end ...

Posted on Thu, 05 Dec 2019 19:43:37 -0500 by like_php

Alicloud datahub rest API usage example

Summary Alicloud Streaming Data processing platform DataHub is a Streaming Data processing platform. It provides the publishing, subscription and distribution functions of Streaming Data, so that you can easily build analysis and application based on Streaming Data. At present, the official SDK of Java and Python is provided, and users can easi ...

Posted on Thu, 05 Dec 2019 14:17:58 -0500 by jc94062

Installation and use of ActiveMQ

Environmental Science CentOS 6.10 JDK1.8 192.168.1.120 The software installation package is uniformly placed in / usr/local/src/ The software installation directory is uniformly placed in / usr/local/ 1. Install JDK and configure environment variables (omitted) 2. Download ActiveMQ apache-activemq-5.11.1-bin.tar.gz you can f ...

Posted on Thu, 05 Dec 2019 09:31:29 -0500 by webref.eu

Use of Solr in java-05

Import the required coordinates. Note that it conflicts with the lower version of HTTP client <dependency> <groupId>org.apache.solr</groupId> <artifactId>solr-solrj</artifactId> <version>7.3.1</version> </dependency> //Connect to server HttpSolrClient solrClient = new HttpSolrClie ...

Posted on Thu, 05 Dec 2019 01:03:47 -0500 by terry1989

Spark-2.4.0-hadoop 2.7-high availability (HA) installation deployment

1. Host planning Host name IP address operating system Deployment Software Operation process Remarks mini01 172.16.1.11 [intranet] 10.0.0.11 [Internet] CentOS 7.5 Jdk-8, zookeeper-3.4.5, Hadoop 2.7.6, hbase-2.0.2, Kafka ou 2.11-2.0.0, spark-2.4.0-hadoop 2.7 [main] QuorumPeerMain,   mini02 172.16.1.12 [intranet] ...

Posted on Thu, 05 Dec 2019 00:38:19 -0500 by prashanth

Performance Testing Framework version 2

According to the requirements of leaders, two kinds of pressure measurement modes are distinguished: fixed number of pressure measurement and fixed time pressure measurement. Before that, the fixed number of times has always been used, so the second version of this release has stripped the fixed number of times mode and increased the fixed time ...

Posted on Wed, 04 Dec 2019 23:02:43 -0500 by software4