wudianlong 3 년 전
부모
커밋
751962bc70

+ 10 - 0
dw-db/pom.xml

@@ -16,4 +16,14 @@
         <maven.compiler.target>8</maven.compiler.target>
     </properties>
 
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.phoenix</groupId>
+            <artifactId>phoenix-core</artifactId>
+            <version>5.0.0-HBase-2.0</version>
+        </dependency>
+
+    </dependencies>
+
 </project>

+ 32 - 0
dw-db/src/main/java/com/saga/hbase/phoenix/app/PhoenixDDL.java

@@ -0,0 +1,32 @@
+package com.saga.hbase.phoenix.app;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+
+public class PhoenixDDL {
+
+    //Phoenix库名
+    public static final String HBASE_SCHEMA = "GMALL200821_REALTIME";
+
+    //Phoenix驱动
+    public static final String PHOENIX_DRIVER = "org.apache.phoenix.jdbc.PhoenixDriver";
+
+    //Phoenix连接参数
+    public static final String PHOENIX_SERVER = "jdbc:phoenix:hadoop01,hadoop02,hadoop03:2181";
+
+    //ClickHouse驱动
+    public static final String CLICKHOUSE_DRIVER = "ru.yandex.clickhouse.ClickHouseDriver";
+
+    //ClickHouse连接地址
+    public static final String CLICKHOUSE_URL = "jdbc:clickhouse://hadoop102:8123/default";
+
+    public static void main(String[] args) throws ClassNotFoundException, SQLException {
+        Class.forName(PHOENIX_DRIVER);
+        Connection connection = DriverManager.getConnection(PHOENIX_SERVER);
+        String schema = connection.getSchema();
+
+
+
+    }
+}

+ 4 - 0
dw-db/src/main/java/com/saga/hbase/phoenix/app/PhoenixDML.java

@@ -0,0 +1,4 @@
+package com.saga.hbase.phoenix.app;
+
+public class PhoenixDML {
+}

+ 4 - 0
dw-db/src/main/java/com/saga/hbase/phoenix/utils/PhoenixUtils.java

@@ -0,0 +1,4 @@
+package com.saga.hbase.phoenix.utils;
+
+public class PhoenixUtils {
+}

+ 23 - 0
dw-flink/pom.xml

@@ -14,6 +14,29 @@
     <properties>
         <maven.compiler.source>8</maven.compiler.source>
         <maven.compiler.target>8</maven.compiler.target>
+        <flink.version>1.13.6</flink.version>
     </properties>
 
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-clients_2.12</artifactId>
+            <version>${flink.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-table-planner-blink_2.12</artifactId>
+            <version>${flink.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.ververica</groupId>
+            <artifactId>flink-connector-mysql-cdc</artifactId>
+            <version>2.0.0</version>
+        </dependency>
+
+    </dependencies>
+
 </project>

+ 28 - 0
pom.xml

@@ -18,4 +18,32 @@
         <maven.compiler.target>8</maven.compiler.target>
     </properties>
 
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-client</artifactId>
+            <version>3.1.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>8.0.21</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.75</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.16</version>
+        </dependency>
+
+    </dependencies>
+
 </project>