Skip to content

Commit

Permalink
add flink adn update package
Browse files Browse the repository at this point in the history
  • Loading branch information
haiji.yang committed Jan 7, 2021
1 parent 71e92c9 commit d55f676
Show file tree
Hide file tree
Showing 135 changed files with 330 additions and 276 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class HuffManTree {
* @version 1.0.0
* @since 12/31/2020
* @param array 需要构建的数组
* @return com.javayh.advanced.datastructure.tree.huffman.Node 构建后的赫夫曼树
* @return Node 构建后的赫夫曼树
*/
public static Node createHuffmanTree(int[] array) {
// 第一步为了操作方便
Expand Down
12 changes: 6 additions & 6 deletions note/datastructureAlgorithm/book/datastructure/Tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public class TreeLinkedList<E> implements Tree<E> {
* <p>
* 返回当前节点的最大弟弟;若没有弟弟,则返回null
* </p>
* @return com.javayh.advanced.datastructure.tree.linked.TreeLinkedList<E>
* @return TreeLinkedList<E>
*/
@Override
public TreeLinkedList<E> getNextSibling() {
Expand Down Expand Up @@ -377,7 +377,7 @@ public interface BinTree<E> {
* 获取根节点
* </p>
* @param
* @return com.javayh.advanced.datastructure.tree.bin.BinTreePosition
* @return BinTreePosition
*/
BinTreePosition getRoot();

Expand Down Expand Up @@ -410,7 +410,7 @@ public interface BinTree<E> {
* 前序遍历
* </p>
* @param
* @return com.javayh.advanced.datastructure.Iterator<E>
* @return Iterator<E>
*/
Iterator<E> elementsPreorder();

Expand All @@ -419,7 +419,7 @@ public interface BinTree<E> {
* 中序遍历
* </p>
* @param
* @return com.javayh.advanced.datastructure.Iterator
* @return Iterator
*/
Iterator<E> elementsInorder();

Expand All @@ -428,7 +428,7 @@ public interface BinTree<E> {
* 后序遍历
* </p>
* @param
* @return com.javayh.advanced.datastructure.Iterator
* @return Iterator
*/
Iterator<E> elementsPostorder();

Expand All @@ -437,7 +437,7 @@ public interface BinTree<E> {
* 层次遍历
* </p>
* @param
* @return com.javayh.advanced.datastructure.Iterator
* @return Iterator
*/
Iterator<E> elementsLevelorder();
}
Expand Down
Empty file added note/flink/README.md
Empty file.
Binary file added note/flink/img/FlinkLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions note/mybatis/book/扩展.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,18 @@
然后开始编写`resultMap`
这里我只是三层的关系,更多的层次关系继续写就可以
```xml
<resultMap type="com.javayh.advanced.mybatis.vo.LogisticsVO" id="logisticsMap">
<resultMap type="LogisticsVO" id="logisticsMap">
<result property="addressee" column="addressee"/>
<result property="addressee_name" column="addressee_name"/>
<result property="addressee_phone" column="addressee_phone"/>
<collection property="senderVOList" resultMap = "senderVOListMap"/>
</resultMap>
<resultMap type="com.javayh.advanced.mybatis.vo.LogisticsSenderVO" id="senderVOListMap">
<resultMap type="LogisticsSenderVO" id="senderVOListMap">
<result property="sender_add" column="sender_add"/>
<result property="sender_name" column="sender_name"/>
<collection property="informationVOS" resultMap = "informationVOSMap"/>
</resultMap>
<resultMap type="com.javayh.advanced.mybatis.vo.OtherInformationVO" id="informationVOSMap">
<resultMap type="OtherInformationVO" id="informationVOSMap">
<result property="create_by" column="create_by"/>
<result property="create_date" column="create_date"/>
<result property="retreat_status" column="retreat_status"/>
Expand All @@ -126,7 +126,7 @@ void mapperMap() throws JsonProcessingException {
大多数我们都是利用 `foreach` 来做某个字段的 `in` 查询,但是有一天一个朋友问我,`foreach` 里可以写`if`吗?
我的第一反应是应该可以写,后来想了一下,肯定是可以的,当然我们也不能全部停留在自己的想法上,还是要去实现一下的;
```xml
<select id="findListAndIf" resultType="com.javayh.advanced.mybatis.vo.LogisticsVO">
<select id="findListAndIf" resultType="LogisticsVO">
SELECT
addressee,
addressee_name,
Expand Down
2 changes: 1 addition & 1 deletion note/spring/book/bean/FactoryBean.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public class FactoryBeanLearn implements FactoryBean<BaseBean>,InitializingBean
* 实例化对象
* </p>
* @param
* @return com.javayh.advanced.spring.bean.BaseBean
* @return BaseBean
*/
private BaseBean buildBaseBean() {
if (Objects.isNull(customConfigurationProperties)){
Expand Down
44 changes: 43 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
Expand All @@ -14,7 +15,8 @@
<name>advanced-book</name>
<description>advanced-book</description>
<modules>
<module>source-code</module>
<module>source-java-code</module>
<module>source-flink-code</module>
</modules>

<properties>
Expand All @@ -29,8 +31,48 @@
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
<mybatis.version>2.0.0</mybatis.version>
<flink.version>1.9.1</flink.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.restdocs</groupId>
<artifactId>spring-restdocs-mockmvc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
</dependencies>


</project>
54 changes: 54 additions & 0 deletions source-flink-code/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>java-advanced</artifactId>
<groupId>com.javayh.advanced</groupId>
<version>1.0.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>source-flink-code</artifactId>

<dependencies>
<!-- Start Flink -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.11</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients_2.11</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-kafka-0.11_2.11</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-api-java-bridge_2.11</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner_2.11</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner-blink_2.11</artifactId>
<version>${flink.version}</version>
</dependency>
<!-- End Flink -->
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.javayh.advanced.flink.wc;

import org.apache.flink.api.java.ExecutionEnvironment;

/**
* <p>
* 批处理的demo
* </p>
*
* @author Dylan
* @version 1.0.0
* @since 2021-01-07
*/
public class WordCount {
public static void main(String[] args) throws Exception {
//创建执行环境
ExecutionEnvironment env = ExecutionEnvironment.createCollectionsEnvironment();
//从文件中读取数据
String inputPath = "";


}
}
41 changes: 2 additions & 39 deletions source-code/pom.xml → source-java-code/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,10 @@
</parent>
<artifactId>source-code</artifactId>
<version>1.0.0.RELEASE</version>
<name>source-code</name>
<description>source-code</description>
<name>source-java-code</name>
<description>source-java-code</description>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.restdocs</groupId>
<artifactId>spring-restdocs-mockmvc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
Expand All @@ -60,10 +27,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!--<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-properties-migrator</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.javayh.advanced;
package com.javayh.advanced.java;

import com.javayh.advanced.spring.config.CustomConfigurationProperties;
import com.javayh.advanced.java.spring.config.CustomConfigurationProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm;
package com.javayh.advanced.java.algorithm;

import org.apache.commons.lang3.time.DateFormatUtils;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.example.sort;
package com.javayh.advanced.java.algorithm.example.sort;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.example.sort;
package com.javayh.advanced.java.algorithm.example.sort;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.example.sort;
package com.javayh.advanced.java.algorithm.example.sort;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.example;
package com.javayh.advanced.java.algorithm.example;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.example;
package com.javayh.advanced.java.algorithm.example;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.example;
package com.javayh.advanced.java.algorithm.example;

import java.util.concurrent.atomic.AtomicInteger;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.example;
package com.javayh.advanced.java.algorithm.example;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.example;
package com.javayh.advanced.java.algorithm.example;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.example;
package com.javayh.advanced.java.algorithm.example;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.kmp;
package com.javayh.advanced.java.algorithm.kmp;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.kmp;
package com.javayh.advanced.java.algorithm.kmp;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.recursion;
package com.javayh.advanced.java.algorithm.recursion;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.javayh.advanced.algorithm.search;
package com.javayh.advanced.java.algorithm.search;

/**
* <p>
Expand Down
Loading

0 comments on commit d55f676

Please sign in to comment.