Write a simple MR program and run it in the cluster!! (wordcount)

Preface Implement a handwritten WC program and package it to run on the cluster. Create a Maven project and import pom Engineering catalogue Import pom <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/X ...

Posted by RCS on Thu, 05 Mar 2020 04:17:04 -0800

Understanding Java - AQS

java.util.concurrent provides many synchronizers, such as the commonly used ReentranLock, ReentrantReadWriteLock, Semaphore and CountDownLatch. They all rely on the processing provided by the AbstractQueuedSynchronizer class. ReentranLock ReentranLock is a reentrant Lock, similar to synchronized. The b ...

Posted by dcampbell18 on Wed, 04 Mar 2020 23:34:58 -0800

The difference between StringBuffer and StringBuilder in string splicing

jdk version 1.8 StringBuffer and StringBuilder inherit from the same parent class AbstractStringBuilder. The source code of append is respectivelyStringBuffer @Override public synchronized StringBuffer append(String str) { toStringCache = null; super.append(str); return t ...

Posted by pourmeanother on Tue, 03 Mar 2020 22:35:45 -0800

Simple Factory-Factory Method for Design Mode Theme-Abstract Factory-Static Agent-Dynamic Agent

1. Factory Mode 1.1 What is factory mode Separation of creator and caller is implemented, factory mode is divided into simple factory, factory method, abstract factory mode 1.2 Factory Mode Benefits Factory mode is one of our most common instantiated object modes, replacing the new operation with ...

Posted by patrickm on Tue, 03 Mar 2020 18:48:06 -0800

What is proxy mode?Summary of proxy mode module

Hello, this is a blog to keep learning for your dreams.This is the first article to share my understanding of Agent Mode. The style of the article will always be told in a question and answer way, which is one of my personal favorites and is equivalent to a simulated interview.( What is an agent? Let's imagine a scenario where a French winer ...

Posted by jasonok6 on Sun, 01 Mar 2020 18:44:42 -0800

Thread interrupt and LockSupport

This article will introduce the following points, readers and friends can also first think about the relevant issues: What does the thread interrupt method mean, is it a thread interrupt?Can the current thread continue execution? There are several ways to tell if a thread is interrupted, and what is the difference between them? What is the dif ...

Posted by gigantorTRON on Sun, 01 Mar 2020 08:27:23 -0800

3 - [JVM - Dynamic bytecode technology]

1 byte code technology application scenario AOP Technology Lombok de duplication plug-in Dynamically modify class files, etc 2-byte technology advantage Java bytecode enhancement refers to modifying and enhancing the function of Java bytecode after it is generated, which is equivalent to modifyi ...

Posted by seanpaulcail on Sun, 01 Mar 2020 04:31:51 -0800

Detailed explanation of observer mode of internal mental skill of architect, publish first and then subscribe

Application scenarios of observer mode The dynamic notification of wechat friend circle in life, the email notification in work, the broadcast notification on the school playground, the event response of the computer desktop application and so on are all real life scenes of the observer mode. Observer Pattern defines a one to many dependency be ...

Posted by scs on Sun, 01 Mar 2020 02:44:37 -0800

Talk about class loading process, class loading mechanism and custom class loader in detail

I. Introduction When a program uses a class, if the class has not been loaded into memory, the JVM will load the class through three steps: loading, linking, and initializing. 2, Class loading, linking, initialization 1, loading Class loading refers to reading class files into memory and creating ...

Posted by rachwilbraham on Fri, 28 Feb 2020 04:47:26 -0800

CopyOnWriteArrayList source code analysis and design thinking

Introduce In the comments of ArrayList, JDK tells us that when ArrayList (JDK 1.2) is used as a thread shared variable, it is unsafe for threads. We are recommended to lock or use connection. Synchronized List (), while Vector (JDK 1.0) is not recommended, because the premise of Vector to ensure threa ...

Posted by john-iom on Fri, 28 Feb 2020 00:15:00 -0800