flume monitors spoolDir logs to HDFS for the entire process of small Demo

1. compiling Java Code, randomly generated user ID number, district and county number, Township number (district and township number in random three letters) and personal total income format sample: 7762a1-bf04-468a-91b6-a19d772f41fa\\\\\\\\\\\\ 2. Use a thread loop to execute, Thread.sleep(100) to control the thread execution to stop 100 ms a ...

Posted by furma on Fri, 22 Mar 2019 15:42:52 -0700

Paging by Mybatis Interceptor

This paper introduces the use of Mybatis interceptor to realize paging, and in the dao layer, directly return the customized paging object. The final dao layer results: public interface ModelMapper { Page<Model> pageByConditions(RowBounds rowBounds, Model record); } The next step is paging. 1. Create Page objects: public class ...

Posted by Alelinux on Fri, 22 Mar 2019 15:15:53 -0700

Chinese scrambling in Tomcat 8.0.0 response to get request

Problem Description: When the page code UTF-8 has been specified in the application filter, the Chinese in the request sent by GET mode is still recognized as scrambling code, while the Chinese in the request sent by POST mode is normal. Reason: Tomcat has a problem in parsing parameters passed by two different request modes, which should be ...

Posted by cbullock on Fri, 22 Mar 2019 09:57:53 -0700

An Encapsulated Asynchronous Network Request Framework for Android

1. introductionIn Android, network requests usually use Apache HTTP Client or HttpURLConnection, but directly using these two libraries requires a lot of code to complete network post s and get requests. Using this MyHttpUtils library can greatly simplify the operation. It is based on HttpURLConnection, and all requests are independent of the U ...

Posted by jomofee on Fri, 22 Mar 2019 04:36:53 -0700

[Mrpc] Demo2 Server Sensing and Load Balancing Based on Zookeeper

Because servers are often maintained, it is not good to write the address of the service implementation server directly in the client (including the configuration file). A better way is to register your address in the ZooKeeper cluster when the server starts up, and then the client can get a list of all servers when it starts up, and choose a ...

Posted by Zeceer on Thu, 21 Mar 2019 15:57:51 -0700

Making PATHINFO Mode Function Similar to ThinkPHP Framework (2)

From the last release< Making PATHINFO Mode Function Similar to ThinkPHP Framework (Article address: http://www.cnblogs.com/phpstudy2015-6/p/6242700.html ) It's been many days, so let's finish the rest tonight. The previous article has implemented the PATHINFO mode URL, that is, when we visit the site built by MVC mode, we only need to add ( ...

Posted by scarhand on Thu, 21 Mar 2019 01:36:52 -0700

Construction of Kakfa Distributed Cluster

Based on the latest version of kafka_2.11-0.10.1.0, this paper describes the construction process of distributed Kafka cluster environment. Server List: 172.31.10.1 172.31.10.2 172.31.10.3 1. Download the kafka installation package Log on to Kafka http://kafka.apache.org/. Click the "Download" button on the left Select the corres ...

Posted by jkkenzie on Wed, 20 Mar 2019 23:15:34 -0700

Custom Start Dependencies in Spring Boot

1. Add automatic configuration dependencies to pom files: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-autoconfigure</artifactId> </dependency> 2. If a jar exists to configure it, the dependency needs to be added. Add httpclient here: <dependency> & ...

Posted by kwilder on Wed, 20 Mar 2019 08:30:40 -0700

HDFS delegate token could not be found in Hive execution group by cache

When I run the hit query, an error occurs. When I execute the query group by statement, it throws an error: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 8, vertexId=vertex_1530387194612_0030_4_00, diagnostics=[Vertex ...

Posted by centerwork on Tue, 12 Mar 2019 04:57:25 -0700

An invalid domain [.xxx.com] was specified for this cookie exception resolution

In the project, we need to write cookies to the browser, using Tomcat 8.5. When we write cookies, we set up a domain name such as. xxx.com, but when we write cookies, we throw an exception: An invalid domain [.xxx.com] was specified for this cookie Check that this domain name setting is a legacy format of cookie version 0 Using org. apache. ...

Posted by TomT on Sun, 10 Mar 2019 23:57:25 -0700