电子围栏预警事件+KAfka消息接收+Hbase数据存储
parent
ec1616e6d9
commit
969bef7391
|
@ -13,7 +13,7 @@
|
|||
<artifactId>fate-modules-common</artifactId>
|
||||
|
||||
<description>
|
||||
解析系统——公共模块
|
||||
数据解析——公共模块
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<artifactId>fate-modules-remote</artifactId>
|
||||
|
||||
<description>
|
||||
解析系统——远程调用模块
|
||||
数据解析——远程调用模块
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<artifactId>fate-modules-service</artifactId>
|
||||
|
||||
<description>
|
||||
解析系统——服务模块
|
||||
数据解析——服务模块
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue