电子围栏预警事件+KAfka消息接收+Hbase数据存储

master
Yang Haoyu 2023-12-05 10:30:46 +08:00
parent ec1616e6d9
commit 969bef7391
8 changed files with 6 additions and 10 deletions

View File

@ -13,7 +13,7 @@
<artifactId>fate-modules-common</artifactId>
<description>
解析系统——公共模块
数据解析——公共模块
</description>
<properties>

View File

@ -13,7 +13,7 @@
<artifactId>fate-modules-remote</artifactId>
<description>
解析系统——远程调用模块
数据解析——远程调用模块
</description>
<properties>

View File

@ -13,7 +13,7 @@
<artifactId>fate-modules-service</artifactId>
<description>
解析系统——服务模块
数据解析——服务模块
</description>
<properties>

View File

@ -17,7 +17,6 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Optional;

View File

@ -7,7 +7,6 @@ import lombok.extern.log4j.Log4j2;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.Admin;
//import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.ConnectionFactory;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.context.annotation.Bean;
@ -158,7 +157,7 @@ public class HBaseInstance {
preparedStatement.executeUpdate ();
}
}catch (SQLException e){
System.out.println(e.getMessage());
log.info(e.getMessage());
}
}

View File

@ -1,5 +1,6 @@
package com.shiyi.analysis.kafka.config;
import io.netty.handler.codec.mqtt.MqttProperties;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
import org.eclipse.paho.client.mqttv3.MqttException;
@ -18,7 +19,7 @@ public class MQTTConfig {
/**
*MQTT
*/
private static final String BROKER_URL = "tcp://182.254.222.21:1883";
private static final String BROKER_URL = "tcp://fluxmq.muyu.icu:1883";
/**

View File

@ -48,7 +48,6 @@ public class KafkaServiceimpl implements KafkaService {
@Override
public void connectionLost(Throwable throwable) {
}
/**
*
* @param s
@ -62,7 +61,6 @@ public class KafkaServiceimpl implements KafkaService {
*/
}
@Override
public void deliveryComplete(IMqttDeliveryToken iMqttDeliveryToken) {

View File

@ -16,7 +16,6 @@ import org.apache.hadoop.hbase.util.Bytes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.swing.*;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;