Commit d4d16490 by dufafei

1

parent dac9c849
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<property name="zkConnectionString" value="10.197.236.211:2181,10.197.236.212:2181,10.197.236.213:2181"/> <property name="zkConnectionString" value="10.197.236.211:2181,10.197.236.212:2181,10.197.236.213:2181"/>
<property name="sessionTimeout" value="30000"/> <property name="sessionTimeout" value="30000"/>
<property name="zkRootPath" value="/apacheIgnite"/> <property name="zkRootPath" value="/apacheIgnite"/>
<!--<property name="zkRootPath" value="/Ignite"/>-->
<property name="joinTimeout" value="0"/> <property name="joinTimeout" value="0"/>
</bean> </bean>
</property> </property>
......
...@@ -211,7 +211,7 @@ object IgniteClient { ...@@ -211,7 +211,7 @@ object IgniteClient {
def main(args: Array[String]): Unit = { def main(args: Array[String]): Unit = {
dailyAlarmNumberCache.clear() //ignite.cacheNames().asScala.foreach(x=>ignite.destroyCache(x))
ignite.close() ignite.close()
} }
......
...@@ -26,7 +26,7 @@ object Const { ...@@ -26,7 +26,7 @@ object Const {
val warnTypes: Array[String] = Config.getString("warnTypes").split(",") val warnTypes: Array[String] = Config.getString("warnTypes").split(",")
val tableMap = Map( val tableMap: Map[TableKey, String] = Map(
//链路管理 //链路管理
TableKey(Some("0x1001"),None)->Config.getString("hive.UP_CONNECT_REQ.table"),//主链路登录 TableKey(Some("0x1001"),None)->Config.getString("hive.UP_CONNECT_REQ.table"),//主链路登录
TableKey(Some("0x1003"),None)->Config.getString("hive.UP_DISCONNECT_REQ.table"),//主链路注销 TableKey(Some("0x1003"),None)->Config.getString("hive.UP_DISCONNECT_REQ.table"),//主链路注销
......
...@@ -61,15 +61,23 @@ object FullSync extends Sparking{ ...@@ -61,15 +61,23 @@ object FullSync extends Sparking{
val status = row.getString(row.fieldIndex("status")) val status = row.getString(row.fieldIndex("status"))
val vehicle_brand = row.getString(row.fieldIndex("vehicle_brand")) val vehicle_brand = row.getString(row.fieldIndex("vehicle_brand"))
val enterpriseInfo = Tools.getEnterpriseInfo(enterprise_code) val enterpriseInfo = Tools.getEnterpriseInfo(enterprise_code)
val province = enterpriseInfo.map(x => x.getProvince).getOrElse("") /*val province = enterpriseInfo.map(x => x.getProvince).getOrElse("")
val city = enterpriseInfo.map(x => x.getCity).getOrElse("") val city = enterpriseInfo.map(x => x.getCity).getOrElse("")*/
val area = enterpriseInfo.map(x => x.getArea).getOrElse("") val code = enterpriseInfo.map(x => x.getArea).getOrElse("")
if(code.length == 6) {
val province = code.substring(0,2)
val city = code.substring(2,4)
val area = code.substring(4,6)
val value = new VehicleInfo( val value = new VehicleInfo(
id,vehicle_code,plate_num,plate_color,into_time,business_scope, id,vehicle_code,plate_num,plate_color,into_time,business_scope,
business_scope_detail,indentifier,into_status,status,operating_certificate_no, business_scope_detail,indentifier,into_status,status,operating_certificate_no,
class_line,use_nature,enterprise_code,driving_permit_no,vehicle_brand, class_line,use_nature,enterprise_code,driving_permit_no,vehicle_brand,
"",province,city,area) "",province,city,area)
IgniteClient.basicVehicleInfo.withKeepBinary().put(id,value) IgniteClient.basicVehicleInfo.withKeepBinary().put(id,value)
}
} }
//报警类型配置基础表 //报警类型配置基础表
sparkSession.sqlContext.read.format("jdbc").options(Map( sparkSession.sqlContext.read.format("jdbc").options(Map(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment