Tag:node

  • Week 24, 2018 – yarn of big data

    Time:2020-2-22

    Hadoop is a large operating system, HDFS is its file system, and yarn is its computing system. Yarn (another Resource Coordinator) is a new Hadoop resource manager. Before that, MapReduce 1.0 was usedDifferences between MapReduce 1.0 and MapReduce 2.0 (yarn):MapReduce 1.0 The daemons are:1.JobTracker Daemons for processing jobs (user submit code)Decide which files are involved […]

  • Sorting according to the frequency of characters – heap sorting solution

    Time:2020-2-22

    class Heap { constructor (str) { let map = new Map() str.split(”).forEach(item => { if (map.has(item)) { map.set(item, map.get(item) + 1) } else { map.set(item, 1) } }) this.map = map this.data = Array.from(map.values()) } sort () { let iArr = this.data let n = iArr.length if (n <= 1) { return iArr } else […]

  • The treelist implementation of devixpress displays the local file directory and customizes the right-click implementation to delete and rename files

    Time:2020-2-22

    scene Use treelist of devxpress to display the directory of files on this disk and right-click the tree node to delete and add files. Effect Custom right click effect   Realization First, initialize treelist in the load method of the form containing treelist Common.DataTreeListHelper.RefreshTreeData(this.treeList1, 2); Where this.treelist1 is the treelist object of the current form […]

  • Data structure and algorithm of hand tearing linked list

    Time:2020-2-22

    Preface The foundation of the bottom decides the development of the top. Let me know you’re focusing on technology. This series of articles GitHub back-end advanced guide has been included, this project is being improved, welcome star. Preview of this series: 1. What is a linked list? Linked lists are alsoLinear tableArray is a linear […]

  • Redis master slave replication and sentinel mode (2)

    Time:2020-2-21

    Redis master-slave replication In order to share the data service pressure of stand-alone redis, read-write separation is needed. Therefore, a master-slave structure of redis is built. The master node is responsible for writing and the slave node is responsible for reading. The master node synchronizes the data to the slave node on a regular basis. […]

  • Search algorithm (1) — sequential search — sequential search

    Time:2020-2-20

    1. Sequence search (1) descriptionSequential lookup is suitable for linear tables whose storage structure is sequential storage or linked storage.(2) basic ideasSequential search, also known as linear search, belongs to the unordered search algorithm. Starting from one end of the data structure linear table, scan in sequence, and compare the scanned node keywords with the […]

  • Super ugly number — solve with heap search

    Time:2020-2-20

    Easy to find with heap sorting Prime numbers are also called prime numbers. A natural number greater than 1, except for 1 and itself, is called a prime number; otherwise, it is called a composite number.Prime factor (prime factor or prime factor) in number theory refers to the prime number that can divide a given […]

  • Zkclient of zookeeper

    Time:2020-2-19

    In the use of zookeeper API, we have known the use of native API, but the registration of watcher and session timeout and reconnection of native API are tedious, so there are their own open source clients. Maven dependence <dependency> <groupId>com.101tec</groupId> <artifactId>zkclient</artifactId> <version>0.11</version> </dependency> Create session Before, for creating a session, this part of code […]

  • About linked list

    Time:2020-2-19

    Linked list As a basic data structure, array is widely used in various programs. It is very convenient to find and use. But it is very expensive to insert and delete them. For example, to insert an array of length n at position K, first move the data from position K to n-1 backward as […]

  • Learning record of mongodb Master Course (day 16)

    Time:2020-2-18

    Sixteenth days The chapter to be learned is 19 transaction development: write operation transaction. In fact, it mainly talks about a parameter writeconcert. What is writeconcert? As we learned in the first chapter before, mongodb in the production environment also needs a 3-node cluster at least. Then writeconert is used to control how many nodes […]

  • Springboot2 integrates zookeeper components and manages service coordination in the architecture

    Time:2020-2-18

    Source code: GitHub, click here, gitee, click here 1、 Introduction to zookeeper 1. Concept introduction Zookeeper is an Apache open source distributed application, which provides coordination services for the system architecture. From the perspective of design pattern: this component is a framework designed based on the observer pattern, which is responsible for storing and managing […]

  • Don’t know how to realize dynamic discovery of services? Let’s see how Dubbo did it

    Time:2020-2-18

    In the previous article, if someone asked you how the registry works in Dubbo, they would give him a general understanding of the role of the registry and the source code of the Dubbo registry module. This article will go deep into the Dubbo zookeeper module to learn how to realize the dynamic discovery of […]