Skip to content

Instantly share code, notes, and snippets.

View tharikaGitHub's full-sized avatar

Tharika Madurapperuma tharikaGitHub

View GitHub Profile
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="WSO2" version="12">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
2020-08-24 18:26:06,638|4aedddb9-1ead-4ba8-96f4-5f2ec8eb32b7|HTTPS-Listener I/O dispatcher-2|0|HTTP State Transition|http-incoming-2|GET|/t/prod.com/myapi/1.0/users|REQUEST_HEAD
2020-08-24 18:26:06,638|4aedddb9-1ead-4ba8-96f4-5f2ec8eb32b7|HTTPS-Listener I/O dispatcher-2|0|HTTP State Transition|http-incoming-2|GET|/t/prod.com/myapi/1.0/users|REQUEST_DONE
2020-08-24 18:26:06,639|4aedddb9-1ead-4ba8-96f4-5f2ec8eb32b7|PassThroughMessageProcessor-3|0|Thread switch latency
2020-08-24 18:26:06,640|4aedddb9-1ead-4ba8-96f4-5f2ec8eb32b7|PassThroughMessageProcessor-3|1|jdbc|1598273766639|executeQuery|SELECT UM_ID FROM UM_TENANT WHERE UM_DOMAIN_NAME=?|jdbc:mysql://localhost:3306/2xuserdb
2020-08-24 18:26:06,641|4aedddb9-1ead-4ba8-96f4-5f2ec8eb32b7|PassThroughMessageProcessor-3|0|jdbc|1598273766641|executeQuery|SELECT UM_ID, UM_DOMAIN_NAME, UM_EMAIL, UM_CREATED_DATE, UM_ACTIVE, UM_CREATED_DATE, UM_USER_CONFIG FROM UM_TENANT WHERE UM_ID=?|jdbc:mysql://localhost:3306/2xuserdb
2020-08-24 18:26:06,653|4aedddb9-1ead-4ba8-96f4-5
@tharikaGitHub
tharikaGitHub / reg_property_cleanup_type3.sql
Created February 11, 2020 15:39
REG_PROPERTY and REG_RESOURCE_PROPERTY Table Cleanup Scripts Type 3
CREATE TABLE TEMP_REG_RESOURCE_PROPERTY_ID(REG_PROPERTY_ID INTEGER);
-- Extract resource property (ID) created when versioning is disabled --
INSERT INTO TEMP_REG_RESOURCE_PROPERTY_ID(REG_PROPERTY_ID)
SELECT REG_PROPERTY_ID
FROM REG_RESOURCE_PROPERTY
WHERE REG_PATH_ID IN
(SELECT REG_PATH_ID
FROM REG_RESOURCE);
@tharikaGitHub
tharikaGitHub / reg_property_cleanup_type2.sql
Created February 11, 2020 15:38
REG_PROPERTY and REG_RESOURCE_PROPERTY Table Cleanup Scripts Type 2
CREATE TABLE TEMP_REG_RESOURCE_PROPERTY_ID(REG_PROPERTY_ID INTEGER);
-- Extract resource property (ID) created when versioning is disabled --
INSERT INTO TEMP_REG_RESOURCE_PROPERTY_ID(REG_PROPERTY_ID)
SELECT REG_PROPERTY_ID
FROM REG_RESOURCE_PROPERTY
WHERE REG_PATH_ID IN
(SELECT REG_PATH_ID
FROM REG_RESOURCE);
@tharikaGitHub
tharikaGitHub / reg_tag_cleanup_type3.sql
Created February 11, 2020 15:35
REG_TAG and REG_RESOURCE_TAG Table Cleanup Scripts Type 3
CREATE TABLE TEMP_REG_RESOURCE_TAG_ID(REG_TAG_ID INTEGER);
-- Extract resource tag (ID) created when versioning is disabled --
INSERT INTO TEMP_REG_RESOURCE_TAG_ID(REG_TAG_ID)
SELECT REG_TAG_ID
FROM REG_RESOURCE_TAG
WHERE REG_PATH_ID IN
(SELECT REG_PATH_ID
FROM REG_RESOURCE);
@tharikaGitHub
tharikaGitHub / reg_tag_cleanup_type2.sql
Created February 11, 2020 15:33
REG_TAG and REG_RESOURCE_TAG Table Cleanup Scripts Type 2
CREATE TABLE TEMP_REG_RESOURCE_TAG_ID(REG_TAG_ID INTEGER);
-- Extract resource tag (ID) created when versioning is disabled --
INSERT INTO TEMP_REG_RESOURCE_TAG_ID(REG_TAG_ID)
SELECT REG_TAG_ID
FROM REG_RESOURCE_TAG
WHERE REG_PATH_ID IN
(SELECT REG_PATH_ID
FROM REG_RESOURCE);
@tharikaGitHub
tharikaGitHub / reg_tag_cleanup_type1.sql
Last active February 11, 2020 15:35
REG_TAG and REG_RESOURCE_TAG Table Cleanup Scripts Type 1
CREATE TABLE TEMP_REG_RESOURCE_TAG_ID(REG_TAG_ID INTEGER);
-- Extract resource tag (ID) created when versioning is disabled --
INSERT INTO TEMP_REG_RESOURCE_TAG_ID(REG_TAG_ID)
SELECT REG_TAG_ID
FROM REG_RESOURCE_TAG
WHERE REG_PATH_ID IN
(SELECT REG_PATH_ID
FROM REG_RESOURCE);
@tharikaGitHub
tharikaGitHub / reg_property_cleanup_type1.sql
Last active February 11, 2020 15:39
REG_PROPERTY and REG_RESOURCE_PROPERTY Table Cleanup Scripts Type 1
CREATE TABLE TEMP_REG_RESOURCE_PROPERTY_ID(REG_PROPERTY_ID INTEGER);
-- Extract resource property (ID) created when versioning is disabled --
INSERT INTO TEMP_REG_RESOURCE_PROPERTY_ID(REG_PROPERTY_ID)
SELECT REG_PROPERTY_ID
FROM REG_RESOURCE_PROPERTY
WHERE REG_PATH_ID IN
(SELECT REG_PATH_ID
FROM REG_RESOURCE);
@tharikaGitHub
tharikaGitHub / reg_log_cleanup.sql
Created February 11, 2020 10:10
REG_LOG Table Cleanup Script
CREATE TABLE REG_LOG_IDS_TO_KEEP (
REG_LOG_ID INTEGER,
REG_TENANT_ID INTEGER
);
INSERT INTO REG_LOG_IDS_TO_KEEP (REG_LOG_ID, REG_TENANT_ID)
SELECT MAX(REG_LOG_ID) AS REG_LOG_ID, REG_TENANT_ID FROM REG_LOG GROUP BY REG_PATH, REG_TENANT_ID;
DELETE FROM REG_LOG WHERE REG_LOG_ID NOT IN (SELECT REG_LOG_ID FROM REG_LOG_IDS_TO_KEEP);
DROP TABLE REG_LOG_IDS_TO_KEEP;
/*
* Copyright (c) 2019 WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*