Showing
33 changed files
with
91 additions
and
37 deletions
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <artifactId>application</artifactId> | 26 | <artifactId>application</artifactId> |
@@ -15,6 +15,11 @@ | @@ -15,6 +15,11 @@ | ||
15 | # | 15 | # |
16 | 16 | ||
17 | export JAVA_OPTS="$JAVA_OPTS -Dplatform=@pkg.platform@ -Dinstall.data_dir=@pkg.installFolder@/data" | 17 | export JAVA_OPTS="$JAVA_OPTS -Dplatform=@pkg.platform@ -Dinstall.data_dir=@pkg.installFolder@/data" |
18 | +export JAVA_OPTS="$JAVA_OPTS -Xloggc:@pkg.logFolder@/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDetails -XX:+PrintGCDateStamps" | ||
19 | +export JAVA_OPTS="$JAVA_OPTS -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10" | ||
20 | +export JAVA_OPTS="$JAVA_OPTS -XX:GCLogFileSize=10M -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark" | ||
21 | +export JAVA_OPTS="$JAVA_OPTS -XX:CMSWaitDuration=10000 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+CMSParallelInitialMarkEnabled" | ||
22 | +export JAVA_OPTS="$JAVA_OPTS -XX:+CMSEdenChunksRecordAlways -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly" | ||
18 | export LOG_FILENAME=${pkg.name}.out | 23 | export LOG_FILENAME=${pkg.name}.out |
19 | export LOADER_PATH=${pkg.installFolder}/conf,${pkg.installFolder}/extensions | 24 | export LOADER_PATH=${pkg.installFolder}/conf,${pkg.installFolder}/extensions |
20 | export SQL_DATA_FOLDER=${pkg.installFolder}/data/sql | 25 | export SQL_DATA_FOLDER=${pkg.installFolder}/data/sql |
@@ -36,14 +36,17 @@ import org.springframework.web.bind.annotation.RequestParam; | @@ -36,14 +36,17 @@ import org.springframework.web.bind.annotation.RequestParam; | ||
36 | import org.springframework.web.bind.annotation.ResponseBody; | 36 | import org.springframework.web.bind.annotation.ResponseBody; |
37 | import org.springframework.web.bind.annotation.RestController; | 37 | import org.springframework.web.bind.annotation.RestController; |
38 | import org.springframework.web.context.request.async.DeferredResult; | 38 | import org.springframework.web.context.request.async.DeferredResult; |
39 | +import org.thingsboard.rule.engine.api.msg.DeviceAttributesEventNotificationMsg; | ||
39 | import org.thingsboard.server.common.data.DataConstants; | 40 | import org.thingsboard.server.common.data.DataConstants; |
40 | import org.thingsboard.server.common.data.EntityType; | 41 | import org.thingsboard.server.common.data.EntityType; |
41 | import org.thingsboard.server.common.data.audit.ActionType; | 42 | import org.thingsboard.server.common.data.audit.ActionType; |
42 | import org.thingsboard.server.common.data.exception.ThingsboardException; | 43 | import org.thingsboard.server.common.data.exception.ThingsboardException; |
44 | +import org.thingsboard.server.common.data.id.DeviceId; | ||
43 | import org.thingsboard.server.common.data.id.EntityId; | 45 | import org.thingsboard.server.common.data.id.EntityId; |
44 | import org.thingsboard.server.common.data.id.EntityIdFactory; | 46 | import org.thingsboard.server.common.data.id.EntityIdFactory; |
45 | import org.thingsboard.server.common.data.id.UUIDBased; | 47 | import org.thingsboard.server.common.data.id.UUIDBased; |
46 | import org.thingsboard.server.common.data.kv.Aggregation; | 48 | import org.thingsboard.server.common.data.kv.Aggregation; |
49 | +import org.thingsboard.server.common.data.kv.AttributeKey; | ||
47 | import org.thingsboard.server.common.data.kv.AttributeKvEntry; | 50 | import org.thingsboard.server.common.data.kv.AttributeKvEntry; |
48 | import org.thingsboard.server.common.data.kv.BaseAttributeKvEntry; | 51 | import org.thingsboard.server.common.data.kv.BaseAttributeKvEntry; |
49 | import org.thingsboard.server.common.data.kv.BaseTsKvQuery; | 52 | import org.thingsboard.server.common.data.kv.BaseTsKvQuery; |
@@ -55,6 +58,7 @@ import org.thingsboard.server.common.data.kv.LongDataEntry; | @@ -55,6 +58,7 @@ import org.thingsboard.server.common.data.kv.LongDataEntry; | ||
55 | import org.thingsboard.server.common.data.kv.StringDataEntry; | 58 | import org.thingsboard.server.common.data.kv.StringDataEntry; |
56 | import org.thingsboard.server.common.data.kv.TsKvEntry; | 59 | import org.thingsboard.server.common.data.kv.TsKvEntry; |
57 | import org.thingsboard.server.common.data.kv.TsKvQuery; | 60 | import org.thingsboard.server.common.data.kv.TsKvQuery; |
61 | +import org.thingsboard.server.common.msg.cluster.SendToClusterMsg; | ||
58 | import org.thingsboard.server.common.msg.core.TelemetryUploadRequest; | 62 | import org.thingsboard.server.common.msg.core.TelemetryUploadRequest; |
59 | import org.thingsboard.server.common.transport.adaptor.JsonConverter; | 63 | import org.thingsboard.server.common.transport.adaptor.JsonConverter; |
60 | import org.thingsboard.server.dao.attributes.AttributesService; | 64 | import org.thingsboard.server.dao.attributes.AttributesService; |
@@ -72,9 +76,12 @@ import javax.annotation.PostConstruct; | @@ -72,9 +76,12 @@ import javax.annotation.PostConstruct; | ||
72 | import javax.annotation.PreDestroy; | 76 | import javax.annotation.PreDestroy; |
73 | import java.util.ArrayList; | 77 | import java.util.ArrayList; |
74 | import java.util.Arrays; | 78 | import java.util.Arrays; |
79 | +import java.util.HashSet; | ||
75 | import java.util.LinkedHashMap; | 80 | import java.util.LinkedHashMap; |
76 | import java.util.List; | 81 | import java.util.List; |
77 | import java.util.Map; | 82 | import java.util.Map; |
83 | +import java.util.Set; | ||
84 | +import java.util.UUID; | ||
78 | import java.util.concurrent.ExecutorService; | 85 | import java.util.concurrent.ExecutorService; |
79 | import java.util.concurrent.Executors; | 86 | import java.util.concurrent.Executors; |
80 | import java.util.stream.Collectors; | 87 | import java.util.stream.Collectors; |
@@ -276,6 +283,7 @@ public class TelemetryController extends BaseController { | @@ -276,6 +283,7 @@ public class TelemetryController extends BaseController { | ||
276 | return getImmediateDeferredResult("Empty keys: " + keysStr, HttpStatus.BAD_REQUEST); | 283 | return getImmediateDeferredResult("Empty keys: " + keysStr, HttpStatus.BAD_REQUEST); |
277 | } | 284 | } |
278 | SecurityUser user = getCurrentUser(); | 285 | SecurityUser user = getCurrentUser(); |
286 | + | ||
279 | if (DataConstants.SERVER_SCOPE.equals(scope) || | 287 | if (DataConstants.SERVER_SCOPE.equals(scope) || |
280 | DataConstants.SHARED_SCOPE.equals(scope) || | 288 | DataConstants.SHARED_SCOPE.equals(scope) || |
281 | DataConstants.CLIENT_SCOPE.equals(scope)) { | 289 | DataConstants.CLIENT_SCOPE.equals(scope)) { |
@@ -285,6 +293,14 @@ public class TelemetryController extends BaseController { | @@ -285,6 +293,14 @@ public class TelemetryController extends BaseController { | ||
285 | @Override | 293 | @Override |
286 | public void onSuccess(@Nullable List<Void> tmp) { | 294 | public void onSuccess(@Nullable List<Void> tmp) { |
287 | logAttributesDeleted(user, entityId, scope, keys, null); | 295 | logAttributesDeleted(user, entityId, scope, keys, null); |
296 | + if (entityId.getEntityType() == EntityType.DEVICE) { | ||
297 | + DeviceId deviceId = new DeviceId(entityId.getId()); | ||
298 | + Set<AttributeKey> keysToNotify = new HashSet<>(); | ||
299 | + keys.forEach(key -> keysToNotify.add(new AttributeKey(scope, key))); | ||
300 | + DeviceAttributesEventNotificationMsg notificationMsg = DeviceAttributesEventNotificationMsg.onDelete( | ||
301 | + user.getTenantId(), deviceId, keysToNotify); | ||
302 | + actorService.onMsg(new SendToClusterMsg(deviceId, notificationMsg)); | ||
303 | + } | ||
288 | result.setResult(new ResponseEntity<>(HttpStatus.OK)); | 304 | result.setResult(new ResponseEntity<>(HttpStatus.OK)); |
289 | } | 305 | } |
290 | 306 | ||
@@ -315,6 +331,12 @@ public class TelemetryController extends BaseController { | @@ -315,6 +331,12 @@ public class TelemetryController extends BaseController { | ||
315 | @Override | 331 | @Override |
316 | public void onSuccess(@Nullable Void tmp) { | 332 | public void onSuccess(@Nullable Void tmp) { |
317 | logAttributesUpdated(user, entityId, scope, attributes, null); | 333 | logAttributesUpdated(user, entityId, scope, attributes, null); |
334 | + if (entityId.getEntityType() == EntityType.DEVICE) { | ||
335 | + DeviceId deviceId = new DeviceId(entityId.getId()); | ||
336 | + DeviceAttributesEventNotificationMsg notificationMsg = DeviceAttributesEventNotificationMsg.onUpdate( | ||
337 | + user.getTenantId(), deviceId, scope, attributes); | ||
338 | + actorService.onMsg(new SendToClusterMsg(deviceId, notificationMsg)); | ||
339 | + } | ||
318 | result.setResult(new ResponseEntity(HttpStatus.OK)); | 340 | result.setResult(new ResponseEntity(HttpStatus.OK)); |
319 | } | 341 | } |
320 | 342 | ||
@@ -494,7 +516,7 @@ public class TelemetryController extends BaseController { | @@ -494,7 +516,7 @@ public class TelemetryController extends BaseController { | ||
494 | 516 | ||
495 | private void logAttributesDeleted(SecurityUser user, EntityId entityId, String scope, List<String> keys, Throwable e) { | 517 | private void logAttributesDeleted(SecurityUser user, EntityId entityId, String scope, List<String> keys, Throwable e) { |
496 | try { | 518 | try { |
497 | - logEntityAction(user, (UUIDBased & EntityId)entityId, null, null, ActionType.ATTRIBUTES_DELETED, toException(e), | 519 | + logEntityAction(user, (UUIDBased & EntityId) entityId, null, null, ActionType.ATTRIBUTES_DELETED, toException(e), |
498 | scope, keys); | 520 | scope, keys); |
499 | } catch (ThingsboardException te) { | 521 | } catch (ThingsboardException te) { |
500 | log.warn("Failed to log attributes delete", te); | 522 | log.warn("Failed to log attributes delete", te); |
@@ -503,7 +525,7 @@ public class TelemetryController extends BaseController { | @@ -503,7 +525,7 @@ public class TelemetryController extends BaseController { | ||
503 | 525 | ||
504 | private void logAttributesUpdated(SecurityUser user, EntityId entityId, String scope, List<AttributeKvEntry> attributes, Throwable e) { | 526 | private void logAttributesUpdated(SecurityUser user, EntityId entityId, String scope, List<AttributeKvEntry> attributes, Throwable e) { |
505 | try { | 527 | try { |
506 | - logEntityAction(user, (UUIDBased & EntityId)entityId, null, null, ActionType.ATTRIBUTES_UPDATED, toException(e), | 528 | + logEntityAction(user, (UUIDBased & EntityId) entityId, null, null, ActionType.ATTRIBUTES_UPDATED, toException(e), |
507 | scope, attributes); | 529 | scope, attributes); |
508 | } catch (ThingsboardException te) { | 530 | } catch (ThingsboardException te) { |
509 | log.warn("Failed to log attributes update", te); | 531 | log.warn("Failed to log attributes update", te); |
@@ -513,7 +535,7 @@ public class TelemetryController extends BaseController { | @@ -513,7 +535,7 @@ public class TelemetryController extends BaseController { | ||
513 | 535 | ||
514 | private void logAttributesRead(SecurityUser user, EntityId entityId, String scope, List<String> keys, Throwable e) { | 536 | private void logAttributesRead(SecurityUser user, EntityId entityId, String scope, List<String> keys, Throwable e) { |
515 | try { | 537 | try { |
516 | - logEntityAction(user, (UUIDBased & EntityId)entityId, null, null, ActionType.ATTRIBUTES_READ, toException(e), | 538 | + logEntityAction(user, (UUIDBased & EntityId) entityId, null, null, ActionType.ATTRIBUTES_READ, toException(e), |
517 | scope, keys); | 539 | scope, keys); |
518 | } catch (ThingsboardException te) { | 540 | } catch (ThingsboardException te) { |
519 | log.warn("Failed to log attributes read", te); | 541 | log.warn("Failed to log attributes read", te); |
@@ -60,7 +60,6 @@ import javax.annotation.PostConstruct; | @@ -60,7 +60,6 @@ import javax.annotation.PostConstruct; | ||
60 | import javax.annotation.PreDestroy; | 60 | import javax.annotation.PreDestroy; |
61 | import java.util.ArrayList; | 61 | import java.util.ArrayList; |
62 | import java.util.Collections; | 62 | import java.util.Collections; |
63 | -import java.util.HashMap; | ||
64 | import java.util.HashSet; | 63 | import java.util.HashSet; |
65 | import java.util.Iterator; | 64 | import java.util.Iterator; |
66 | import java.util.List; | 65 | import java.util.List; |
@@ -68,6 +67,7 @@ import java.util.Map; | @@ -68,6 +67,7 @@ import java.util.Map; | ||
68 | import java.util.Optional; | 67 | import java.util.Optional; |
69 | import java.util.Set; | 68 | import java.util.Set; |
70 | import java.util.TreeMap; | 69 | import java.util.TreeMap; |
70 | +import java.util.concurrent.ConcurrentHashMap; | ||
71 | import java.util.concurrent.ExecutorService; | 71 | import java.util.concurrent.ExecutorService; |
72 | import java.util.concurrent.Executors; | 72 | import java.util.concurrent.Executors; |
73 | import java.util.function.Consumer; | 73 | import java.util.function.Consumer; |
@@ -120,8 +120,8 @@ public class DefaultTelemetrySubscriptionService implements TelemetrySubscriptio | @@ -120,8 +120,8 @@ public class DefaultTelemetrySubscriptionService implements TelemetrySubscriptio | ||
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||
123 | - private final Map<EntityId, Set<Subscription>> subscriptionsByEntityId = new HashMap<>(); | ||
124 | - private final Map<String, Map<Integer, Subscription>> subscriptionsByWsSessionId = new HashMap<>(); | 123 | + private final Map<EntityId, Set<Subscription>> subscriptionsByEntityId = new ConcurrentHashMap<>(); |
124 | + private final Map<String, Map<Integer, Subscription>> subscriptionsByWsSessionId = new ConcurrentHashMap<>(); | ||
125 | 125 | ||
126 | @Override | 126 | @Override |
127 | public void addLocalWsSubscription(String sessionId, EntityId entityId, SubscriptionState sub) { | 127 | public void addLocalWsSubscription(String sessionId, EntityId entityId, SubscriptionState sub) { |
@@ -453,9 +453,9 @@ public class DefaultTelemetrySubscriptionService implements TelemetrySubscriptio | @@ -453,9 +453,9 @@ public class DefaultTelemetrySubscriptionService implements TelemetrySubscriptio | ||
453 | } | 453 | } |
454 | 454 | ||
455 | private void registerSubscription(String sessionId, EntityId entityId, Subscription subscription) { | 455 | private void registerSubscription(String sessionId, EntityId entityId, Subscription subscription) { |
456 | - Set<Subscription> deviceSubscriptions = subscriptionsByEntityId.computeIfAbsent(entityId, k -> new HashSet<>()); | 456 | + Set<Subscription> deviceSubscriptions = subscriptionsByEntityId.computeIfAbsent(entityId, k -> ConcurrentHashMap.newKeySet()); |
457 | deviceSubscriptions.add(subscription); | 457 | deviceSubscriptions.add(subscription); |
458 | - Map<Integer, Subscription> sessionSubscriptions = subscriptionsByWsSessionId.computeIfAbsent(sessionId, k -> new HashMap<>()); | 458 | + Map<Integer, Subscription> sessionSubscriptions = subscriptionsByWsSessionId.computeIfAbsent(sessionId, k -> new ConcurrentHashMap<>()); |
459 | sessionSubscriptions.put(subscription.getSubscriptionId(), subscription); | 459 | sessionSubscriptions.put(subscription.getSubscriptionId(), subscription); |
460 | } | 460 | } |
461 | 461 |
@@ -12,4 +12,30 @@ | @@ -12,4 +12,30 @@ | ||
12 | <startargument>-Dinstall.data_dir=%BASE%\data</startargument> | 12 | <startargument>-Dinstall.data_dir=%BASE%\data</startargument> |
13 | <startargument>-jar</startargument> | 13 | <startargument>-jar</startargument> |
14 | <startargument>%BASE%\lib\${pkg.name}.jar</startargument> | 14 | <startargument>%BASE%\lib\${pkg.name}.jar</startargument> |
15 | + <startargument>-Xloggc:%BASE%\logs\gc.log</startargument> | ||
16 | + <startargument>-XX:+HeapDumpOnOutOfMemoryError</startargument> | ||
17 | + <startargument>-XX:+PrintGCDetails</startargument> | ||
18 | + <startargument>-XX:+PrintGCDateStamps</startargument> | ||
19 | + <startargument>-XX:+PrintHeapAtGC</startargument> | ||
20 | + <startargument>-XX:+PrintTenuringDistribution</startargument> | ||
21 | + <startargument>-XX:+PrintGCApplicationStoppedTime</startargument> | ||
22 | + <startargument>-XX:+UseGCLogFileRotation</startargument> | ||
23 | + <startargument>-XX:NumberOfGCLogFiles=10</startargument> | ||
24 | + <startargument>-XX:GCLogFileSize=10M</startargument> | ||
25 | + <startargument>-XX:-UseBiasedLocking</startargument> | ||
26 | + <startargument>-XX:+UseTLAB</startargument> | ||
27 | + <startargument>-XX:+ResizeTLAB</startargument> | ||
28 | + <startargument>-XX:+PerfDisableSharedMem</startargument> | ||
29 | + <startargument>-XX:+UseCondCardMark</startargument> | ||
30 | + <startargument>-XX:CMSWaitDuration=10000</startargument> | ||
31 | + <startargument>-XX:+UseParNewGC</startargument> | ||
32 | + <startargument>-XX:+UseConcMarkSweepGC</startargument> | ||
33 | + <startargument>-XX:+CMSParallelRemarkEnabled</startargument> | ||
34 | + <startargument>-XX:+CMSParallelInitialMarkEnabled</startargument> | ||
35 | + <startargument>-XX:+CMSEdenChunksRecordAlways</startargument> | ||
36 | + <startargument>-XX:CMSInitiatingOccupancyFraction=75</startargument> | ||
37 | + <startargument>-XX:+UseCMSInitiatingOccupancyOnly</startargument> | ||
38 | + <startargument>-Xms512m</startargument> | ||
39 | + <startargument>-Xmx1024m</startargument> | ||
40 | + | ||
15 | </service> | 41 | </service> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>common</artifactId> | 24 | <artifactId>common</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.common</groupId> | 26 | <groupId>org.thingsboard.common</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>common</artifactId> | 24 | <artifactId>common</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.common</groupId> | 26 | <groupId>org.thingsboard.common</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>common</artifactId> | 24 | <artifactId>common</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.common</groupId> | 26 | <groupId>org.thingsboard.common</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <artifactId>dao</artifactId> | 26 | <artifactId>dao</artifactId> |
@@ -22,7 +22,7 @@ spec: | @@ -22,7 +22,7 @@ spec: | ||
22 | containers: | 22 | containers: |
23 | - name: cassandra-setup | 23 | - name: cassandra-setup |
24 | imagePullPolicy: Always | 24 | imagePullPolicy: Always |
25 | - image: thingsboard/cassandra-setup:2.0.2 | 25 | + image: thingsboard/cassandra-setup:2.0.3 |
26 | env: | 26 | env: |
27 | - name: ADD_DEMO_DATA | 27 | - name: ADD_DEMO_DATA |
28 | value: "true" | 28 | value: "true" |
@@ -54,7 +54,7 @@ spec: | @@ -54,7 +54,7 @@ spec: | ||
54 | topologyKey: "kubernetes.io/hostname" | 54 | topologyKey: "kubernetes.io/hostname" |
55 | containers: | 55 | containers: |
56 | - name: cassandra | 56 | - name: cassandra |
57 | - image: thingsboard/cassandra:2.0.2 | 57 | + image: thingsboard/cassandra:2.0.3 |
58 | imagePullPolicy: Always | 58 | imagePullPolicy: Always |
59 | ports: | 59 | ports: |
60 | - containerPort: 7000 | 60 | - containerPort: 7000 |
@@ -84,7 +84,7 @@ spec: | @@ -84,7 +84,7 @@ spec: | ||
84 | containers: | 84 | containers: |
85 | - name: tb | 85 | - name: tb |
86 | imagePullPolicy: Always | 86 | imagePullPolicy: Always |
87 | - image: thingsboard/application:2.0.2 | 87 | + image: thingsboard/application:2.0.3 |
88 | ports: | 88 | ports: |
89 | - containerPort: 8080 | 89 | - containerPort: 8080 |
90 | name: ui | 90 | name: ui |
@@ -87,7 +87,7 @@ spec: | @@ -87,7 +87,7 @@ spec: | ||
87 | containers: | 87 | containers: |
88 | - name: zk | 88 | - name: zk |
89 | imagePullPolicy: Always | 89 | imagePullPolicy: Always |
90 | - image: thingsboard/zk:2.0.2 | 90 | + image: thingsboard/zk:2.0.3 |
91 | ports: | 91 | ports: |
92 | - containerPort: 2181 | 92 | - containerPort: 2181 |
93 | name: client | 93 | name: client |
@@ -19,12 +19,12 @@ | @@ -19,12 +19,12 @@ | ||
19 | <modelVersion>4.0.0</modelVersion> | 19 | <modelVersion>4.0.0</modelVersion> |
20 | <parent> | 20 | <parent> |
21 | <groupId>org.thingsboard</groupId> | 21 | <groupId>org.thingsboard</groupId> |
22 | - <version>2.0.2</version> | 22 | + <version>2.0.3</version> |
23 | <artifactId>thingsboard</artifactId> | 23 | <artifactId>thingsboard</artifactId> |
24 | </parent> | 24 | </parent> |
25 | <groupId>org.thingsboard</groupId> | 25 | <groupId>org.thingsboard</groupId> |
26 | <artifactId>netty-mqtt</artifactId> | 26 | <artifactId>netty-mqtt</artifactId> |
27 | - <version>2.0.2</version> | 27 | + <version>2.0.3</version> |
28 | <packaging>jar</packaging> | 28 | <packaging>jar</packaging> |
29 | 29 | ||
30 | <name>Netty MQTT Client</name> | 30 | <name>Netty MQTT Client</name> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <groupId>org.thingsboard</groupId> | 21 | <groupId>org.thingsboard</groupId> |
22 | <artifactId>thingsboard</artifactId> | 22 | <artifactId>thingsboard</artifactId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <packaging>pom</packaging> | 24 | <packaging>pom</packaging> |
25 | 25 | ||
26 | <name>Thingsboard</name> | 26 | <name>Thingsboard</name> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <artifactId>rule-engine</artifactId> | 26 | <artifactId>rule-engine</artifactId> |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | <modelVersion>4.0.0</modelVersion> | 22 | <modelVersion>4.0.0</modelVersion> |
23 | <parent> | 23 | <parent> |
24 | <groupId>org.thingsboard</groupId> | 24 | <groupId>org.thingsboard</groupId> |
25 | - <version>2.0.2</version> | 25 | + <version>2.0.3</version> |
26 | <artifactId>rule-engine</artifactId> | 26 | <artifactId>rule-engine</artifactId> |
27 | </parent> | 27 | </parent> |
28 | <groupId>org.thingsboard.rule-engine</groupId> | 28 | <groupId>org.thingsboard.rule-engine</groupId> |
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | <modelVersion>4.0.0</modelVersion> | 22 | <modelVersion>4.0.0</modelVersion> |
23 | <parent> | 23 | <parent> |
24 | <groupId>org.thingsboard</groupId> | 24 | <groupId>org.thingsboard</groupId> |
25 | - <version>2.0.2</version> | 25 | + <version>2.0.3</version> |
26 | <artifactId>rule-engine</artifactId> | 26 | <artifactId>rule-engine</artifactId> |
27 | </parent> | 27 | </parent> |
28 | <groupId>org.thingsboard.rule-engine</groupId> | 28 | <groupId>org.thingsboard.rule-engine</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>transport</artifactId> | 24 | <artifactId>transport</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.transport</groupId> | 26 | <groupId>org.thingsboard.transport</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>transport</artifactId> | 24 | <artifactId>transport</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.transport</groupId> | 26 | <groupId>org.thingsboard.transport</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>transport</artifactId> | 24 | <artifactId>transport</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard.transport</groupId> | 26 | <groupId>org.thingsboard.transport</groupId> |
@@ -86,7 +86,7 @@ public class GatewayDeviceSessionCtx extends DeviceAwareSessionContext { | @@ -86,7 +86,7 @@ public class GatewayDeviceSessionCtx extends DeviceAwareSessionContext { | ||
86 | if (responseMsg.isSuccess()) { | 86 | if (responseMsg.isSuccess()) { |
87 | SessionMsgType requestMsgType = responseMsg.getRequestMsgType(); | 87 | SessionMsgType requestMsgType = responseMsg.getRequestMsgType(); |
88 | Integer requestId = responseMsg.getRequestId(); | 88 | Integer requestId = responseMsg.getRequestId(); |
89 | - if (requestId >= 0 && requestMsgType == SessionMsgType.POST_ATTRIBUTES_REQUEST || requestMsgType == SessionMsgType.POST_TELEMETRY_REQUEST) { | 89 | + if (requestId >= 0 && (requestMsgType == SessionMsgType.POST_ATTRIBUTES_REQUEST || requestMsgType == SessionMsgType.POST_TELEMETRY_REQUEST)) { |
90 | return Optional.of(MqttTransportHandler.createMqttPubAckMsg(requestId)); | 90 | return Optional.of(MqttTransportHandler.createMqttPubAckMsg(requestId)); |
91 | } | 91 | } |
92 | } | 92 | } |
@@ -90,6 +90,7 @@ public class GatewaySessionCtx { | @@ -90,6 +90,7 @@ public class GatewaySessionCtx { | ||
90 | device.setTenantId(gateway.getTenantId()); | 90 | device.setTenantId(gateway.getTenantId()); |
91 | device.setName(deviceName); | 91 | device.setName(deviceName); |
92 | device.setType(deviceType); | 92 | device.setType(deviceType); |
93 | + device.setCustomerId(gateway.getCustomerId()); | ||
93 | device = deviceService.saveDevice(device); | 94 | device = deviceService.saveDevice(device); |
94 | relationService.saveRelationAsync(new EntityRelation(gateway.getId(), device.getId(), "Created")); | 95 | relationService.saveRelationAsync(new EntityRelation(gateway.getId(), device.getId(), "Created")); |
95 | processor.onDeviceAdded(device); | 96 | processor.onDeviceAdded(device); |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <modelVersion>4.0.0</modelVersion> | 20 | <modelVersion>4.0.0</modelVersion> |
21 | <parent> | 21 | <parent> |
22 | <groupId>org.thingsboard</groupId> | 22 | <groupId>org.thingsboard</groupId> |
23 | - <version>2.0.2</version> | 23 | + <version>2.0.3</version> |
24 | <artifactId>thingsboard</artifactId> | 24 | <artifactId>thingsboard</artifactId> |
25 | </parent> | 25 | </parent> |
26 | <groupId>org.thingsboard</groupId> | 26 | <groupId>org.thingsboard</groupId> |