Minor refactoring
This commit is contained in:
		
							parent
							
								
									c47946948a
								
							
						
					
					
						commit
						0361d34767
					
				@ -31,6 +31,7 @@
 | 
			
		||||
    <!--    To reduce logs -->
 | 
			
		||||
    <logger name="org.apache.catalina.loader.WebappClassLoaderBase" level="ERROR" />
 | 
			
		||||
    <logger name="org.thingsboard.server.service.queue.DefaultTbClusterService" level="ERROR" />
 | 
			
		||||
    <logger name="org.thingsboard.server.service.security.auth.jwt.settings.DefaultJwtSettingsService" level="ERROR" />
 | 
			
		||||
 | 
			
		||||
    <!-- Coap client context debug for the test scope -->
 | 
			
		||||
    <!--    <logger name="org.thingsboard.server.transport.coap.client.DefaultCoapClientContext" level="TRACE" />-->
 | 
			
		||||
 | 
			
		||||
@ -36,8 +36,6 @@ public interface TbQueueConsumer<T extends TbQueueMsg> {
 | 
			
		||||
 | 
			
		||||
    void commit();
 | 
			
		||||
 | 
			
		||||
    boolean isCommitSupported();
 | 
			
		||||
 | 
			
		||||
    boolean isStopped();
 | 
			
		||||
 | 
			
		||||
    List<String> getFullTopicNames();
 | 
			
		||||
 | 
			
		||||
@ -60,19 +60,10 @@ public class HousekeeperTask implements Serializable {
 | 
			
		||||
        return new HousekeeperTask(tenantId, entityId, HousekeeperTaskType.DELETE_ATTRIBUTES);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Task for telemetry deletion, processed by TelemetryDeletionTaskProcessor.
 | 
			
		||||
     * The processor will submit separate tasks for each key for latest and ts history deletion,
 | 
			
		||||
     * processed by LatestTsDeletionTaskProcessor and TsHistoryDeletionTaskProcessor accordingly.
 | 
			
		||||
     * */
 | 
			
		||||
    public static HousekeeperTask deleteTelemetry(TenantId tenantId, EntityId entityId) {
 | 
			
		||||
        return new HousekeeperTask(tenantId, entityId, HousekeeperTaskType.DELETE_TELEMETRY);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Task for events deletion, processed by EventsDeletionTaskProcessor.
 | 
			
		||||
     * All types of events will be dropped for this entity.
 | 
			
		||||
     * */
 | 
			
		||||
    public static HousekeeperTask deleteEvents(TenantId tenantId, EntityId entityId) {
 | 
			
		||||
        return new HousekeeperTask(tenantId, entityId, HousekeeperTaskType.DELETE_EVENTS);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -201,11 +201,6 @@ public abstract class AbstractTbQueueConsumerTemplate<R, T extends TbQueueMsg> i
 | 
			
		||||
        return partitions.stream().map(TopicPartitionInfo::getFullTopicName).collect(Collectors.toList());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean isCommitSupported() {
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected boolean isLongPollingSupported() {
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -114,9 +114,4 @@ public class InMemoryTbQueueConsumer<T extends TbQueueMsg> implements TbQueueCon
 | 
			
		||||
        return partitions.stream().map(TopicPartitionInfo::getFullTopicName).collect(Collectors.toList());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean isCommitSupported() {
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -188,7 +188,7 @@
 | 
			
		||||
            "uid": "9BonzvTSz"
 | 
			
		||||
          },
 | 
			
		||||
          "exemplar": true,
 | 
			
		||||
          "expr": "sum by (taskType) (increase(housekeeper_total{instance=\"192.168.3.27:8080\",statsName=\"failedProcessing\"}[1m]))",
 | 
			
		||||
          "expr": "sum by (taskType) (increase(housekeeper_total{statsName=\"failedProcessing\"}[1m]))",
 | 
			
		||||
          "interval": "",
 | 
			
		||||
          "legendFormat": "{{taskType}}",
 | 
			
		||||
          "refId": "A"
 | 
			
		||||
@ -274,7 +274,7 @@
 | 
			
		||||
            "uid": "9BonzvTSz"
 | 
			
		||||
          },
 | 
			
		||||
          "exemplar": true,
 | 
			
		||||
          "expr": "sum by (taskType) (increase(housekeeper_total{instance=\"192.168.3.27:8080\",statsName=\"reprocessed\"}[1m]))",
 | 
			
		||||
          "expr": "sum by (taskType) (increase(housekeeper_total{statsName=\"reprocessed\"}[1m]))",
 | 
			
		||||
          "interval": "",
 | 
			
		||||
          "legendFormat": "{{taskType}}",
 | 
			
		||||
          "refId": "A"
 | 
			
		||||
@ -360,7 +360,7 @@
 | 
			
		||||
            "uid": "9BonzvTSz"
 | 
			
		||||
          },
 | 
			
		||||
          "exemplar": true,
 | 
			
		||||
          "expr": "sum by (taskType) (increase(housekeeper_total{instance=\"192.168.3.27:8080\",statsName=\"failedReprocessing\"}[1m]))",
 | 
			
		||||
          "expr": "sum by (taskType) (increase(housekeeper_total{statsName=\"failedReprocessing\"}[1m]))",
 | 
			
		||||
          "interval": "",
 | 
			
		||||
          "legendFormat": "{{taskType}}",
 | 
			
		||||
          "refId": "A"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user