From 77410a0b3717af6dccf5d930f22fc86d4e1c08e6 Mon Sep 17 00:00:00 2001 From: Zhenzhao Wang Date: Fri, 25 Oct 2024 19:39:35 -0700 Subject: [PATCH] Support mysql8 and bump version to 0.22.1-tw-0.8. 1. Upgrade mysql connector to 8.2.0 2. Add thrift generated files under twitter-extensions to avoid hard dependency to thrift 0.10.0 in run time. 3. Fix python script to be comptaible with python3* 4. Bump version to 0.22.1-tw-0.8. --- benchmarks/pom.xml | 2 +- cloud/aws-common/pom.xml | 2 +- cloud/gcp-common/pom.xml | 2 +- codestyle/checkstyle-suppressions.xml | 3 + core/pom.xml | 6 +- .../druid/utils/ConnectionUriUtils.java | 71 +- .../druid/utils/ConnectionUriUtilsTest.java | 11 +- distribution/bin/generate-binary-license.py | 2 +- distribution/bin/generate-binary-notice.py | 2 +- distribution/docker/Dockerfile.mysql | 8 +- distribution/pom.xml | 2 +- docs/development/extensions-core/mysql.md | 2 +- docs/operations/use_sbt_to_build_fat_jar.md | 2 +- extendedset/pom.xml | 2 +- .../aliyun-oss-extensions/pom.xml | 2 +- .../ambari-metrics-emitter/pom.xml | 2 +- extensions-contrib/cassandra-storage/pom.xml | 2 +- .../cloudfiles-extensions/pom.xml | 2 +- extensions-contrib/distinctcount/pom.xml | 2 +- extensions-contrib/dropwizard-emitter/pom.xml | 2 +- extensions-contrib/gce-extensions/pom.xml | 2 +- extensions-contrib/graphite-emitter/pom.xml | 2 +- extensions-contrib/influx-extensions/pom.xml | 2 +- extensions-contrib/influxdb-emitter/pom.xml | 2 +- extensions-contrib/kafka-emitter/pom.xml | 2 +- .../materialized-view-maintenance/pom.xml | 2 +- .../materialized-view-selection/pom.xml | 2 +- extensions-contrib/momentsketch/pom.xml | 2 +- .../moving-average-query/pom.xml | 2 +- extensions-contrib/opentsdb-emitter/pom.xml | 2 +- extensions-contrib/prometheus-emitter/pom.xml | 2 +- extensions-contrib/redis-cache/pom.xml | 2 +- .../sqlserver-metadata-storage/pom.xml | 2 +- extensions-contrib/statsd-emitter/pom.xml | 2 +- extensions-contrib/tdigestsketch/pom.xml | 2 +- extensions-contrib/thrift-extensions/pom.xml | 2 +- extensions-contrib/time-min-max/pom.xml | 2 +- extensions-contrib/virtual-columns/pom.xml | 2 +- extensions-core/avro-extensions/pom.xml | 2 +- extensions-core/azure-extensions/pom.xml | 2 +- extensions-core/datasketches/pom.xml | 2 +- .../druid-aws-rds-extensions/pom.xml | 2 +- extensions-core/druid-basic-security/pom.xml | 2 +- extensions-core/druid-bloom-filter/pom.xml | 2 +- extensions-core/druid-kerberos/pom.xml | 2 +- extensions-core/druid-pac4j/pom.xml | 2 +- extensions-core/druid-ranger-security/pom.xml | 2 +- extensions-core/ec2-extensions/pom.xml | 2 +- extensions-core/google-extensions/pom.xml | 2 +- extensions-core/hdfs-storage/pom.xml | 2 +- extensions-core/histogram/pom.xml | 2 +- .../kafka-extraction-namespace/pom.xml | 2 +- .../kafka-indexing-service/pom.xml | 2 +- .../kinesis-indexing-service/pom.xml | 2 +- extensions-core/kubernetes-extensions/pom.xml | 2 +- extensions-core/lookups-cached-global/pom.xml | 6 +- .../JdbcExtractionNamespaceUrlCheckTest.java | 37 - extensions-core/lookups-cached-single/pom.xml | 6 +- .../jdbc/JdbcDataFetcherUrlCheckTest.java | 34 - .../mysql-metadata-storage/pom.xml | 6 +- .../storage/mysql/MySQLConnector.java | 6 +- .../MySQLFirehoseDatabaseConnectorTest.java | 23 - extensions-core/orc-extensions/pom.xml | 2 +- extensions-core/parquet-extensions/pom.xml | 2 +- .../postgresql-metadata-storage/pom.xml | 2 +- extensions-core/protobuf-extensions/pom.xml | 2 +- extensions-core/s3-extensions/pom.xml | 2 +- .../simple-client-sslcontext/pom.xml | 2 +- extensions-core/stats/pom.xml | 2 +- extensions-core/testing-tools/pom.xml | 2 +- extensions-twitter/scribe-emitter/pom.xml | 6 +- .../emitter/scribe/DruidAdminLogEvent.java | 1499 +++++++++ .../emitter/scribe/DruidIndexingLogEvent.java | 1489 +++++++++ .../emitter/scribe/DruidQueryLogEvent.java | 2933 +++++++++++++++++ .../twitter-thrift-extensions/pom.xml | 2 +- hll/pom.xml | 2 +- indexing-hadoop/pom.xml | 2 +- indexing-service/pom.xml | 2 +- integration-tests/docker/Dockerfile | 6 +- .../docker/environment-configs/common | 2 +- .../common-custom-coordinator-duties | 4 +- .../docker/environment-configs/common-ldap | 4 +- .../common-shuffle-deep-store | 2 +- integration-tests/pom.xml | 2 +- pom.xml | 9 +- processing/pom.xml | 2 +- server/pom.xml | 2 +- .../JdbcAccessSecurityConfig.java | 2 +- services/pom.xml | 2 +- sql/pom.xml | 2 +- web-console/pom.xml | 2 +- website/pom.xml | 2 +- 92 files changed, 6097 insertions(+), 214 deletions(-) create mode 100644 extensions-twitter/scribe-emitter/src/main/java/org/apache/druid/emitter/scribe/DruidAdminLogEvent.java create mode 100644 extensions-twitter/scribe-emitter/src/main/java/org/apache/druid/emitter/scribe/DruidIndexingLogEvent.java create mode 100644 extensions-twitter/scribe-emitter/src/main/java/org/apache/druid/emitter/scribe/DruidQueryLogEvent.java diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index 7305a88aa4b4..94f1a936c923 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -27,7 +27,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 diff --git a/cloud/aws-common/pom.xml b/cloud/aws-common/pom.xml index d969ef87f919..2e7caeb1e9a5 100644 --- a/cloud/aws-common/pom.xml +++ b/cloud/aws-common/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/cloud/gcp-common/pom.xml b/cloud/gcp-common/pom.xml index 18a2ab0ce1e5..1bb8fb2015b7 100644 --- a/cloud/gcp-common/pom.xml +++ b/cloud/gcp-common/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/codestyle/checkstyle-suppressions.xml b/codestyle/checkstyle-suppressions.xml index 01868d73f34f..16a338eba55c 100644 --- a/codestyle/checkstyle-suppressions.xml +++ b/codestyle/checkstyle-suppressions.xml @@ -70,4 +70,7 @@ + + + diff --git a/core/pom.xml b/core/pom.xml index bd85e7d36ef7..9d24d719b802 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -29,7 +29,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 @@ -361,8 +361,8 @@ test - mysql - mysql-connector-java + com.mysql + mysql-connector-j ${mysql.version} test diff --git a/core/src/main/java/org/apache/druid/utils/ConnectionUriUtils.java b/core/src/main/java/org/apache/druid/utils/ConnectionUriUtils.java index 0cd201dbece2..b5f964816c1d 100644 --- a/core/src/main/java/org/apache/druid/utils/ConnectionUriUtils.java +++ b/core/src/main/java/org/apache/druid/utils/ConnectionUriUtils.java @@ -28,6 +28,8 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Collections; +import java.util.List; +import java.util.Map; import java.util.Properties; import java.util.Set; @@ -44,7 +46,8 @@ public final class ConnectionUriUtils public static final String POSTGRES_DRIVER = "org.postgresql.Driver"; public static final String MYSQL_DRIVER = "com.mysql.jdbc.Driver"; - public static final String MYSQL_NON_REGISTERING_DRIVER = "com.mysql.jdbc.NonRegisteringDriver"; + public static final String MYSQL_CONNECTION_URL = "com.mysql.cj.conf.ConnectionUrl"; + public static final String MYSQL_HOST_INFO = "com.mysql.cj.conf.HostInfo"; public static final String MARIADB_DRIVER = "org.mariadb.jdbc.Driver"; /** @@ -101,7 +104,7 @@ public static Set tryParseJdbcUriParameters(String connectionUri, boolea } catch (ClassNotFoundException notFoundMaria2x) { throw new RuntimeException( - "Failed to find MySQL driver class. Please check the MySQL connector version 5.1.48 is in the classpath", + "Failed to find MySQL driver class. Please check the MySQL connector version 8.2.0 is in the classpath", notFoundMysql ); } @@ -179,17 +182,67 @@ public static Set tryParsePostgresConnectionUri(String connectionUri) } public static Set tryParseMySqlConnectionUri(String connectionUri) - throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, + throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { - Class driverClass = Class.forName(MYSQL_NON_REGISTERING_DRIVER); - Method parseUrl = driverClass.getMethod("parseURL", String.class, Properties.class); - // almost the same as postgres, but is an instance level method - Properties properties = (Properties) parseUrl.invoke(driverClass.getConstructor().newInstance(), connectionUri, null); - - if (properties == null) { + Class connectionUrlClass = Class.forName(MYSQL_CONNECTION_URL); + Method isConnectionStringSupported = connectionUrlClass.getMethod("acceptsUrl", String.class); + if (!(boolean) isConnectionStringSupported.invoke(connectionUrlClass, connectionUri)) { throw new IAE("Invalid URL format for MySQL: [%s]", connectionUri); } + Method getConnectionUrlInstanceMethod = connectionUrlClass.getMethod("getConnectionUrlInstance", String.class, Properties.class); + Object conUrl = getConnectionUrlInstanceMethod.invoke(connectionUrlClass, connectionUri, null); + Method getHostsList = connectionUrlClass.getMethod("getHostsList"); + return getKeysFromOptions(getPropertiesFromHosts((List) getHostsList.invoke(conUrl))); + } + + + private static Properties getPropertiesFromHosts(List hostsList) + throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, ClassNotFoundException + { + Properties properties = new Properties(); + Class hostInfoClass = Class.forName(MYSQL_HOST_INFO); + for (Object host : hostsList) { + Method getHostMethod = hostInfoClass.getMethod("getHost"); + String hostName = (String) getHostMethod.invoke(host); + if (hostName != null) { + properties.setProperty("HOST", hostName); + } + + Method getPortMethod = hostInfoClass.getMethod("getPort"); + Integer port = (Integer) getPortMethod.invoke(host); + if (port != null) { + properties.setProperty("PORT", String.valueOf(port)); + } + + Method getUserMethod = hostInfoClass.getMethod("getUser"); + String user = (String) getUserMethod.invoke(host); + if (user != null) { + properties.setProperty("user", user); + } + + Method getPasswordMethod = hostInfoClass.getMethod("getPassword"); + String password = (String) getPasswordMethod.invoke(host); + if (password != null) { + properties.setProperty("password", password); + } + + Method getHostPropertiesMethod = hostInfoClass.getMethod("getHostProperties"); + Map hostProperties = + (Map) getHostPropertiesMethod.invoke(host); + if (hostProperties != null) { + for (Map.Entry entry : hostProperties.entrySet()) { + if (entry.getKey() != null && entry.getValue() != null) { + properties.setProperty(entry.getKey(), entry.getValue()); + } + } + } + } + return properties; + } + + private static Set getKeysFromOptions(Properties properties) + { Set keys = Sets.newHashSetWithExpectedSize(properties.size()); properties.forEach((k, v) -> keys.add((String) k)); return keys; diff --git a/core/src/test/java/org/apache/druid/utils/ConnectionUriUtilsTest.java b/core/src/test/java/org/apache/druid/utils/ConnectionUriUtilsTest.java index f264e0a4fded..fe2559a25441 100644 --- a/core/src/test/java/org/apache/druid/utils/ConnectionUriUtilsTest.java +++ b/core/src/test/java/org/apache/druid/utils/ConnectionUriUtilsTest.java @@ -106,7 +106,7 @@ public void testTryParses() props = ConnectionUriUtils.tryParseJdbcUriParameters(MYSQL_URI, false); // though this would be 4 if mysql wasn't loaded in classpath because it would fall back to mariadb - Assert.assertEquals(9, props.size()); + Assert.assertEquals(6, props.size()); props = ConnectionUriUtils.tryParseJdbcUriParameters(MARIA_URI, false); Assert.assertEquals(4, props.size()); @@ -129,13 +129,6 @@ public void tryParseInvalidPostgres() ConnectionUriUtils.tryParseJdbcUriParameters("jdbc:postgresql://bad:1234¶m", true); } - @Test - public void tryParseInvalidMySql() - { - expectedException.expect(IAE.class); - ConnectionUriUtils.tryParseJdbcUriParameters("jdbc:mysql:/bad", true); - } - @Test public void testMySqlFallbackMySqlMaria2x() { @@ -205,7 +198,7 @@ public void testMySQLDriver() throws Exception Set props = ConnectionUriUtils.tryParseMySqlConnectionUri(MYSQL_URI); // mysql actually misses 'keyonly', but spits out several keys that are not actually uri parameters // DBNAME, HOST, PORT, HOST.1, PORT.1, NUM_HOSTS - Assert.assertEquals(9, props.size()); + Assert.assertEquals(6, props.size()); Assert.assertTrue(props.contains("user")); Assert.assertTrue(props.contains("password")); Assert.assertTrue(props.contains("otherOptions")); diff --git a/distribution/bin/generate-binary-license.py b/distribution/bin/generate-binary-license.py index e69bc7025e91..e08fe04710bc 100755 --- a/distribution/bin/generate-binary-license.py +++ b/distribution/bin/generate-binary-license.py @@ -137,7 +137,7 @@ def generate_license(apache_license_v2, license_yaml): # Print Apache license first. print_outfile(apache_license_v2) with open(license_yaml, encoding='utf-8') as registry_file: - licenses_list = list(yaml.load_all(registry_file)) + licenses_list = list(yaml.load_all(registry_file, Loader=yaml.FullLoader)) # Group licenses by license_name, license_category, and then module. licenses_map = {} diff --git a/distribution/bin/generate-binary-notice.py b/distribution/bin/generate-binary-notice.py index a7778812b927..5ab1d7cf8572 100755 --- a/distribution/bin/generate-binary-notice.py +++ b/distribution/bin/generate-binary-notice.py @@ -57,7 +57,7 @@ def generate_notice(source_notice, dependences_yaml): # Print Apache license first. print_outfile(source_notice) with open(dependences_yaml, encoding='utf-8') as registry_file: - dependencies = list(yaml.load_all(registry_file)) + dependencies = list(yaml.load_all(registry_file, Loader=yaml.FullLoader)) # Group dependencies by module modules_map = defaultdict(list) diff --git a/distribution/docker/Dockerfile.mysql b/distribution/docker/Dockerfile.mysql index 9845a0de7102..66fb9e90a711 100644 --- a/distribution/docker/Dockerfile.mysql +++ b/distribution/docker/Dockerfile.mysql @@ -22,10 +22,10 @@ FROM $DRUID_RELEASE WORKDIR /opt/druid/extensions/mysql-metadata-storage -ARG MYSQL_URL=https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.48/mysql-connector-java-5.1.48.jar -ARG MYSQL_JAR=mysql-connector-java-5.1.48.jar -# https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.48/mysql-connector-java-5.1.48.jar.sha1 -ARG MYSQL_SHA=9140be77aafa5050bf4bb936d560cbacb5a6b5c1 +ARG MYSQL_URL=https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/8.2.0/mysql-connector-j-8.2.0.jar +ARG MYSQL_JAR=mysql-connector-j-8.2.0.jar +# https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/8.2.0/mysql-connector-j-8.2.0.jar.sha1 +ARG MYSQL_SHA=56d34aea30915904b1c883f1cfae731dd2df6029 RUN wget -q ${MYSQL_URL} \ && echo "${MYSQL_SHA} ${MYSQL_JAR}" | sha1sum -c \ diff --git a/distribution/pom.xml b/distribution/pom.xml index dd88a1977254..e7b9f9237896 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -30,7 +30,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 diff --git a/docs/development/extensions-core/mysql.md b/docs/development/extensions-core/mysql.md index 962099e534ee..56ccbfb50b2d 100644 --- a/docs/development/extensions-core/mysql.md +++ b/docs/development/extensions-core/mysql.md @@ -34,7 +34,7 @@ This extension can use Oracle's MySQL JDBC driver which is not included in the D install it separately. There are a few ways to obtain this library: - It can be downloaded from the MySQL site at: https://dev.mysql.com/downloads/connector/j/ -- It can be fetched from Maven Central at: https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.48/mysql-connector-java-5.1.48.jar +- It can be fetched from Maven Central at: https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/8.2.0/mysql-connector-j-8.2.0.jar - It may be available through your package manager, e.g. as `libmysql-java` on APT for a Debian-based OS This fetches the MySQL connector JAR file with a name like `mysql-connector-java-5.1.48.jar`. diff --git a/docs/operations/use_sbt_to_build_fat_jar.md b/docs/operations/use_sbt_to_build_fat_jar.md index 055ddd236c40..eeb58c9734eb 100644 --- a/docs/operations/use_sbt_to_build_fat_jar.md +++ b/docs/operations/use_sbt_to_build_fat_jar.md @@ -102,7 +102,7 @@ libraryDependencies ++= Seq( "com.fasterxml.jackson.jaxrs" % "jackson-jaxrs-smile-provider" % "2.3.0", "com.fasterxml.jackson.module" % "jackson-module-jaxb-annotations" % "2.3.0", "com.sun.jersey" % "jersey-servlet" % "1.17.1", - "mysql" % "mysql-connector-java" % "5.1.34", + "mysql" % "mysql-connector-java" % "8.2.0", "org.scalatest" %% "scalatest" % "2.2.3" % "test", "org.mockito" % "mockito-core" % "1.10.19" % "test" ) diff --git a/extendedset/pom.xml b/extendedset/pom.xml index 39fa43335f98..70cc73eff0ae 100755 --- a/extendedset/pom.xml +++ b/extendedset/pom.xml @@ -31,7 +31,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 diff --git a/extensions-contrib/aliyun-oss-extensions/pom.xml b/extensions-contrib/aliyun-oss-extensions/pom.xml index cb2ba137f792..bf9676be1a45 100644 --- a/extensions-contrib/aliyun-oss-extensions/pom.xml +++ b/extensions-contrib/aliyun-oss-extensions/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/ambari-metrics-emitter/pom.xml b/extensions-contrib/ambari-metrics-emitter/pom.xml index 6a627a241c99..17de0cbf502c 100644 --- a/extensions-contrib/ambari-metrics-emitter/pom.xml +++ b/extensions-contrib/ambari-metrics-emitter/pom.xml @@ -24,7 +24,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/cassandra-storage/pom.xml b/extensions-contrib/cassandra-storage/pom.xml index eb0c0e9dda34..e795ca8ef804 100644 --- a/extensions-contrib/cassandra-storage/pom.xml +++ b/extensions-contrib/cassandra-storage/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/cloudfiles-extensions/pom.xml b/extensions-contrib/cloudfiles-extensions/pom.xml index a6c6e8e795ff..7f840c93222e 100644 --- a/extensions-contrib/cloudfiles-extensions/pom.xml +++ b/extensions-contrib/cloudfiles-extensions/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/distinctcount/pom.xml b/extensions-contrib/distinctcount/pom.xml index 5e41b983d2aa..9c3e3b874f94 100644 --- a/extensions-contrib/distinctcount/pom.xml +++ b/extensions-contrib/distinctcount/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/dropwizard-emitter/pom.xml b/extensions-contrib/dropwizard-emitter/pom.xml index 8cd4599f63a1..5ef9086559d6 100644 --- a/extensions-contrib/dropwizard-emitter/pom.xml +++ b/extensions-contrib/dropwizard-emitter/pom.xml @@ -24,7 +24,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/gce-extensions/pom.xml b/extensions-contrib/gce-extensions/pom.xml index 4f25cee9317b..4b8609e6133f 100644 --- a/extensions-contrib/gce-extensions/pom.xml +++ b/extensions-contrib/gce-extensions/pom.xml @@ -21,7 +21,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/extensions-contrib/graphite-emitter/pom.xml b/extensions-contrib/graphite-emitter/pom.xml index b5daf84d1b10..76cafc232833 100644 --- a/extensions-contrib/graphite-emitter/pom.xml +++ b/extensions-contrib/graphite-emitter/pom.xml @@ -24,7 +24,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/influx-extensions/pom.xml b/extensions-contrib/influx-extensions/pom.xml index 04767bf96907..e7c09bb60dc5 100644 --- a/extensions-contrib/influx-extensions/pom.xml +++ b/extensions-contrib/influx-extensions/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/influxdb-emitter/pom.xml b/extensions-contrib/influxdb-emitter/pom.xml index dff3ec38b091..d106e55d7635 100644 --- a/extensions-contrib/influxdb-emitter/pom.xml +++ b/extensions-contrib/influxdb-emitter/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/kafka-emitter/pom.xml b/extensions-contrib/kafka-emitter/pom.xml index 2ae942f3877b..e3f3fb7926a7 100644 --- a/extensions-contrib/kafka-emitter/pom.xml +++ b/extensions-contrib/kafka-emitter/pom.xml @@ -24,7 +24,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/materialized-view-maintenance/pom.xml b/extensions-contrib/materialized-view-maintenance/pom.xml index 5345523423e9..24722946ffa6 100644 --- a/extensions-contrib/materialized-view-maintenance/pom.xml +++ b/extensions-contrib/materialized-view-maintenance/pom.xml @@ -22,7 +22,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/extensions-contrib/materialized-view-selection/pom.xml b/extensions-contrib/materialized-view-selection/pom.xml index 1f13f1467cfd..583fd485299d 100644 --- a/extensions-contrib/materialized-view-selection/pom.xml +++ b/extensions-contrib/materialized-view-selection/pom.xml @@ -22,7 +22,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/extensions-contrib/momentsketch/pom.xml b/extensions-contrib/momentsketch/pom.xml index 278029cc2763..7065188208ee 100644 --- a/extensions-contrib/momentsketch/pom.xml +++ b/extensions-contrib/momentsketch/pom.xml @@ -22,7 +22,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/extensions-contrib/moving-average-query/pom.xml b/extensions-contrib/moving-average-query/pom.xml index 7a6db67cb2ba..162cc8cdb6be 100644 --- a/extensions-contrib/moving-average-query/pom.xml +++ b/extensions-contrib/moving-average-query/pom.xml @@ -24,7 +24,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/opentsdb-emitter/pom.xml b/extensions-contrib/opentsdb-emitter/pom.xml index 8924b1f7a307..a79149fe61c3 100644 --- a/extensions-contrib/opentsdb-emitter/pom.xml +++ b/extensions-contrib/opentsdb-emitter/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/prometheus-emitter/pom.xml b/extensions-contrib/prometheus-emitter/pom.xml index 014c4bd33c36..1fe43894dc74 100644 --- a/extensions-contrib/prometheus-emitter/pom.xml +++ b/extensions-contrib/prometheus-emitter/pom.xml @@ -21,7 +21,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/extensions-contrib/redis-cache/pom.xml b/extensions-contrib/redis-cache/pom.xml index c313349b6201..e882e55e07ab 100644 --- a/extensions-contrib/redis-cache/pom.xml +++ b/extensions-contrib/redis-cache/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/sqlserver-metadata-storage/pom.xml b/extensions-contrib/sqlserver-metadata-storage/pom.xml index 80c86eb263a0..0197884f68de 100644 --- a/extensions-contrib/sqlserver-metadata-storage/pom.xml +++ b/extensions-contrib/sqlserver-metadata-storage/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-contrib/statsd-emitter/pom.xml b/extensions-contrib/statsd-emitter/pom.xml index bb2b3ef204b4..3362c2f573c6 100644 --- a/extensions-contrib/statsd-emitter/pom.xml +++ b/extensions-contrib/statsd-emitter/pom.xml @@ -21,7 +21,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/extensions-contrib/tdigestsketch/pom.xml b/extensions-contrib/tdigestsketch/pom.xml index f210ee6b4689..c84af28458dc 100644 --- a/extensions-contrib/tdigestsketch/pom.xml +++ b/extensions-contrib/tdigestsketch/pom.xml @@ -22,7 +22,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/extensions-contrib/thrift-extensions/pom.xml b/extensions-contrib/thrift-extensions/pom.xml index 8e0ab47643af..ab5e66392523 100644 --- a/extensions-contrib/thrift-extensions/pom.xml +++ b/extensions-contrib/thrift-extensions/pom.xml @@ -28,7 +28,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/extensions-contrib/time-min-max/pom.xml b/extensions-contrib/time-min-max/pom.xml index ca70e557776f..d672522c7d04 100644 --- a/extensions-contrib/time-min-max/pom.xml +++ b/extensions-contrib/time-min-max/pom.xml @@ -21,7 +21,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/extensions-contrib/virtual-columns/pom.xml b/extensions-contrib/virtual-columns/pom.xml index 073de8dba678..06b9f5250805 100644 --- a/extensions-contrib/virtual-columns/pom.xml +++ b/extensions-contrib/virtual-columns/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/avro-extensions/pom.xml b/extensions-core/avro-extensions/pom.xml index eae99453fa7b..1eef43755716 100644 --- a/extensions-core/avro-extensions/pom.xml +++ b/extensions-core/avro-extensions/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/azure-extensions/pom.xml b/extensions-core/azure-extensions/pom.xml index 989cc68fdbba..a234b845699e 100644 --- a/extensions-core/azure-extensions/pom.xml +++ b/extensions-core/azure-extensions/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/datasketches/pom.xml b/extensions-core/datasketches/pom.xml index b1518bc35c95..c79937df6f7f 100644 --- a/extensions-core/datasketches/pom.xml +++ b/extensions-core/datasketches/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/druid-aws-rds-extensions/pom.xml b/extensions-core/druid-aws-rds-extensions/pom.xml index 2c1e2049038f..74915c998134 100644 --- a/extensions-core/druid-aws-rds-extensions/pom.xml +++ b/extensions-core/druid-aws-rds-extensions/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/druid-basic-security/pom.xml b/extensions-core/druid-basic-security/pom.xml index e0367609a172..420f8ffe9c22 100644 --- a/extensions-core/druid-basic-security/pom.xml +++ b/extensions-core/druid-basic-security/pom.xml @@ -30,7 +30,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/druid-bloom-filter/pom.xml b/extensions-core/druid-bloom-filter/pom.xml index 61d0b6631450..95adc6da7f39 100644 --- a/extensions-core/druid-bloom-filter/pom.xml +++ b/extensions-core/druid-bloom-filter/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/druid-kerberos/pom.xml b/extensions-core/druid-kerberos/pom.xml index 2adfa58d4b16..96a152f22831 100644 --- a/extensions-core/druid-kerberos/pom.xml +++ b/extensions-core/druid-kerberos/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/druid-pac4j/pom.xml b/extensions-core/druid-pac4j/pom.xml index 1889bee9040e..70e55ed30e82 100644 --- a/extensions-core/druid-pac4j/pom.xml +++ b/extensions-core/druid-pac4j/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/druid-ranger-security/pom.xml b/extensions-core/druid-ranger-security/pom.xml index 3905ca2823d9..910d17f92ef1 100644 --- a/extensions-core/druid-ranger-security/pom.xml +++ b/extensions-core/druid-ranger-security/pom.xml @@ -30,7 +30,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/ec2-extensions/pom.xml b/extensions-core/ec2-extensions/pom.xml index a2fe9fe107d7..f7f86300e115 100644 --- a/extensions-core/ec2-extensions/pom.xml +++ b/extensions-core/ec2-extensions/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/google-extensions/pom.xml b/extensions-core/google-extensions/pom.xml index acd197e3590c..5d780ac614df 100644 --- a/extensions-core/google-extensions/pom.xml +++ b/extensions-core/google-extensions/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/hdfs-storage/pom.xml b/extensions-core/hdfs-storage/pom.xml index 33e6ac732fe3..63fbb03412a3 100644 --- a/extensions-core/hdfs-storage/pom.xml +++ b/extensions-core/hdfs-storage/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/histogram/pom.xml b/extensions-core/histogram/pom.xml index ef38f9c69b59..313a0e48f9cb 100644 --- a/extensions-core/histogram/pom.xml +++ b/extensions-core/histogram/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/kafka-extraction-namespace/pom.xml b/extensions-core/kafka-extraction-namespace/pom.xml index cb29b1857901..8298a8f9f288 100644 --- a/extensions-core/kafka-extraction-namespace/pom.xml +++ b/extensions-core/kafka-extraction-namespace/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/kafka-indexing-service/pom.xml b/extensions-core/kafka-indexing-service/pom.xml index 99beac4ed955..0ae2b0c539ff 100644 --- a/extensions-core/kafka-indexing-service/pom.xml +++ b/extensions-core/kafka-indexing-service/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/kinesis-indexing-service/pom.xml b/extensions-core/kinesis-indexing-service/pom.xml index f24010e0b696..9311ff7d3623 100644 --- a/extensions-core/kinesis-indexing-service/pom.xml +++ b/extensions-core/kinesis-indexing-service/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/kubernetes-extensions/pom.xml b/extensions-core/kubernetes-extensions/pom.xml index c731fb4f18c5..bf84f0158c25 100644 --- a/extensions-core/kubernetes-extensions/pom.xml +++ b/extensions-core/kubernetes-extensions/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/lookups-cached-global/pom.xml b/extensions-core/lookups-cached-global/pom.xml index 8774f6955d4d..a574fb65eddf 100644 --- a/extensions-core/lookups-cached-global/pom.xml +++ b/extensions-core/lookups-cached-global/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml @@ -168,8 +168,8 @@ test - mysql - mysql-connector-java + com.mysql + mysql-connector-j ${mysql.version} test diff --git a/extensions-core/lookups-cached-global/src/test/java/org/apache/druid/query/lookup/namespace/JdbcExtractionNamespaceUrlCheckTest.java b/extensions-core/lookups-cached-global/src/test/java/org/apache/druid/query/lookup/namespace/JdbcExtractionNamespaceUrlCheckTest.java index 9bdb76ed975c..c95d80f96d25 100644 --- a/extensions-core/lookups-cached-global/src/test/java/org/apache/druid/query/lookup/namespace/JdbcExtractionNamespaceUrlCheckTest.java +++ b/extensions-core/lookups-cached-global/src/test/java/org/apache/druid/query/lookup/namespace/JdbcExtractionNamespaceUrlCheckTest.java @@ -150,43 +150,6 @@ public boolean isEnforceAllowedProperties() } ); } - - @Test - public void testWhenInvalidUrlFormat() - { - expectedException.expect(IllegalArgumentException.class); - expectedException.expectMessage("Invalid URL format for MySQL: [jdbc:mysql:/invalid-url::3006]"); - new JdbcExtractionNamespace( - new MetadataStorageConnectorConfig() - { - @Override - public String getConnectURI() - { - return "jdbc:mysql:/invalid-url::3006"; - } - }, - TABLE_NAME, - KEY_NAME, - VAL_NAME, - TS_COLUMN, - "some filter", - new Period(10), - new JdbcAccessSecurityConfig() - { - @Override - public Set getAllowedProperties() - { - return ImmutableSet.of("valid_key1", "valid_key2"); - } - - @Override - public boolean isEnforceAllowedProperties() - { - return true; - } - } - ); - } } public static class PostgreSqlTest diff --git a/extensions-core/lookups-cached-single/pom.xml b/extensions-core/lookups-cached-single/pom.xml index e899a6545535..49839499fe6f 100644 --- a/extensions-core/lookups-cached-single/pom.xml +++ b/extensions-core/lookups-cached-single/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml @@ -130,8 +130,8 @@ test - mysql - mysql-connector-java + com.mysql + mysql-connector-j ${mysql.version} test diff --git a/extensions-core/lookups-cached-single/src/test/java/org/apache/druid/server/lookup/jdbc/JdbcDataFetcherUrlCheckTest.java b/extensions-core/lookups-cached-single/src/test/java/org/apache/druid/server/lookup/jdbc/JdbcDataFetcherUrlCheckTest.java index 8f7f2e9d6d6a..36909d18bed7 100644 --- a/extensions-core/lookups-cached-single/src/test/java/org/apache/druid/server/lookup/jdbc/JdbcDataFetcherUrlCheckTest.java +++ b/extensions-core/lookups-cached-single/src/test/java/org/apache/druid/server/lookup/jdbc/JdbcDataFetcherUrlCheckTest.java @@ -143,40 +143,6 @@ public boolean isEnforceAllowedProperties() ); } - @Test - public void testWhenInvalidUrlFormat() - { - expectedException.expect(IllegalArgumentException.class); - expectedException.expectMessage("Invalid URL format for MySQL: [jdbc:mysql:/invalid-url::3006]"); - new JdbcDataFetcher( - new MetadataStorageConnectorConfig() - { - @Override - public String getConnectURI() - { - return "jdbc:mysql:/invalid-url::3006"; - } - }, - TABLE_NAME, - KEY_COLUMN, - VALUE_COLUMN, - 100, - new JdbcAccessSecurityConfig() - { - @Override - public Set getAllowedProperties() - { - return ImmutableSet.of("valid_key1", "valid_key2"); - } - - @Override - public boolean isEnforceAllowedProperties() - { - return true; - } - } - ); - } } public static class PostgreSqlTest diff --git a/extensions-core/mysql-metadata-storage/pom.xml b/extensions-core/mysql-metadata-storage/pom.xml index 09e472faad2c..7bc74d5edd55 100644 --- a/extensions-core/mysql-metadata-storage/pom.xml +++ b/extensions-core/mysql-metadata-storage/pom.xml @@ -30,7 +30,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml @@ -48,8 +48,8 @@ provided - mysql - mysql-connector-java + com.mysql + mysql-connector-j ${mysql.version} diff --git a/extensions-core/mysql-metadata-storage/src/main/java/org/apache/druid/metadata/storage/mysql/MySQLConnector.java b/extensions-core/mysql-metadata-storage/src/main/java/org/apache/druid/metadata/storage/mysql/MySQLConnector.java index fd3a638f7989..f6bef7ad84b0 100644 --- a/extensions-core/mysql-metadata-storage/src/main/java/org/apache/druid/metadata/storage/mysql/MySQLConnector.java +++ b/extensions-core/mysql-metadata-storage/src/main/java/org/apache/druid/metadata/storage/mysql/MySQLConnector.java @@ -23,7 +23,6 @@ import com.google.common.base.Supplier; import com.google.common.collect.ImmutableList; import com.google.inject.Inject; -import com.mysql.jdbc.exceptions.MySQLTransientException; import org.apache.commons.dbcp2.BasicDataSource; import org.apache.druid.java.util.common.ISE; import org.apache.druid.java.util.common.StringUtils; @@ -37,6 +36,7 @@ import java.io.File; import java.sql.SQLException; +import java.sql.SQLTransientException; public class MySQLConnector extends SQLMetadataConnector { @@ -64,7 +64,7 @@ public MySQLConnector( catch (ClassNotFoundException e) { throw new ISE(e, "Could not find %s on the classpath. The MySQL Connector library is not included in the Druid " + "distribution but is required to use MySQL. Please download a compatible library (for example " - + "'mysql-connector-java-5.1.48.jar') and place it under 'extensions/mysql-metadata-storage/'. See " + + "'mysql-connector-java-8.2.0.jar') and place it under 'extensions/mysql-metadata-storage/'. See " + "https://druid.apache.org/downloads for more details.", driverConfig.getDriverClassName() ); @@ -205,7 +205,7 @@ public boolean tableExists(Handle handle, String tableName) @Override protected boolean connectorIsTransientException(Throwable e) { - return e instanceof MySQLTransientException + return e instanceof SQLTransientException || (e instanceof SQLException && ((SQLException) e).getErrorCode() == 1317 /* ER_QUERY_INTERRUPTED */); } diff --git a/extensions-core/mysql-metadata-storage/src/test/java/org/apache/druid/firehose/sql/MySQLFirehoseDatabaseConnectorTest.java b/extensions-core/mysql-metadata-storage/src/test/java/org/apache/druid/firehose/sql/MySQLFirehoseDatabaseConnectorTest.java index b46cb2685622..67769b2f9045 100644 --- a/extensions-core/mysql-metadata-storage/src/test/java/org/apache/druid/firehose/sql/MySQLFirehoseDatabaseConnectorTest.java +++ b/extensions-core/mysql-metadata-storage/src/test/java/org/apache/druid/firehose/sql/MySQLFirehoseDatabaseConnectorTest.java @@ -25,7 +25,6 @@ import com.google.common.collect.ImmutableSet; import nl.jqno.equalsverifier.EqualsVerifier; import org.apache.druid.jackson.DefaultObjectMapper; -import org.apache.druid.java.util.common.StringUtils; import org.apache.druid.metadata.MetadataStorageConnectorConfig; import org.apache.druid.metadata.storage.mysql.MySQLMetadataStorageModule; import org.apache.druid.server.initialization.JdbcAccessSecurityConfig; @@ -308,28 +307,6 @@ public boolean isEnforceAllowedProperties() ); } - @Test - public void testFindPropertyKeysFromInvalidConnectUrl() - { - final String url = "jdbc:mysql:/invalid-url::3006"; - MetadataStorageConnectorConfig connectorConfig = new MetadataStorageConnectorConfig() - { - @Override - public String getConnectURI() - { - return url; - } - }; - - expectedException.expect(RuntimeException.class); - expectedException.expectMessage(StringUtils.format("Invalid URL format for MySQL: [%s]", url)); - new MySQLFirehoseDatabaseConnector( - connectorConfig, - null, - new JdbcAccessSecurityConfig() - ); - } - private static JdbcAccessSecurityConfig newSecurityConfigEnforcingAllowList(Set allowedProperties) { return new JdbcAccessSecurityConfig() diff --git a/extensions-core/orc-extensions/pom.xml b/extensions-core/orc-extensions/pom.xml index a7c55e7650ee..80fb58d9958d 100644 --- a/extensions-core/orc-extensions/pom.xml +++ b/extensions-core/orc-extensions/pom.xml @@ -26,7 +26,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/extensions-core/parquet-extensions/pom.xml b/extensions-core/parquet-extensions/pom.xml index 5759081a8945..2f0bee342667 100644 --- a/extensions-core/parquet-extensions/pom.xml +++ b/extensions-core/parquet-extensions/pom.xml @@ -27,7 +27,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/extensions-core/postgresql-metadata-storage/pom.xml b/extensions-core/postgresql-metadata-storage/pom.xml index 8d3a03425c78..06fae7cf6797 100644 --- a/extensions-core/postgresql-metadata-storage/pom.xml +++ b/extensions-core/postgresql-metadata-storage/pom.xml @@ -30,7 +30,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/protobuf-extensions/pom.xml b/extensions-core/protobuf-extensions/pom.xml index 2e035fac31b1..91cbf491502e 100644 --- a/extensions-core/protobuf-extensions/pom.xml +++ b/extensions-core/protobuf-extensions/pom.xml @@ -29,7 +29,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/s3-extensions/pom.xml b/extensions-core/s3-extensions/pom.xml index 1d4863cc404d..3f713133c64d 100644 --- a/extensions-core/s3-extensions/pom.xml +++ b/extensions-core/s3-extensions/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/simple-client-sslcontext/pom.xml b/extensions-core/simple-client-sslcontext/pom.xml index 6ab76bdbb460..5271541afa3c 100644 --- a/extensions-core/simple-client-sslcontext/pom.xml +++ b/extensions-core/simple-client-sslcontext/pom.xml @@ -22,7 +22,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/extensions-core/stats/pom.xml b/extensions-core/stats/pom.xml index 236957180dc6..0a07de9f21b2 100644 --- a/extensions-core/stats/pom.xml +++ b/extensions-core/stats/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-core/testing-tools/pom.xml b/extensions-core/testing-tools/pom.xml index 2bf01c61ff92..3c278eafb940 100644 --- a/extensions-core/testing-tools/pom.xml +++ b/extensions-core/testing-tools/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml diff --git a/extensions-twitter/scribe-emitter/pom.xml b/extensions-twitter/scribe-emitter/pom.xml index f14abe5d673e..a6e13b5848bd 100644 --- a/extensions-twitter/scribe-emitter/pom.xml +++ b/extensions-twitter/scribe-emitter/pom.xml @@ -21,7 +21,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 @@ -125,8 +125,9 @@ + diff --git a/extensions-twitter/scribe-emitter/src/main/java/org/apache/druid/emitter/scribe/DruidAdminLogEvent.java b/extensions-twitter/scribe-emitter/src/main/java/org/apache/druid/emitter/scribe/DruidAdminLogEvent.java new file mode 100644 index 000000000000..2740f240aa9d --- /dev/null +++ b/extensions-twitter/scribe-emitter/src/main/java/org/apache/druid/emitter/scribe/DruidAdminLogEvent.java @@ -0,0 +1,1499 @@ +/** + * Autogenerated by Thrift Compiler (0.11.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.druid.emitter.scribe; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)", date = "2024-10-24") +public class DruidAdminLogEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DruidAdminLogEvent"); + + private static final org.apache.thrift.protocol.TField AUDIT_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("audit_key", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField AUDIT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("audit_type", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField AUTHOR_FIELD_DESC = new org.apache.thrift.protocol.TField("author", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField COMMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("comment", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField REMOTE_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("remote_address", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField CREATED_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("created_date", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField PAYLOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("payload", org.apache.thrift.protocol.TType.STRING, (short)7); + private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.STRING, (short)8); + private static final org.apache.thrift.protocol.TField DRUID_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("druid_version", org.apache.thrift.protocol.TType.STRING, (short)9); + private static final org.apache.thrift.protocol.TField ENVIRONMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField DATACENTER_FIELD_DESC = new org.apache.thrift.protocol.TField("datacenter", org.apache.thrift.protocol.TType.STRING, (short)11); + private static final org.apache.thrift.protocol.TField CLUSTER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("cluster_name", org.apache.thrift.protocol.TType.STRING, (short)12); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DruidAdminLogEventStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DruidAdminLogEventTupleSchemeFactory(); + + public java.lang.String audit_key; // required + public java.lang.String audit_type; // required + public java.lang.String author; // required + public java.lang.String comment; // required + public java.lang.String remote_address; // required + public java.lang.String created_date; // required + public java.lang.String payload; // required + public java.lang.String role; // optional + public java.lang.String druid_version; // optional + public java.lang.String environment; // optional + public java.lang.String datacenter; // optional + public java.lang.String cluster_name; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + AUDIT_KEY((short)1, "audit_key"), + AUDIT_TYPE((short)2, "audit_type"), + AUTHOR((short)3, "author"), + COMMENT((short)4, "comment"), + REMOTE_ADDRESS((short)5, "remote_address"), + CREATED_DATE((short)6, "created_date"), + PAYLOAD((short)7, "payload"), + ROLE((short)8, "role"), + DRUID_VERSION((short)9, "druid_version"), + ENVIRONMENT((short)10, "environment"), + DATACENTER((short)11, "datacenter"), + CLUSTER_NAME((short)12, "cluster_name"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // AUDIT_KEY + return AUDIT_KEY; + case 2: // AUDIT_TYPE + return AUDIT_TYPE; + case 3: // AUTHOR + return AUTHOR; + case 4: // COMMENT + return COMMENT; + case 5: // REMOTE_ADDRESS + return REMOTE_ADDRESS; + case 6: // CREATED_DATE + return CREATED_DATE; + case 7: // PAYLOAD + return PAYLOAD; + case 8: // ROLE + return ROLE; + case 9: // DRUID_VERSION + return DRUID_VERSION; + case 10: // ENVIRONMENT + return ENVIRONMENT; + case 11: // DATACENTER + return DATACENTER; + case 12: // CLUSTER_NAME + return CLUSTER_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final _Fields optionals[] = {_Fields.ROLE,_Fields.DRUID_VERSION,_Fields.ENVIRONMENT,_Fields.DATACENTER,_Fields.CLUSTER_NAME}; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.AUDIT_KEY, new org.apache.thrift.meta_data.FieldMetaData("audit_key", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AUDIT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("audit_type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.AUTHOR, new org.apache.thrift.meta_data.FieldMetaData("author", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.COMMENT, new org.apache.thrift.meta_data.FieldMetaData("comment", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.REMOTE_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("remote_address", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CREATED_DATE, new org.apache.thrift.meta_data.FieldMetaData("created_date", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.PAYLOAD, new org.apache.thrift.meta_data.FieldMetaData("payload", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DRUID_VERSION, new org.apache.thrift.meta_data.FieldMetaData("druid_version", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ENVIRONMENT, new org.apache.thrift.meta_data.FieldMetaData("environment", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DATACENTER, new org.apache.thrift.meta_data.FieldMetaData("datacenter", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CLUSTER_NAME, new org.apache.thrift.meta_data.FieldMetaData("cluster_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DruidAdminLogEvent.class, metaDataMap); + } + + public DruidAdminLogEvent() { + } + + public DruidAdminLogEvent( + java.lang.String audit_key, + java.lang.String audit_type, + java.lang.String author, + java.lang.String comment, + java.lang.String remote_address, + java.lang.String created_date, + java.lang.String payload) + { + this(); + this.audit_key = audit_key; + this.audit_type = audit_type; + this.author = author; + this.comment = comment; + this.remote_address = remote_address; + this.created_date = created_date; + this.payload = payload; + } + + /** + * Performs a deep copy on other. + */ + public DruidAdminLogEvent(DruidAdminLogEvent other) { + if (other.isSetAudit_key()) { + this.audit_key = other.audit_key; + } + if (other.isSetAudit_type()) { + this.audit_type = other.audit_type; + } + if (other.isSetAuthor()) { + this.author = other.author; + } + if (other.isSetComment()) { + this.comment = other.comment; + } + if (other.isSetRemote_address()) { + this.remote_address = other.remote_address; + } + if (other.isSetCreated_date()) { + this.created_date = other.created_date; + } + if (other.isSetPayload()) { + this.payload = other.payload; + } + if (other.isSetRole()) { + this.role = other.role; + } + if (other.isSetDruid_version()) { + this.druid_version = other.druid_version; + } + if (other.isSetEnvironment()) { + this.environment = other.environment; + } + if (other.isSetDatacenter()) { + this.datacenter = other.datacenter; + } + if (other.isSetCluster_name()) { + this.cluster_name = other.cluster_name; + } + } + + public DruidAdminLogEvent deepCopy() { + return new DruidAdminLogEvent(this); + } + + @Override + public void clear() { + this.audit_key = null; + this.audit_type = null; + this.author = null; + this.comment = null; + this.remote_address = null; + this.created_date = null; + this.payload = null; + this.role = null; + this.druid_version = null; + this.environment = null; + this.datacenter = null; + this.cluster_name = null; + } + + public java.lang.String getAudit_key() { + return this.audit_key; + } + + public DruidAdminLogEvent setAudit_key(java.lang.String audit_key) { + this.audit_key = audit_key; + return this; + } + + public void unsetAudit_key() { + this.audit_key = null; + } + + /** Returns true if field audit_key is set (has been assigned a value) and false otherwise */ + public boolean isSetAudit_key() { + return this.audit_key != null; + } + + public void setAudit_keyIsSet(boolean value) { + if (!value) { + this.audit_key = null; + } + } + + public java.lang.String getAudit_type() { + return this.audit_type; + } + + public DruidAdminLogEvent setAudit_type(java.lang.String audit_type) { + this.audit_type = audit_type; + return this; + } + + public void unsetAudit_type() { + this.audit_type = null; + } + + /** Returns true if field audit_type is set (has been assigned a value) and false otherwise */ + public boolean isSetAudit_type() { + return this.audit_type != null; + } + + public void setAudit_typeIsSet(boolean value) { + if (!value) { + this.audit_type = null; + } + } + + public java.lang.String getAuthor() { + return this.author; + } + + public DruidAdminLogEvent setAuthor(java.lang.String author) { + this.author = author; + return this; + } + + public void unsetAuthor() { + this.author = null; + } + + /** Returns true if field author is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthor() { + return this.author != null; + } + + public void setAuthorIsSet(boolean value) { + if (!value) { + this.author = null; + } + } + + public java.lang.String getComment() { + return this.comment; + } + + public DruidAdminLogEvent setComment(java.lang.String comment) { + this.comment = comment; + return this; + } + + public void unsetComment() { + this.comment = null; + } + + /** Returns true if field comment is set (has been assigned a value) and false otherwise */ + public boolean isSetComment() { + return this.comment != null; + } + + public void setCommentIsSet(boolean value) { + if (!value) { + this.comment = null; + } + } + + public java.lang.String getRemote_address() { + return this.remote_address; + } + + public DruidAdminLogEvent setRemote_address(java.lang.String remote_address) { + this.remote_address = remote_address; + return this; + } + + public void unsetRemote_address() { + this.remote_address = null; + } + + /** Returns true if field remote_address is set (has been assigned a value) and false otherwise */ + public boolean isSetRemote_address() { + return this.remote_address != null; + } + + public void setRemote_addressIsSet(boolean value) { + if (!value) { + this.remote_address = null; + } + } + + public java.lang.String getCreated_date() { + return this.created_date; + } + + public DruidAdminLogEvent setCreated_date(java.lang.String created_date) { + this.created_date = created_date; + return this; + } + + public void unsetCreated_date() { + this.created_date = null; + } + + /** Returns true if field created_date is set (has been assigned a value) and false otherwise */ + public boolean isSetCreated_date() { + return this.created_date != null; + } + + public void setCreated_dateIsSet(boolean value) { + if (!value) { + this.created_date = null; + } + } + + public java.lang.String getPayload() { + return this.payload; + } + + public DruidAdminLogEvent setPayload(java.lang.String payload) { + this.payload = payload; + return this; + } + + public void unsetPayload() { + this.payload = null; + } + + /** Returns true if field payload is set (has been assigned a value) and false otherwise */ + public boolean isSetPayload() { + return this.payload != null; + } + + public void setPayloadIsSet(boolean value) { + if (!value) { + this.payload = null; + } + } + + public java.lang.String getRole() { + return this.role; + } + + public DruidAdminLogEvent setRole(java.lang.String role) { + this.role = role; + return this; + } + + public void unsetRole() { + this.role = null; + } + + /** Returns true if field role is set (has been assigned a value) and false otherwise */ + public boolean isSetRole() { + return this.role != null; + } + + public void setRoleIsSet(boolean value) { + if (!value) { + this.role = null; + } + } + + public java.lang.String getDruid_version() { + return this.druid_version; + } + + public DruidAdminLogEvent setDruid_version(java.lang.String druid_version) { + this.druid_version = druid_version; + return this; + } + + public void unsetDruid_version() { + this.druid_version = null; + } + + /** Returns true if field druid_version is set (has been assigned a value) and false otherwise */ + public boolean isSetDruid_version() { + return this.druid_version != null; + } + + public void setDruid_versionIsSet(boolean value) { + if (!value) { + this.druid_version = null; + } + } + + public java.lang.String getEnvironment() { + return this.environment; + } + + public DruidAdminLogEvent setEnvironment(java.lang.String environment) { + this.environment = environment; + return this; + } + + public void unsetEnvironment() { + this.environment = null; + } + + /** Returns true if field environment is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment() { + return this.environment != null; + } + + public void setEnvironmentIsSet(boolean value) { + if (!value) { + this.environment = null; + } + } + + public java.lang.String getDatacenter() { + return this.datacenter; + } + + public DruidAdminLogEvent setDatacenter(java.lang.String datacenter) { + this.datacenter = datacenter; + return this; + } + + public void unsetDatacenter() { + this.datacenter = null; + } + + /** Returns true if field datacenter is set (has been assigned a value) and false otherwise */ + public boolean isSetDatacenter() { + return this.datacenter != null; + } + + public void setDatacenterIsSet(boolean value) { + if (!value) { + this.datacenter = null; + } + } + + public java.lang.String getCluster_name() { + return this.cluster_name; + } + + public DruidAdminLogEvent setCluster_name(java.lang.String cluster_name) { + this.cluster_name = cluster_name; + return this; + } + + public void unsetCluster_name() { + this.cluster_name = null; + } + + /** Returns true if field cluster_name is set (has been assigned a value) and false otherwise */ + public boolean isSetCluster_name() { + return this.cluster_name != null; + } + + public void setCluster_nameIsSet(boolean value) { + if (!value) { + this.cluster_name = null; + } + } + + public void setFieldValue(_Fields field, java.lang.Object value) { + switch (field) { + case AUDIT_KEY: + if (value == null) { + unsetAudit_key(); + } else { + setAudit_key((java.lang.String)value); + } + break; + + case AUDIT_TYPE: + if (value == null) { + unsetAudit_type(); + } else { + setAudit_type((java.lang.String)value); + } + break; + + case AUTHOR: + if (value == null) { + unsetAuthor(); + } else { + setAuthor((java.lang.String)value); + } + break; + + case COMMENT: + if (value == null) { + unsetComment(); + } else { + setComment((java.lang.String)value); + } + break; + + case REMOTE_ADDRESS: + if (value == null) { + unsetRemote_address(); + } else { + setRemote_address((java.lang.String)value); + } + break; + + case CREATED_DATE: + if (value == null) { + unsetCreated_date(); + } else { + setCreated_date((java.lang.String)value); + } + break; + + case PAYLOAD: + if (value == null) { + unsetPayload(); + } else { + setPayload((java.lang.String)value); + } + break; + + case ROLE: + if (value == null) { + unsetRole(); + } else { + setRole((java.lang.String)value); + } + break; + + case DRUID_VERSION: + if (value == null) { + unsetDruid_version(); + } else { + setDruid_version((java.lang.String)value); + } + break; + + case ENVIRONMENT: + if (value == null) { + unsetEnvironment(); + } else { + setEnvironment((java.lang.String)value); + } + break; + + case DATACENTER: + if (value == null) { + unsetDatacenter(); + } else { + setDatacenter((java.lang.String)value); + } + break; + + case CLUSTER_NAME: + if (value == null) { + unsetCluster_name(); + } else { + setCluster_name((java.lang.String)value); + } + break; + + } + } + + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case AUDIT_KEY: + return getAudit_key(); + + case AUDIT_TYPE: + return getAudit_type(); + + case AUTHOR: + return getAuthor(); + + case COMMENT: + return getComment(); + + case REMOTE_ADDRESS: + return getRemote_address(); + + case CREATED_DATE: + return getCreated_date(); + + case PAYLOAD: + return getPayload(); + + case ROLE: + return getRole(); + + case DRUID_VERSION: + return getDruid_version(); + + case ENVIRONMENT: + return getEnvironment(); + + case DATACENTER: + return getDatacenter(); + + case CLUSTER_NAME: + return getCluster_name(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case AUDIT_KEY: + return isSetAudit_key(); + case AUDIT_TYPE: + return isSetAudit_type(); + case AUTHOR: + return isSetAuthor(); + case COMMENT: + return isSetComment(); + case REMOTE_ADDRESS: + return isSetRemote_address(); + case CREATED_DATE: + return isSetCreated_date(); + case PAYLOAD: + return isSetPayload(); + case ROLE: + return isSetRole(); + case DRUID_VERSION: + return isSetDruid_version(); + case ENVIRONMENT: + return isSetEnvironment(); + case DATACENTER: + return isSetDatacenter(); + case CLUSTER_NAME: + return isSetCluster_name(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that == null) + return false; + if (that instanceof DruidAdminLogEvent) + return this.equals((DruidAdminLogEvent)that); + return false; + } + + public boolean equals(DruidAdminLogEvent that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_audit_key = true && this.isSetAudit_key(); + boolean that_present_audit_key = true && that.isSetAudit_key(); + if (this_present_audit_key || that_present_audit_key) { + if (!(this_present_audit_key && that_present_audit_key)) + return false; + if (!this.audit_key.equals(that.audit_key)) + return false; + } + + boolean this_present_audit_type = true && this.isSetAudit_type(); + boolean that_present_audit_type = true && that.isSetAudit_type(); + if (this_present_audit_type || that_present_audit_type) { + if (!(this_present_audit_type && that_present_audit_type)) + return false; + if (!this.audit_type.equals(that.audit_type)) + return false; + } + + boolean this_present_author = true && this.isSetAuthor(); + boolean that_present_author = true && that.isSetAuthor(); + if (this_present_author || that_present_author) { + if (!(this_present_author && that_present_author)) + return false; + if (!this.author.equals(that.author)) + return false; + } + + boolean this_present_comment = true && this.isSetComment(); + boolean that_present_comment = true && that.isSetComment(); + if (this_present_comment || that_present_comment) { + if (!(this_present_comment && that_present_comment)) + return false; + if (!this.comment.equals(that.comment)) + return false; + } + + boolean this_present_remote_address = true && this.isSetRemote_address(); + boolean that_present_remote_address = true && that.isSetRemote_address(); + if (this_present_remote_address || that_present_remote_address) { + if (!(this_present_remote_address && that_present_remote_address)) + return false; + if (!this.remote_address.equals(that.remote_address)) + return false; + } + + boolean this_present_created_date = true && this.isSetCreated_date(); + boolean that_present_created_date = true && that.isSetCreated_date(); + if (this_present_created_date || that_present_created_date) { + if (!(this_present_created_date && that_present_created_date)) + return false; + if (!this.created_date.equals(that.created_date)) + return false; + } + + boolean this_present_payload = true && this.isSetPayload(); + boolean that_present_payload = true && that.isSetPayload(); + if (this_present_payload || that_present_payload) { + if (!(this_present_payload && that_present_payload)) + return false; + if (!this.payload.equals(that.payload)) + return false; + } + + boolean this_present_role = true && this.isSetRole(); + boolean that_present_role = true && that.isSetRole(); + if (this_present_role || that_present_role) { + if (!(this_present_role && that_present_role)) + return false; + if (!this.role.equals(that.role)) + return false; + } + + boolean this_present_druid_version = true && this.isSetDruid_version(); + boolean that_present_druid_version = true && that.isSetDruid_version(); + if (this_present_druid_version || that_present_druid_version) { + if (!(this_present_druid_version && that_present_druid_version)) + return false; + if (!this.druid_version.equals(that.druid_version)) + return false; + } + + boolean this_present_environment = true && this.isSetEnvironment(); + boolean that_present_environment = true && that.isSetEnvironment(); + if (this_present_environment || that_present_environment) { + if (!(this_present_environment && that_present_environment)) + return false; + if (!this.environment.equals(that.environment)) + return false; + } + + boolean this_present_datacenter = true && this.isSetDatacenter(); + boolean that_present_datacenter = true && that.isSetDatacenter(); + if (this_present_datacenter || that_present_datacenter) { + if (!(this_present_datacenter && that_present_datacenter)) + return false; + if (!this.datacenter.equals(that.datacenter)) + return false; + } + + boolean this_present_cluster_name = true && this.isSetCluster_name(); + boolean that_present_cluster_name = true && that.isSetCluster_name(); + if (this_present_cluster_name || that_present_cluster_name) { + if (!(this_present_cluster_name && that_present_cluster_name)) + return false; + if (!this.cluster_name.equals(that.cluster_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetAudit_key()) ? 131071 : 524287); + if (isSetAudit_key()) + hashCode = hashCode * 8191 + audit_key.hashCode(); + + hashCode = hashCode * 8191 + ((isSetAudit_type()) ? 131071 : 524287); + if (isSetAudit_type()) + hashCode = hashCode * 8191 + audit_type.hashCode(); + + hashCode = hashCode * 8191 + ((isSetAuthor()) ? 131071 : 524287); + if (isSetAuthor()) + hashCode = hashCode * 8191 + author.hashCode(); + + hashCode = hashCode * 8191 + ((isSetComment()) ? 131071 : 524287); + if (isSetComment()) + hashCode = hashCode * 8191 + comment.hashCode(); + + hashCode = hashCode * 8191 + ((isSetRemote_address()) ? 131071 : 524287); + if (isSetRemote_address()) + hashCode = hashCode * 8191 + remote_address.hashCode(); + + hashCode = hashCode * 8191 + ((isSetCreated_date()) ? 131071 : 524287); + if (isSetCreated_date()) + hashCode = hashCode * 8191 + created_date.hashCode(); + + hashCode = hashCode * 8191 + ((isSetPayload()) ? 131071 : 524287); + if (isSetPayload()) + hashCode = hashCode * 8191 + payload.hashCode(); + + hashCode = hashCode * 8191 + ((isSetRole()) ? 131071 : 524287); + if (isSetRole()) + hashCode = hashCode * 8191 + role.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDruid_version()) ? 131071 : 524287); + if (isSetDruid_version()) + hashCode = hashCode * 8191 + druid_version.hashCode(); + + hashCode = hashCode * 8191 + ((isSetEnvironment()) ? 131071 : 524287); + if (isSetEnvironment()) + hashCode = hashCode * 8191 + environment.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDatacenter()) ? 131071 : 524287); + if (isSetDatacenter()) + hashCode = hashCode * 8191 + datacenter.hashCode(); + + hashCode = hashCode * 8191 + ((isSetCluster_name()) ? 131071 : 524287); + if (isSetCluster_name()) + hashCode = hashCode * 8191 + cluster_name.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(DruidAdminLogEvent other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.valueOf(isSetAudit_key()).compareTo(other.isSetAudit_key()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAudit_key()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.audit_key, other.audit_key); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetAudit_type()).compareTo(other.isSetAudit_type()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAudit_type()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.audit_type, other.audit_type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetAuthor()).compareTo(other.isSetAuthor()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAuthor()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.author, other.author); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetComment()).compareTo(other.isSetComment()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetComment()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, other.comment); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetRemote_address()).compareTo(other.isSetRemote_address()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRemote_address()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remote_address, other.remote_address); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetCreated_date()).compareTo(other.isSetCreated_date()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreated_date()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.created_date, other.created_date); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetPayload()).compareTo(other.isSetPayload()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPayload()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.payload, other.payload); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetRole()).compareTo(other.isSetRole()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRole()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, other.role); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetDruid_version()).compareTo(other.isSetDruid_version()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDruid_version()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.druid_version, other.druid_version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetEnvironment()).compareTo(other.isSetEnvironment()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment, other.environment); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetDatacenter()).compareTo(other.isSetDatacenter()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatacenter()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.datacenter, other.datacenter); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetCluster_name()).compareTo(other.isSetCluster_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCluster_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cluster_name, other.cluster_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("DruidAdminLogEvent("); + boolean first = true; + + sb.append("audit_key:"); + if (this.audit_key == null) { + sb.append("null"); + } else { + sb.append(this.audit_key); + } + first = false; + if (!first) sb.append(", "); + sb.append("audit_type:"); + if (this.audit_type == null) { + sb.append("null"); + } else { + sb.append(this.audit_type); + } + first = false; + if (!first) sb.append(", "); + sb.append("author:"); + if (this.author == null) { + sb.append("null"); + } else { + sb.append(this.author); + } + first = false; + if (!first) sb.append(", "); + sb.append("comment:"); + if (this.comment == null) { + sb.append("null"); + } else { + sb.append(this.comment); + } + first = false; + if (!first) sb.append(", "); + sb.append("remote_address:"); + if (this.remote_address == null) { + sb.append("null"); + } else { + sb.append(this.remote_address); + } + first = false; + if (!first) sb.append(", "); + sb.append("created_date:"); + if (this.created_date == null) { + sb.append("null"); + } else { + sb.append(this.created_date); + } + first = false; + if (!first) sb.append(", "); + sb.append("payload:"); + if (this.payload == null) { + sb.append("null"); + } else { + sb.append(this.payload); + } + first = false; + if (isSetRole()) { + if (!first) sb.append(", "); + sb.append("role:"); + if (this.role == null) { + sb.append("null"); + } else { + sb.append(this.role); + } + first = false; + } + if (isSetDruid_version()) { + if (!first) sb.append(", "); + sb.append("druid_version:"); + if (this.druid_version == null) { + sb.append("null"); + } else { + sb.append(this.druid_version); + } + first = false; + } + if (isSetEnvironment()) { + if (!first) sb.append(", "); + sb.append("environment:"); + if (this.environment == null) { + sb.append("null"); + } else { + sb.append(this.environment); + } + first = false; + } + if (isSetDatacenter()) { + if (!first) sb.append(", "); + sb.append("datacenter:"); + if (this.datacenter == null) { + sb.append("null"); + } else { + sb.append(this.datacenter); + } + first = false; + } + if (isSetCluster_name()) { + if (!first) sb.append(", "); + sb.append("cluster_name:"); + if (this.cluster_name == null) { + sb.append("null"); + } else { + sb.append(this.cluster_name); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (audit_key == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'audit_key' was not present! Struct: " + toString()); + } + if (audit_type == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'audit_type' was not present! Struct: " + toString()); + } + if (author == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'author' was not present! Struct: " + toString()); + } + if (comment == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'comment' was not present! Struct: " + toString()); + } + if (remote_address == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'remote_address' was not present! Struct: " + toString()); + } + if (created_date == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'created_date' was not present! Struct: " + toString()); + } + if (payload == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'payload' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class DruidAdminLogEventStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public DruidAdminLogEventStandardScheme getScheme() { + return new DruidAdminLogEventStandardScheme(); + } + } + + private static class DruidAdminLogEventStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, DruidAdminLogEvent struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // AUDIT_KEY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.audit_key = iprot.readString(); + struct.setAudit_keyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // AUDIT_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.audit_type = iprot.readString(); + struct.setAudit_typeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // AUTHOR + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.author = iprot.readString(); + struct.setAuthorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // COMMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.comment = iprot.readString(); + struct.setCommentIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // REMOTE_ADDRESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.remote_address = iprot.readString(); + struct.setRemote_addressIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // CREATED_DATE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.created_date = iprot.readString(); + struct.setCreated_dateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // PAYLOAD + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.payload = iprot.readString(); + struct.setPayloadIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // ROLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.role = iprot.readString(); + struct.setRoleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // DRUID_VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.druid_version = iprot.readString(); + struct.setDruid_versionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // ENVIRONMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.environment = iprot.readString(); + struct.setEnvironmentIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // DATACENTER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.datacenter = iprot.readString(); + struct.setDatacenterIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // CLUSTER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.cluster_name = iprot.readString(); + struct.setCluster_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, DruidAdminLogEvent struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.audit_key != null) { + oprot.writeFieldBegin(AUDIT_KEY_FIELD_DESC); + oprot.writeString(struct.audit_key); + oprot.writeFieldEnd(); + } + if (struct.audit_type != null) { + oprot.writeFieldBegin(AUDIT_TYPE_FIELD_DESC); + oprot.writeString(struct.audit_type); + oprot.writeFieldEnd(); + } + if (struct.author != null) { + oprot.writeFieldBegin(AUTHOR_FIELD_DESC); + oprot.writeString(struct.author); + oprot.writeFieldEnd(); + } + if (struct.comment != null) { + oprot.writeFieldBegin(COMMENT_FIELD_DESC); + oprot.writeString(struct.comment); + oprot.writeFieldEnd(); + } + if (struct.remote_address != null) { + oprot.writeFieldBegin(REMOTE_ADDRESS_FIELD_DESC); + oprot.writeString(struct.remote_address); + oprot.writeFieldEnd(); + } + if (struct.created_date != null) { + oprot.writeFieldBegin(CREATED_DATE_FIELD_DESC); + oprot.writeString(struct.created_date); + oprot.writeFieldEnd(); + } + if (struct.payload != null) { + oprot.writeFieldBegin(PAYLOAD_FIELD_DESC); + oprot.writeString(struct.payload); + oprot.writeFieldEnd(); + } + if (struct.role != null) { + if (struct.isSetRole()) { + oprot.writeFieldBegin(ROLE_FIELD_DESC); + oprot.writeString(struct.role); + oprot.writeFieldEnd(); + } + } + if (struct.druid_version != null) { + if (struct.isSetDruid_version()) { + oprot.writeFieldBegin(DRUID_VERSION_FIELD_DESC); + oprot.writeString(struct.druid_version); + oprot.writeFieldEnd(); + } + } + if (struct.environment != null) { + if (struct.isSetEnvironment()) { + oprot.writeFieldBegin(ENVIRONMENT_FIELD_DESC); + oprot.writeString(struct.environment); + oprot.writeFieldEnd(); + } + } + if (struct.datacenter != null) { + if (struct.isSetDatacenter()) { + oprot.writeFieldBegin(DATACENTER_FIELD_DESC); + oprot.writeString(struct.datacenter); + oprot.writeFieldEnd(); + } + } + if (struct.cluster_name != null) { + if (struct.isSetCluster_name()) { + oprot.writeFieldBegin(CLUSTER_NAME_FIELD_DESC); + oprot.writeString(struct.cluster_name); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DruidAdminLogEventTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public DruidAdminLogEventTupleScheme getScheme() { + return new DruidAdminLogEventTupleScheme(); + } + } + + private static class DruidAdminLogEventTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, DruidAdminLogEvent struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeString(struct.audit_key); + oprot.writeString(struct.audit_type); + oprot.writeString(struct.author); + oprot.writeString(struct.comment); + oprot.writeString(struct.remote_address); + oprot.writeString(struct.created_date); + oprot.writeString(struct.payload); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetRole()) { + optionals.set(0); + } + if (struct.isSetDruid_version()) { + optionals.set(1); + } + if (struct.isSetEnvironment()) { + optionals.set(2); + } + if (struct.isSetDatacenter()) { + optionals.set(3); + } + if (struct.isSetCluster_name()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetRole()) { + oprot.writeString(struct.role); + } + if (struct.isSetDruid_version()) { + oprot.writeString(struct.druid_version); + } + if (struct.isSetEnvironment()) { + oprot.writeString(struct.environment); + } + if (struct.isSetDatacenter()) { + oprot.writeString(struct.datacenter); + } + if (struct.isSetCluster_name()) { + oprot.writeString(struct.cluster_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, DruidAdminLogEvent struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.audit_key = iprot.readString(); + struct.setAudit_keyIsSet(true); + struct.audit_type = iprot.readString(); + struct.setAudit_typeIsSet(true); + struct.author = iprot.readString(); + struct.setAuthorIsSet(true); + struct.comment = iprot.readString(); + struct.setCommentIsSet(true); + struct.remote_address = iprot.readString(); + struct.setRemote_addressIsSet(true); + struct.created_date = iprot.readString(); + struct.setCreated_dateIsSet(true); + struct.payload = iprot.readString(); + struct.setPayloadIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.role = iprot.readString(); + struct.setRoleIsSet(true); + } + if (incoming.get(1)) { + struct.druid_version = iprot.readString(); + struct.setDruid_versionIsSet(true); + } + if (incoming.get(2)) { + struct.environment = iprot.readString(); + struct.setEnvironmentIsSet(true); + } + if (incoming.get(3)) { + struct.datacenter = iprot.readString(); + struct.setDatacenterIsSet(true); + } + if (incoming.get(4)) { + struct.cluster_name = iprot.readString(); + struct.setCluster_nameIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/extensions-twitter/scribe-emitter/src/main/java/org/apache/druid/emitter/scribe/DruidIndexingLogEvent.java b/extensions-twitter/scribe-emitter/src/main/java/org/apache/druid/emitter/scribe/DruidIndexingLogEvent.java new file mode 100644 index 000000000000..a2192606c319 --- /dev/null +++ b/extensions-twitter/scribe-emitter/src/main/java/org/apache/druid/emitter/scribe/DruidIndexingLogEvent.java @@ -0,0 +1,1489 @@ +/** + * Autogenerated by Thrift Compiler (0.11.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.druid.emitter.scribe; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)", date = "2024-10-24") +public class DruidIndexingLogEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DruidIndexingLogEvent"); + + private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("task_id", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TASK_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("task_type", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField DATASOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("datasource", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField TASK_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("task_status", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField DURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("duration", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creation_time", org.apache.thrift.protocol.TType.I64, (short)6); + private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)7); + private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.STRING, (short)8); + private static final org.apache.thrift.protocol.TField DRUID_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("druid_version", org.apache.thrift.protocol.TType.STRING, (short)9); + private static final org.apache.thrift.protocol.TField ENVIRONMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField DATACENTER_FIELD_DESC = new org.apache.thrift.protocol.TField("datacenter", org.apache.thrift.protocol.TType.STRING, (short)11); + private static final org.apache.thrift.protocol.TField CLUSTER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("cluster_name", org.apache.thrift.protocol.TType.STRING, (short)12); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DruidIndexingLogEventStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DruidIndexingLogEventTupleSchemeFactory(); + + public java.lang.String task_id; // required + public java.lang.String task_type; // required + public java.lang.String datasource; // required + public java.lang.String task_status; // required + public long duration; // required + public long creation_time; // required + public java.lang.String owner; // required + public java.lang.String role; // optional + public java.lang.String druid_version; // optional + public java.lang.String environment; // optional + public java.lang.String datacenter; // optional + public java.lang.String cluster_name; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TASK_ID((short)1, "task_id"), + TASK_TYPE((short)2, "task_type"), + DATASOURCE((short)3, "datasource"), + TASK_STATUS((short)4, "task_status"), + DURATION((short)5, "duration"), + CREATION_TIME((short)6, "creation_time"), + OWNER((short)7, "owner"), + ROLE((short)8, "role"), + DRUID_VERSION((short)9, "druid_version"), + ENVIRONMENT((short)10, "environment"), + DATACENTER((short)11, "datacenter"), + CLUSTER_NAME((short)12, "cluster_name"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TASK_ID + return TASK_ID; + case 2: // TASK_TYPE + return TASK_TYPE; + case 3: // DATASOURCE + return DATASOURCE; + case 4: // TASK_STATUS + return TASK_STATUS; + case 5: // DURATION + return DURATION; + case 6: // CREATION_TIME + return CREATION_TIME; + case 7: // OWNER + return OWNER; + case 8: // ROLE + return ROLE; + case 9: // DRUID_VERSION + return DRUID_VERSION; + case 10: // ENVIRONMENT + return ENVIRONMENT; + case 11: // DATACENTER + return DATACENTER; + case 12: // CLUSTER_NAME + return CLUSTER_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __DURATION_ISSET_ID = 0; + private static final int __CREATION_TIME_ISSET_ID = 1; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.ROLE,_Fields.DRUID_VERSION,_Fields.ENVIRONMENT,_Fields.DATACENTER,_Fields.CLUSTER_NAME}; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("task_id", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TASK_TYPE, new org.apache.thrift.meta_data.FieldMetaData("task_type", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DATASOURCE, new org.apache.thrift.meta_data.FieldMetaData("datasource", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TASK_STATUS, new org.apache.thrift.meta_data.FieldMetaData("task_status", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DURATION, new org.apache.thrift.meta_data.FieldMetaData("duration", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creation_time", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.OWNER, new org.apache.thrift.meta_data.FieldMetaData("owner", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DRUID_VERSION, new org.apache.thrift.meta_data.FieldMetaData("druid_version", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ENVIRONMENT, new org.apache.thrift.meta_data.FieldMetaData("environment", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DATACENTER, new org.apache.thrift.meta_data.FieldMetaData("datacenter", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CLUSTER_NAME, new org.apache.thrift.meta_data.FieldMetaData("cluster_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DruidIndexingLogEvent.class, metaDataMap); + } + + public DruidIndexingLogEvent() { + } + + public DruidIndexingLogEvent( + java.lang.String task_id, + java.lang.String task_type, + java.lang.String datasource, + java.lang.String task_status, + long duration, + long creation_time, + java.lang.String owner) + { + this(); + this.task_id = task_id; + this.task_type = task_type; + this.datasource = datasource; + this.task_status = task_status; + this.duration = duration; + setDurationIsSet(true); + this.creation_time = creation_time; + setCreation_timeIsSet(true); + this.owner = owner; + } + + /** + * Performs a deep copy on other. + */ + public DruidIndexingLogEvent(DruidIndexingLogEvent other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetTask_id()) { + this.task_id = other.task_id; + } + if (other.isSetTask_type()) { + this.task_type = other.task_type; + } + if (other.isSetDatasource()) { + this.datasource = other.datasource; + } + if (other.isSetTask_status()) { + this.task_status = other.task_status; + } + this.duration = other.duration; + this.creation_time = other.creation_time; + if (other.isSetOwner()) { + this.owner = other.owner; + } + if (other.isSetRole()) { + this.role = other.role; + } + if (other.isSetDruid_version()) { + this.druid_version = other.druid_version; + } + if (other.isSetEnvironment()) { + this.environment = other.environment; + } + if (other.isSetDatacenter()) { + this.datacenter = other.datacenter; + } + if (other.isSetCluster_name()) { + this.cluster_name = other.cluster_name; + } + } + + public DruidIndexingLogEvent deepCopy() { + return new DruidIndexingLogEvent(this); + } + + @Override + public void clear() { + this.task_id = null; + this.task_type = null; + this.datasource = null; + this.task_status = null; + setDurationIsSet(false); + this.duration = 0; + setCreation_timeIsSet(false); + this.creation_time = 0; + this.owner = null; + this.role = null; + this.druid_version = null; + this.environment = null; + this.datacenter = null; + this.cluster_name = null; + } + + public java.lang.String getTask_id() { + return this.task_id; + } + + public DruidIndexingLogEvent setTask_id(java.lang.String task_id) { + this.task_id = task_id; + return this; + } + + public void unsetTask_id() { + this.task_id = null; + } + + /** Returns true if field task_id is set (has been assigned a value) and false otherwise */ + public boolean isSetTask_id() { + return this.task_id != null; + } + + public void setTask_idIsSet(boolean value) { + if (!value) { + this.task_id = null; + } + } + + public java.lang.String getTask_type() { + return this.task_type; + } + + public DruidIndexingLogEvent setTask_type(java.lang.String task_type) { + this.task_type = task_type; + return this; + } + + public void unsetTask_type() { + this.task_type = null; + } + + /** Returns true if field task_type is set (has been assigned a value) and false otherwise */ + public boolean isSetTask_type() { + return this.task_type != null; + } + + public void setTask_typeIsSet(boolean value) { + if (!value) { + this.task_type = null; + } + } + + public java.lang.String getDatasource() { + return this.datasource; + } + + public DruidIndexingLogEvent setDatasource(java.lang.String datasource) { + this.datasource = datasource; + return this; + } + + public void unsetDatasource() { + this.datasource = null; + } + + /** Returns true if field datasource is set (has been assigned a value) and false otherwise */ + public boolean isSetDatasource() { + return this.datasource != null; + } + + public void setDatasourceIsSet(boolean value) { + if (!value) { + this.datasource = null; + } + } + + public java.lang.String getTask_status() { + return this.task_status; + } + + public DruidIndexingLogEvent setTask_status(java.lang.String task_status) { + this.task_status = task_status; + return this; + } + + public void unsetTask_status() { + this.task_status = null; + } + + /** Returns true if field task_status is set (has been assigned a value) and false otherwise */ + public boolean isSetTask_status() { + return this.task_status != null; + } + + public void setTask_statusIsSet(boolean value) { + if (!value) { + this.task_status = null; + } + } + + public long getDuration() { + return this.duration; + } + + public DruidIndexingLogEvent setDuration(long duration) { + this.duration = duration; + setDurationIsSet(true); + return this; + } + + public void unsetDuration() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DURATION_ISSET_ID); + } + + /** Returns true if field duration is set (has been assigned a value) and false otherwise */ + public boolean isSetDuration() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DURATION_ISSET_ID); + } + + public void setDurationIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DURATION_ISSET_ID, value); + } + + public long getCreation_time() { + return this.creation_time; + } + + public DruidIndexingLogEvent setCreation_time(long creation_time) { + this.creation_time = creation_time; + setCreation_timeIsSet(true); + return this; + } + + public void unsetCreation_time() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATION_TIME_ISSET_ID); + } + + /** Returns true if field creation_time is set (has been assigned a value) and false otherwise */ + public boolean isSetCreation_time() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATION_TIME_ISSET_ID); + } + + public void setCreation_timeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATION_TIME_ISSET_ID, value); + } + + public java.lang.String getOwner() { + return this.owner; + } + + public DruidIndexingLogEvent setOwner(java.lang.String owner) { + this.owner = owner; + return this; + } + + public void unsetOwner() { + this.owner = null; + } + + /** Returns true if field owner is set (has been assigned a value) and false otherwise */ + public boolean isSetOwner() { + return this.owner != null; + } + + public void setOwnerIsSet(boolean value) { + if (!value) { + this.owner = null; + } + } + + public java.lang.String getRole() { + return this.role; + } + + public DruidIndexingLogEvent setRole(java.lang.String role) { + this.role = role; + return this; + } + + public void unsetRole() { + this.role = null; + } + + /** Returns true if field role is set (has been assigned a value) and false otherwise */ + public boolean isSetRole() { + return this.role != null; + } + + public void setRoleIsSet(boolean value) { + if (!value) { + this.role = null; + } + } + + public java.lang.String getDruid_version() { + return this.druid_version; + } + + public DruidIndexingLogEvent setDruid_version(java.lang.String druid_version) { + this.druid_version = druid_version; + return this; + } + + public void unsetDruid_version() { + this.druid_version = null; + } + + /** Returns true if field druid_version is set (has been assigned a value) and false otherwise */ + public boolean isSetDruid_version() { + return this.druid_version != null; + } + + public void setDruid_versionIsSet(boolean value) { + if (!value) { + this.druid_version = null; + } + } + + public java.lang.String getEnvironment() { + return this.environment; + } + + public DruidIndexingLogEvent setEnvironment(java.lang.String environment) { + this.environment = environment; + return this; + } + + public void unsetEnvironment() { + this.environment = null; + } + + /** Returns true if field environment is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment() { + return this.environment != null; + } + + public void setEnvironmentIsSet(boolean value) { + if (!value) { + this.environment = null; + } + } + + public java.lang.String getDatacenter() { + return this.datacenter; + } + + public DruidIndexingLogEvent setDatacenter(java.lang.String datacenter) { + this.datacenter = datacenter; + return this; + } + + public void unsetDatacenter() { + this.datacenter = null; + } + + /** Returns true if field datacenter is set (has been assigned a value) and false otherwise */ + public boolean isSetDatacenter() { + return this.datacenter != null; + } + + public void setDatacenterIsSet(boolean value) { + if (!value) { + this.datacenter = null; + } + } + + public java.lang.String getCluster_name() { + return this.cluster_name; + } + + public DruidIndexingLogEvent setCluster_name(java.lang.String cluster_name) { + this.cluster_name = cluster_name; + return this; + } + + public void unsetCluster_name() { + this.cluster_name = null; + } + + /** Returns true if field cluster_name is set (has been assigned a value) and false otherwise */ + public boolean isSetCluster_name() { + return this.cluster_name != null; + } + + public void setCluster_nameIsSet(boolean value) { + if (!value) { + this.cluster_name = null; + } + } + + public void setFieldValue(_Fields field, java.lang.Object value) { + switch (field) { + case TASK_ID: + if (value == null) { + unsetTask_id(); + } else { + setTask_id((java.lang.String)value); + } + break; + + case TASK_TYPE: + if (value == null) { + unsetTask_type(); + } else { + setTask_type((java.lang.String)value); + } + break; + + case DATASOURCE: + if (value == null) { + unsetDatasource(); + } else { + setDatasource((java.lang.String)value); + } + break; + + case TASK_STATUS: + if (value == null) { + unsetTask_status(); + } else { + setTask_status((java.lang.String)value); + } + break; + + case DURATION: + if (value == null) { + unsetDuration(); + } else { + setDuration((java.lang.Long)value); + } + break; + + case CREATION_TIME: + if (value == null) { + unsetCreation_time(); + } else { + setCreation_time((java.lang.Long)value); + } + break; + + case OWNER: + if (value == null) { + unsetOwner(); + } else { + setOwner((java.lang.String)value); + } + break; + + case ROLE: + if (value == null) { + unsetRole(); + } else { + setRole((java.lang.String)value); + } + break; + + case DRUID_VERSION: + if (value == null) { + unsetDruid_version(); + } else { + setDruid_version((java.lang.String)value); + } + break; + + case ENVIRONMENT: + if (value == null) { + unsetEnvironment(); + } else { + setEnvironment((java.lang.String)value); + } + break; + + case DATACENTER: + if (value == null) { + unsetDatacenter(); + } else { + setDatacenter((java.lang.String)value); + } + break; + + case CLUSTER_NAME: + if (value == null) { + unsetCluster_name(); + } else { + setCluster_name((java.lang.String)value); + } + break; + + } + } + + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case TASK_ID: + return getTask_id(); + + case TASK_TYPE: + return getTask_type(); + + case DATASOURCE: + return getDatasource(); + + case TASK_STATUS: + return getTask_status(); + + case DURATION: + return getDuration(); + + case CREATION_TIME: + return getCreation_time(); + + case OWNER: + return getOwner(); + + case ROLE: + return getRole(); + + case DRUID_VERSION: + return getDruid_version(); + + case ENVIRONMENT: + return getEnvironment(); + + case DATACENTER: + return getDatacenter(); + + case CLUSTER_NAME: + return getCluster_name(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case TASK_ID: + return isSetTask_id(); + case TASK_TYPE: + return isSetTask_type(); + case DATASOURCE: + return isSetDatasource(); + case TASK_STATUS: + return isSetTask_status(); + case DURATION: + return isSetDuration(); + case CREATION_TIME: + return isSetCreation_time(); + case OWNER: + return isSetOwner(); + case ROLE: + return isSetRole(); + case DRUID_VERSION: + return isSetDruid_version(); + case ENVIRONMENT: + return isSetEnvironment(); + case DATACENTER: + return isSetDatacenter(); + case CLUSTER_NAME: + return isSetCluster_name(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that == null) + return false; + if (that instanceof DruidIndexingLogEvent) + return this.equals((DruidIndexingLogEvent)that); + return false; + } + + public boolean equals(DruidIndexingLogEvent that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_task_id = true && this.isSetTask_id(); + boolean that_present_task_id = true && that.isSetTask_id(); + if (this_present_task_id || that_present_task_id) { + if (!(this_present_task_id && that_present_task_id)) + return false; + if (!this.task_id.equals(that.task_id)) + return false; + } + + boolean this_present_task_type = true && this.isSetTask_type(); + boolean that_present_task_type = true && that.isSetTask_type(); + if (this_present_task_type || that_present_task_type) { + if (!(this_present_task_type && that_present_task_type)) + return false; + if (!this.task_type.equals(that.task_type)) + return false; + } + + boolean this_present_datasource = true && this.isSetDatasource(); + boolean that_present_datasource = true && that.isSetDatasource(); + if (this_present_datasource || that_present_datasource) { + if (!(this_present_datasource && that_present_datasource)) + return false; + if (!this.datasource.equals(that.datasource)) + return false; + } + + boolean this_present_task_status = true && this.isSetTask_status(); + boolean that_present_task_status = true && that.isSetTask_status(); + if (this_present_task_status || that_present_task_status) { + if (!(this_present_task_status && that_present_task_status)) + return false; + if (!this.task_status.equals(that.task_status)) + return false; + } + + boolean this_present_duration = true; + boolean that_present_duration = true; + if (this_present_duration || that_present_duration) { + if (!(this_present_duration && that_present_duration)) + return false; + if (this.duration != that.duration) + return false; + } + + boolean this_present_creation_time = true; + boolean that_present_creation_time = true; + if (this_present_creation_time || that_present_creation_time) { + if (!(this_present_creation_time && that_present_creation_time)) + return false; + if (this.creation_time != that.creation_time) + return false; + } + + boolean this_present_owner = true && this.isSetOwner(); + boolean that_present_owner = true && that.isSetOwner(); + if (this_present_owner || that_present_owner) { + if (!(this_present_owner && that_present_owner)) + return false; + if (!this.owner.equals(that.owner)) + return false; + } + + boolean this_present_role = true && this.isSetRole(); + boolean that_present_role = true && that.isSetRole(); + if (this_present_role || that_present_role) { + if (!(this_present_role && that_present_role)) + return false; + if (!this.role.equals(that.role)) + return false; + } + + boolean this_present_druid_version = true && this.isSetDruid_version(); + boolean that_present_druid_version = true && that.isSetDruid_version(); + if (this_present_druid_version || that_present_druid_version) { + if (!(this_present_druid_version && that_present_druid_version)) + return false; + if (!this.druid_version.equals(that.druid_version)) + return false; + } + + boolean this_present_environment = true && this.isSetEnvironment(); + boolean that_present_environment = true && that.isSetEnvironment(); + if (this_present_environment || that_present_environment) { + if (!(this_present_environment && that_present_environment)) + return false; + if (!this.environment.equals(that.environment)) + return false; + } + + boolean this_present_datacenter = true && this.isSetDatacenter(); + boolean that_present_datacenter = true && that.isSetDatacenter(); + if (this_present_datacenter || that_present_datacenter) { + if (!(this_present_datacenter && that_present_datacenter)) + return false; + if (!this.datacenter.equals(that.datacenter)) + return false; + } + + boolean this_present_cluster_name = true && this.isSetCluster_name(); + boolean that_present_cluster_name = true && that.isSetCluster_name(); + if (this_present_cluster_name || that_present_cluster_name) { + if (!(this_present_cluster_name && that_present_cluster_name)) + return false; + if (!this.cluster_name.equals(that.cluster_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetTask_id()) ? 131071 : 524287); + if (isSetTask_id()) + hashCode = hashCode * 8191 + task_id.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTask_type()) ? 131071 : 524287); + if (isSetTask_type()) + hashCode = hashCode * 8191 + task_type.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDatasource()) ? 131071 : 524287); + if (isSetDatasource()) + hashCode = hashCode * 8191 + datasource.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTask_status()) ? 131071 : 524287); + if (isSetTask_status()) + hashCode = hashCode * 8191 + task_status.hashCode(); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(duration); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(creation_time); + + hashCode = hashCode * 8191 + ((isSetOwner()) ? 131071 : 524287); + if (isSetOwner()) + hashCode = hashCode * 8191 + owner.hashCode(); + + hashCode = hashCode * 8191 + ((isSetRole()) ? 131071 : 524287); + if (isSetRole()) + hashCode = hashCode * 8191 + role.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDruid_version()) ? 131071 : 524287); + if (isSetDruid_version()) + hashCode = hashCode * 8191 + druid_version.hashCode(); + + hashCode = hashCode * 8191 + ((isSetEnvironment()) ? 131071 : 524287); + if (isSetEnvironment()) + hashCode = hashCode * 8191 + environment.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDatacenter()) ? 131071 : 524287); + if (isSetDatacenter()) + hashCode = hashCode * 8191 + datacenter.hashCode(); + + hashCode = hashCode * 8191 + ((isSetCluster_name()) ? 131071 : 524287); + if (isSetCluster_name()) + hashCode = hashCode * 8191 + cluster_name.hashCode(); + + return hashCode; + } + + @Override + public int compareTo(DruidIndexingLogEvent other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.valueOf(isSetTask_id()).compareTo(other.isSetTask_id()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTask_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.task_id, other.task_id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetTask_type()).compareTo(other.isSetTask_type()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTask_type()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.task_type, other.task_type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetDatasource()).compareTo(other.isSetDatasource()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatasource()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.datasource, other.datasource); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetTask_status()).compareTo(other.isSetTask_status()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTask_status()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.task_status, other.task_status); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetDuration()).compareTo(other.isSetDuration()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDuration()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.duration, other.duration); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetCreation_time()).compareTo(other.isSetCreation_time()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreation_time()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creation_time, other.creation_time); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetOwner()).compareTo(other.isSetOwner()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwner()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, other.owner); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetRole()).compareTo(other.isSetRole()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRole()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, other.role); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetDruid_version()).compareTo(other.isSetDruid_version()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDruid_version()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.druid_version, other.druid_version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetEnvironment()).compareTo(other.isSetEnvironment()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment, other.environment); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetDatacenter()).compareTo(other.isSetDatacenter()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatacenter()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.datacenter, other.datacenter); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetCluster_name()).compareTo(other.isSetCluster_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCluster_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cluster_name, other.cluster_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("DruidIndexingLogEvent("); + boolean first = true; + + sb.append("task_id:"); + if (this.task_id == null) { + sb.append("null"); + } else { + sb.append(this.task_id); + } + first = false; + if (!first) sb.append(", "); + sb.append("task_type:"); + if (this.task_type == null) { + sb.append("null"); + } else { + sb.append(this.task_type); + } + first = false; + if (!first) sb.append(", "); + sb.append("datasource:"); + if (this.datasource == null) { + sb.append("null"); + } else { + sb.append(this.datasource); + } + first = false; + if (!first) sb.append(", "); + sb.append("task_status:"); + if (this.task_status == null) { + sb.append("null"); + } else { + sb.append(this.task_status); + } + first = false; + if (!first) sb.append(", "); + sb.append("duration:"); + sb.append(this.duration); + first = false; + if (!first) sb.append(", "); + sb.append("creation_time:"); + sb.append(this.creation_time); + first = false; + if (!first) sb.append(", "); + sb.append("owner:"); + if (this.owner == null) { + sb.append("null"); + } else { + sb.append(this.owner); + } + first = false; + if (isSetRole()) { + if (!first) sb.append(", "); + sb.append("role:"); + if (this.role == null) { + sb.append("null"); + } else { + sb.append(this.role); + } + first = false; + } + if (isSetDruid_version()) { + if (!first) sb.append(", "); + sb.append("druid_version:"); + if (this.druid_version == null) { + sb.append("null"); + } else { + sb.append(this.druid_version); + } + first = false; + } + if (isSetEnvironment()) { + if (!first) sb.append(", "); + sb.append("environment:"); + if (this.environment == null) { + sb.append("null"); + } else { + sb.append(this.environment); + } + first = false; + } + if (isSetDatacenter()) { + if (!first) sb.append(", "); + sb.append("datacenter:"); + if (this.datacenter == null) { + sb.append("null"); + } else { + sb.append(this.datacenter); + } + first = false; + } + if (isSetCluster_name()) { + if (!first) sb.append(", "); + sb.append("cluster_name:"); + if (this.cluster_name == null) { + sb.append("null"); + } else { + sb.append(this.cluster_name); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (task_id == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'task_id' was not present! Struct: " + toString()); + } + if (task_type == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'task_type' was not present! Struct: " + toString()); + } + if (datasource == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'datasource' was not present! Struct: " + toString()); + } + if (task_status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'task_status' was not present! Struct: " + toString()); + } + // alas, we cannot check 'duration' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'creation_time' because it's a primitive and you chose the non-beans generator. + if (owner == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'owner' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class DruidIndexingLogEventStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public DruidIndexingLogEventStandardScheme getScheme() { + return new DruidIndexingLogEventStandardScheme(); + } + } + + private static class DruidIndexingLogEventStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, DruidIndexingLogEvent struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TASK_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.task_id = iprot.readString(); + struct.setTask_idIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TASK_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.task_type = iprot.readString(); + struct.setTask_typeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // DATASOURCE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.datasource = iprot.readString(); + struct.setDatasourceIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TASK_STATUS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.task_status = iprot.readString(); + struct.setTask_statusIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // DURATION + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.duration = iprot.readI64(); + struct.setDurationIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // CREATION_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.creation_time = iprot.readI64(); + struct.setCreation_timeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // OWNER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.owner = iprot.readString(); + struct.setOwnerIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // ROLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.role = iprot.readString(); + struct.setRoleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // DRUID_VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.druid_version = iprot.readString(); + struct.setDruid_versionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // ENVIRONMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.environment = iprot.readString(); + struct.setEnvironmentIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // DATACENTER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.datacenter = iprot.readString(); + struct.setDatacenterIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // CLUSTER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.cluster_name = iprot.readString(); + struct.setCluster_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetDuration()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'duration' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetCreation_time()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'creation_time' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, DruidIndexingLogEvent struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.task_id != null) { + oprot.writeFieldBegin(TASK_ID_FIELD_DESC); + oprot.writeString(struct.task_id); + oprot.writeFieldEnd(); + } + if (struct.task_type != null) { + oprot.writeFieldBegin(TASK_TYPE_FIELD_DESC); + oprot.writeString(struct.task_type); + oprot.writeFieldEnd(); + } + if (struct.datasource != null) { + oprot.writeFieldBegin(DATASOURCE_FIELD_DESC); + oprot.writeString(struct.datasource); + oprot.writeFieldEnd(); + } + if (struct.task_status != null) { + oprot.writeFieldBegin(TASK_STATUS_FIELD_DESC); + oprot.writeString(struct.task_status); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DURATION_FIELD_DESC); + oprot.writeI64(struct.duration); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC); + oprot.writeI64(struct.creation_time); + oprot.writeFieldEnd(); + if (struct.owner != null) { + oprot.writeFieldBegin(OWNER_FIELD_DESC); + oprot.writeString(struct.owner); + oprot.writeFieldEnd(); + } + if (struct.role != null) { + if (struct.isSetRole()) { + oprot.writeFieldBegin(ROLE_FIELD_DESC); + oprot.writeString(struct.role); + oprot.writeFieldEnd(); + } + } + if (struct.druid_version != null) { + if (struct.isSetDruid_version()) { + oprot.writeFieldBegin(DRUID_VERSION_FIELD_DESC); + oprot.writeString(struct.druid_version); + oprot.writeFieldEnd(); + } + } + if (struct.environment != null) { + if (struct.isSetEnvironment()) { + oprot.writeFieldBegin(ENVIRONMENT_FIELD_DESC); + oprot.writeString(struct.environment); + oprot.writeFieldEnd(); + } + } + if (struct.datacenter != null) { + if (struct.isSetDatacenter()) { + oprot.writeFieldBegin(DATACENTER_FIELD_DESC); + oprot.writeString(struct.datacenter); + oprot.writeFieldEnd(); + } + } + if (struct.cluster_name != null) { + if (struct.isSetCluster_name()) { + oprot.writeFieldBegin(CLUSTER_NAME_FIELD_DESC); + oprot.writeString(struct.cluster_name); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DruidIndexingLogEventTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public DruidIndexingLogEventTupleScheme getScheme() { + return new DruidIndexingLogEventTupleScheme(); + } + } + + private static class DruidIndexingLogEventTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, DruidIndexingLogEvent struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeString(struct.task_id); + oprot.writeString(struct.task_type); + oprot.writeString(struct.datasource); + oprot.writeString(struct.task_status); + oprot.writeI64(struct.duration); + oprot.writeI64(struct.creation_time); + oprot.writeString(struct.owner); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetRole()) { + optionals.set(0); + } + if (struct.isSetDruid_version()) { + optionals.set(1); + } + if (struct.isSetEnvironment()) { + optionals.set(2); + } + if (struct.isSetDatacenter()) { + optionals.set(3); + } + if (struct.isSetCluster_name()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetRole()) { + oprot.writeString(struct.role); + } + if (struct.isSetDruid_version()) { + oprot.writeString(struct.druid_version); + } + if (struct.isSetEnvironment()) { + oprot.writeString(struct.environment); + } + if (struct.isSetDatacenter()) { + oprot.writeString(struct.datacenter); + } + if (struct.isSetCluster_name()) { + oprot.writeString(struct.cluster_name); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, DruidIndexingLogEvent struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.task_id = iprot.readString(); + struct.setTask_idIsSet(true); + struct.task_type = iprot.readString(); + struct.setTask_typeIsSet(true); + struct.datasource = iprot.readString(); + struct.setDatasourceIsSet(true); + struct.task_status = iprot.readString(); + struct.setTask_statusIsSet(true); + struct.duration = iprot.readI64(); + struct.setDurationIsSet(true); + struct.creation_time = iprot.readI64(); + struct.setCreation_timeIsSet(true); + struct.owner = iprot.readString(); + struct.setOwnerIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.role = iprot.readString(); + struct.setRoleIsSet(true); + } + if (incoming.get(1)) { + struct.druid_version = iprot.readString(); + struct.setDruid_versionIsSet(true); + } + if (incoming.get(2)) { + struct.environment = iprot.readString(); + struct.setEnvironmentIsSet(true); + } + if (incoming.get(3)) { + struct.datacenter = iprot.readString(); + struct.setDatacenterIsSet(true); + } + if (incoming.get(4)) { + struct.cluster_name = iprot.readString(); + struct.setCluster_nameIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/extensions-twitter/scribe-emitter/src/main/java/org/apache/druid/emitter/scribe/DruidQueryLogEvent.java b/extensions-twitter/scribe-emitter/src/main/java/org/apache/druid/emitter/scribe/DruidQueryLogEvent.java new file mode 100644 index 000000000000..bb86903a0b44 --- /dev/null +++ b/extensions-twitter/scribe-emitter/src/main/java/org/apache/druid/emitter/scribe/DruidQueryLogEvent.java @@ -0,0 +1,2933 @@ +/** + * Autogenerated by Thrift Compiler (0.11.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.druid.emitter.scribe; + +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)", date = "2024-10-24") +public class DruidQueryLogEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DruidQueryLogEvent"); + + private static final org.apache.thrift.protocol.TField NATIVE_QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("native_query_id", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField SQL_QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sql_query_id", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField DRUID_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("druid_version", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField ENVIRONMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("environment", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField DATACENTER_FIELD_DESC = new org.apache.thrift.protocol.TField("datacenter", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField CLUSTER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("cluster_name", org.apache.thrift.protocol.TType.STRING, (short)7); + private static final org.apache.thrift.protocol.TField SERVICE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("service_name", org.apache.thrift.protocol.TType.STRING, (short)8); + private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)9); + private static final org.apache.thrift.protocol.TField REMOTE_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("remote_address", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField IS_SQL_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("is_sql_query", org.apache.thrift.protocol.TType.BOOL, (short)11); + private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)12); + private static final org.apache.thrift.protocol.TField DATASOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("datasource", org.apache.thrift.protocol.TType.STRING, (short)13); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)14); + private static final org.apache.thrift.protocol.TField CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("creation_time", org.apache.thrift.protocol.TType.I64, (short)15); + private static final org.apache.thrift.protocol.TField EXECUTION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("execution_time", org.apache.thrift.protocol.TType.I64, (short)16); + private static final org.apache.thrift.protocol.TField OUTPUT_RESULT_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("output_result_size", org.apache.thrift.protocol.TType.I64, (short)17); + private static final org.apache.thrift.protocol.TField AUTHENTICATOR_FIELD_DESC = new org.apache.thrift.protocol.TField("authenticator", org.apache.thrift.protocol.TType.STRING, (short)18); + private static final org.apache.thrift.protocol.TField STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("stats", org.apache.thrift.protocol.TType.STRING, (short)19); + private static final org.apache.thrift.protocol.TField IMPLY_DATA_CUBE_FIELD_DESC = new org.apache.thrift.protocol.TField("imply_data_cube", org.apache.thrift.protocol.TType.STRING, (short)20); + private static final org.apache.thrift.protocol.TField IMPLY_FEATURE_FIELD_DESC = new org.apache.thrift.protocol.TField("imply_feature", org.apache.thrift.protocol.TType.STRING, (short)21); + private static final org.apache.thrift.protocol.TField IMPLY_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("imply_user", org.apache.thrift.protocol.TType.STRING, (short)22); + private static final org.apache.thrift.protocol.TField IMPLY_USER_EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("imply_user_email", org.apache.thrift.protocol.TType.STRING, (short)23); + private static final org.apache.thrift.protocol.TField IMPLY_VIEW_FIELD_DESC = new org.apache.thrift.protocol.TField("imply_view", org.apache.thrift.protocol.TType.STRING, (short)24); + private static final org.apache.thrift.protocol.TField IMPLY_VIEW_TITLE_FIELD_DESC = new org.apache.thrift.protocol.TField("imply_view_title", org.apache.thrift.protocol.TType.STRING, (short)25); + private static final org.apache.thrift.protocol.TField IMPLY_PRIORITY_FIELD_DESC = new org.apache.thrift.protocol.TField("imply_priority", org.apache.thrift.protocol.TType.I32, (short)26); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DruidQueryLogEventStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DruidQueryLogEventTupleSchemeFactory(); + + public java.lang.String native_query_id; // required + public java.lang.String sql_query_id; // optional + public java.lang.String role; // optional + public java.lang.String druid_version; // optional + public java.lang.String environment; // optional + public java.lang.String datacenter; // optional + public java.lang.String cluster_name; // optional + public java.lang.String service_name; // optional + public java.lang.String host; // optional + public java.lang.String remote_address; // optional + public boolean is_sql_query; // required + public java.lang.String query; // required + public java.lang.String datasource; // optional + public boolean success; // required + public long creation_time; // required + public long execution_time; // required + public long output_result_size; // required + public java.lang.String authenticator; // required + public java.lang.String stats; // required + public java.lang.String imply_data_cube; // optional + public java.lang.String imply_feature; // optional + public java.lang.String imply_user; // optional + public java.lang.String imply_user_email; // optional + public java.lang.String imply_view; // optional + public java.lang.String imply_view_title; // optional + public int imply_priority; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NATIVE_QUERY_ID((short)1, "native_query_id"), + SQL_QUERY_ID((short)2, "sql_query_id"), + ROLE((short)3, "role"), + DRUID_VERSION((short)4, "druid_version"), + ENVIRONMENT((short)5, "environment"), + DATACENTER((short)6, "datacenter"), + CLUSTER_NAME((short)7, "cluster_name"), + SERVICE_NAME((short)8, "service_name"), + HOST((short)9, "host"), + REMOTE_ADDRESS((short)10, "remote_address"), + IS_SQL_QUERY((short)11, "is_sql_query"), + QUERY((short)12, "query"), + DATASOURCE((short)13, "datasource"), + SUCCESS((short)14, "success"), + CREATION_TIME((short)15, "creation_time"), + EXECUTION_TIME((short)16, "execution_time"), + OUTPUT_RESULT_SIZE((short)17, "output_result_size"), + AUTHENTICATOR((short)18, "authenticator"), + STATS((short)19, "stats"), + IMPLY_DATA_CUBE((short)20, "imply_data_cube"), + IMPLY_FEATURE((short)21, "imply_feature"), + IMPLY_USER((short)22, "imply_user"), + IMPLY_USER_EMAIL((short)23, "imply_user_email"), + IMPLY_VIEW((short)24, "imply_view"), + IMPLY_VIEW_TITLE((short)25, "imply_view_title"), + IMPLY_PRIORITY((short)26, "imply_priority"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NATIVE_QUERY_ID + return NATIVE_QUERY_ID; + case 2: // SQL_QUERY_ID + return SQL_QUERY_ID; + case 3: // ROLE + return ROLE; + case 4: // DRUID_VERSION + return DRUID_VERSION; + case 5: // ENVIRONMENT + return ENVIRONMENT; + case 6: // DATACENTER + return DATACENTER; + case 7: // CLUSTER_NAME + return CLUSTER_NAME; + case 8: // SERVICE_NAME + return SERVICE_NAME; + case 9: // HOST + return HOST; + case 10: // REMOTE_ADDRESS + return REMOTE_ADDRESS; + case 11: // IS_SQL_QUERY + return IS_SQL_QUERY; + case 12: // QUERY + return QUERY; + case 13: // DATASOURCE + return DATASOURCE; + case 14: // SUCCESS + return SUCCESS; + case 15: // CREATION_TIME + return CREATION_TIME; + case 16: // EXECUTION_TIME + return EXECUTION_TIME; + case 17: // OUTPUT_RESULT_SIZE + return OUTPUT_RESULT_SIZE; + case 18: // AUTHENTICATOR + return AUTHENTICATOR; + case 19: // STATS + return STATS; + case 20: // IMPLY_DATA_CUBE + return IMPLY_DATA_CUBE; + case 21: // IMPLY_FEATURE + return IMPLY_FEATURE; + case 22: // IMPLY_USER + return IMPLY_USER; + case 23: // IMPLY_USER_EMAIL + return IMPLY_USER_EMAIL; + case 24: // IMPLY_VIEW + return IMPLY_VIEW; + case 25: // IMPLY_VIEW_TITLE + return IMPLY_VIEW_TITLE; + case 26: // IMPLY_PRIORITY + return IMPLY_PRIORITY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __IS_SQL_QUERY_ISSET_ID = 0; + private static final int __SUCCESS_ISSET_ID = 1; + private static final int __CREATION_TIME_ISSET_ID = 2; + private static final int __EXECUTION_TIME_ISSET_ID = 3; + private static final int __OUTPUT_RESULT_SIZE_ISSET_ID = 4; + private static final int __IMPLY_PRIORITY_ISSET_ID = 5; + private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.SQL_QUERY_ID,_Fields.ROLE,_Fields.DRUID_VERSION,_Fields.ENVIRONMENT,_Fields.DATACENTER,_Fields.CLUSTER_NAME,_Fields.SERVICE_NAME,_Fields.HOST,_Fields.REMOTE_ADDRESS,_Fields.DATASOURCE,_Fields.IMPLY_DATA_CUBE,_Fields.IMPLY_FEATURE,_Fields.IMPLY_USER,_Fields.IMPLY_USER_EMAIL,_Fields.IMPLY_VIEW,_Fields.IMPLY_VIEW_TITLE,_Fields.IMPLY_PRIORITY}; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NATIVE_QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("native_query_id", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SQL_QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("sql_query_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DRUID_VERSION, new org.apache.thrift.meta_data.FieldMetaData("druid_version", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.ENVIRONMENT, new org.apache.thrift.meta_data.FieldMetaData("environment", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DATACENTER, new org.apache.thrift.meta_data.FieldMetaData("datacenter", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CLUSTER_NAME, new org.apache.thrift.meta_data.FieldMetaData("cluster_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SERVICE_NAME, new org.apache.thrift.meta_data.FieldMetaData("service_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.REMOTE_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("remote_address", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IS_SQL_QUERY, new org.apache.thrift.meta_data.FieldMetaData("is_sql_query", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.DATASOURCE, new org.apache.thrift.meta_data.FieldMetaData("datasource", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("creation_time", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.EXECUTION_TIME, new org.apache.thrift.meta_data.FieldMetaData("execution_time", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.OUTPUT_RESULT_SIZE, new org.apache.thrift.meta_data.FieldMetaData("output_result_size", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.AUTHENTICATOR, new org.apache.thrift.meta_data.FieldMetaData("authenticator", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.STATS, new org.apache.thrift.meta_data.FieldMetaData("stats", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IMPLY_DATA_CUBE, new org.apache.thrift.meta_data.FieldMetaData("imply_data_cube", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IMPLY_FEATURE, new org.apache.thrift.meta_data.FieldMetaData("imply_feature", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IMPLY_USER, new org.apache.thrift.meta_data.FieldMetaData("imply_user", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IMPLY_USER_EMAIL, new org.apache.thrift.meta_data.FieldMetaData("imply_user_email", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IMPLY_VIEW, new org.apache.thrift.meta_data.FieldMetaData("imply_view", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IMPLY_VIEW_TITLE, new org.apache.thrift.meta_data.FieldMetaData("imply_view_title", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IMPLY_PRIORITY, new org.apache.thrift.meta_data.FieldMetaData("imply_priority", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DruidQueryLogEvent.class, metaDataMap); + } + + public DruidQueryLogEvent() { + } + + public DruidQueryLogEvent( + java.lang.String native_query_id, + boolean is_sql_query, + java.lang.String query, + boolean success, + long creation_time, + long execution_time, + long output_result_size, + java.lang.String authenticator, + java.lang.String stats) + { + this(); + this.native_query_id = native_query_id; + this.is_sql_query = is_sql_query; + setIs_sql_queryIsSet(true); + this.query = query; + this.success = success; + setSuccessIsSet(true); + this.creation_time = creation_time; + setCreation_timeIsSet(true); + this.execution_time = execution_time; + setExecution_timeIsSet(true); + this.output_result_size = output_result_size; + setOutput_result_sizeIsSet(true); + this.authenticator = authenticator; + this.stats = stats; + } + + /** + * Performs a deep copy on other. + */ + public DruidQueryLogEvent(DruidQueryLogEvent other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetNative_query_id()) { + this.native_query_id = other.native_query_id; + } + if (other.isSetSql_query_id()) { + this.sql_query_id = other.sql_query_id; + } + if (other.isSetRole()) { + this.role = other.role; + } + if (other.isSetDruid_version()) { + this.druid_version = other.druid_version; + } + if (other.isSetEnvironment()) { + this.environment = other.environment; + } + if (other.isSetDatacenter()) { + this.datacenter = other.datacenter; + } + if (other.isSetCluster_name()) { + this.cluster_name = other.cluster_name; + } + if (other.isSetService_name()) { + this.service_name = other.service_name; + } + if (other.isSetHost()) { + this.host = other.host; + } + if (other.isSetRemote_address()) { + this.remote_address = other.remote_address; + } + this.is_sql_query = other.is_sql_query; + if (other.isSetQuery()) { + this.query = other.query; + } + if (other.isSetDatasource()) { + this.datasource = other.datasource; + } + this.success = other.success; + this.creation_time = other.creation_time; + this.execution_time = other.execution_time; + this.output_result_size = other.output_result_size; + if (other.isSetAuthenticator()) { + this.authenticator = other.authenticator; + } + if (other.isSetStats()) { + this.stats = other.stats; + } + if (other.isSetImply_data_cube()) { + this.imply_data_cube = other.imply_data_cube; + } + if (other.isSetImply_feature()) { + this.imply_feature = other.imply_feature; + } + if (other.isSetImply_user()) { + this.imply_user = other.imply_user; + } + if (other.isSetImply_user_email()) { + this.imply_user_email = other.imply_user_email; + } + if (other.isSetImply_view()) { + this.imply_view = other.imply_view; + } + if (other.isSetImply_view_title()) { + this.imply_view_title = other.imply_view_title; + } + this.imply_priority = other.imply_priority; + } + + public DruidQueryLogEvent deepCopy() { + return new DruidQueryLogEvent(this); + } + + @Override + public void clear() { + this.native_query_id = null; + this.sql_query_id = null; + this.role = null; + this.druid_version = null; + this.environment = null; + this.datacenter = null; + this.cluster_name = null; + this.service_name = null; + this.host = null; + this.remote_address = null; + setIs_sql_queryIsSet(false); + this.is_sql_query = false; + this.query = null; + this.datasource = null; + setSuccessIsSet(false); + this.success = false; + setCreation_timeIsSet(false); + this.creation_time = 0; + setExecution_timeIsSet(false); + this.execution_time = 0; + setOutput_result_sizeIsSet(false); + this.output_result_size = 0; + this.authenticator = null; + this.stats = null; + this.imply_data_cube = null; + this.imply_feature = null; + this.imply_user = null; + this.imply_user_email = null; + this.imply_view = null; + this.imply_view_title = null; + setImply_priorityIsSet(false); + this.imply_priority = 0; + } + + public java.lang.String getNative_query_id() { + return this.native_query_id; + } + + public DruidQueryLogEvent setNative_query_id(java.lang.String native_query_id) { + this.native_query_id = native_query_id; + return this; + } + + public void unsetNative_query_id() { + this.native_query_id = null; + } + + /** Returns true if field native_query_id is set (has been assigned a value) and false otherwise */ + public boolean isSetNative_query_id() { + return this.native_query_id != null; + } + + public void setNative_query_idIsSet(boolean value) { + if (!value) { + this.native_query_id = null; + } + } + + public java.lang.String getSql_query_id() { + return this.sql_query_id; + } + + public DruidQueryLogEvent setSql_query_id(java.lang.String sql_query_id) { + this.sql_query_id = sql_query_id; + return this; + } + + public void unsetSql_query_id() { + this.sql_query_id = null; + } + + /** Returns true if field sql_query_id is set (has been assigned a value) and false otherwise */ + public boolean isSetSql_query_id() { + return this.sql_query_id != null; + } + + public void setSql_query_idIsSet(boolean value) { + if (!value) { + this.sql_query_id = null; + } + } + + public java.lang.String getRole() { + return this.role; + } + + public DruidQueryLogEvent setRole(java.lang.String role) { + this.role = role; + return this; + } + + public void unsetRole() { + this.role = null; + } + + /** Returns true if field role is set (has been assigned a value) and false otherwise */ + public boolean isSetRole() { + return this.role != null; + } + + public void setRoleIsSet(boolean value) { + if (!value) { + this.role = null; + } + } + + public java.lang.String getDruid_version() { + return this.druid_version; + } + + public DruidQueryLogEvent setDruid_version(java.lang.String druid_version) { + this.druid_version = druid_version; + return this; + } + + public void unsetDruid_version() { + this.druid_version = null; + } + + /** Returns true if field druid_version is set (has been assigned a value) and false otherwise */ + public boolean isSetDruid_version() { + return this.druid_version != null; + } + + public void setDruid_versionIsSet(boolean value) { + if (!value) { + this.druid_version = null; + } + } + + public java.lang.String getEnvironment() { + return this.environment; + } + + public DruidQueryLogEvent setEnvironment(java.lang.String environment) { + this.environment = environment; + return this; + } + + public void unsetEnvironment() { + this.environment = null; + } + + /** Returns true if field environment is set (has been assigned a value) and false otherwise */ + public boolean isSetEnvironment() { + return this.environment != null; + } + + public void setEnvironmentIsSet(boolean value) { + if (!value) { + this.environment = null; + } + } + + public java.lang.String getDatacenter() { + return this.datacenter; + } + + public DruidQueryLogEvent setDatacenter(java.lang.String datacenter) { + this.datacenter = datacenter; + return this; + } + + public void unsetDatacenter() { + this.datacenter = null; + } + + /** Returns true if field datacenter is set (has been assigned a value) and false otherwise */ + public boolean isSetDatacenter() { + return this.datacenter != null; + } + + public void setDatacenterIsSet(boolean value) { + if (!value) { + this.datacenter = null; + } + } + + public java.lang.String getCluster_name() { + return this.cluster_name; + } + + public DruidQueryLogEvent setCluster_name(java.lang.String cluster_name) { + this.cluster_name = cluster_name; + return this; + } + + public void unsetCluster_name() { + this.cluster_name = null; + } + + /** Returns true if field cluster_name is set (has been assigned a value) and false otherwise */ + public boolean isSetCluster_name() { + return this.cluster_name != null; + } + + public void setCluster_nameIsSet(boolean value) { + if (!value) { + this.cluster_name = null; + } + } + + public java.lang.String getService_name() { + return this.service_name; + } + + public DruidQueryLogEvent setService_name(java.lang.String service_name) { + this.service_name = service_name; + return this; + } + + public void unsetService_name() { + this.service_name = null; + } + + /** Returns true if field service_name is set (has been assigned a value) and false otherwise */ + public boolean isSetService_name() { + return this.service_name != null; + } + + public void setService_nameIsSet(boolean value) { + if (!value) { + this.service_name = null; + } + } + + public java.lang.String getHost() { + return this.host; + } + + public DruidQueryLogEvent setHost(java.lang.String host) { + this.host = host; + return this; + } + + public void unsetHost() { + this.host = null; + } + + /** Returns true if field host is set (has been assigned a value) and false otherwise */ + public boolean isSetHost() { + return this.host != null; + } + + public void setHostIsSet(boolean value) { + if (!value) { + this.host = null; + } + } + + public java.lang.String getRemote_address() { + return this.remote_address; + } + + public DruidQueryLogEvent setRemote_address(java.lang.String remote_address) { + this.remote_address = remote_address; + return this; + } + + public void unsetRemote_address() { + this.remote_address = null; + } + + /** Returns true if field remote_address is set (has been assigned a value) and false otherwise */ + public boolean isSetRemote_address() { + return this.remote_address != null; + } + + public void setRemote_addressIsSet(boolean value) { + if (!value) { + this.remote_address = null; + } + } + + public boolean isIs_sql_query() { + return this.is_sql_query; + } + + public DruidQueryLogEvent setIs_sql_query(boolean is_sql_query) { + this.is_sql_query = is_sql_query; + setIs_sql_queryIsSet(true); + return this; + } + + public void unsetIs_sql_query() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IS_SQL_QUERY_ISSET_ID); + } + + /** Returns true if field is_sql_query is set (has been assigned a value) and false otherwise */ + public boolean isSetIs_sql_query() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_SQL_QUERY_ISSET_ID); + } + + public void setIs_sql_queryIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IS_SQL_QUERY_ISSET_ID, value); + } + + public java.lang.String getQuery() { + return this.query; + } + + public DruidQueryLogEvent setQuery(java.lang.String query) { + this.query = query; + return this; + } + + public void unsetQuery() { + this.query = null; + } + + /** Returns true if field query is set (has been assigned a value) and false otherwise */ + public boolean isSetQuery() { + return this.query != null; + } + + public void setQueryIsSet(boolean value) { + if (!value) { + this.query = null; + } + } + + public java.lang.String getDatasource() { + return this.datasource; + } + + public DruidQueryLogEvent setDatasource(java.lang.String datasource) { + this.datasource = datasource; + return this; + } + + public void unsetDatasource() { + this.datasource = null; + } + + /** Returns true if field datasource is set (has been assigned a value) and false otherwise */ + public boolean isSetDatasource() { + return this.datasource != null; + } + + public void setDatasourceIsSet(boolean value) { + if (!value) { + this.datasource = null; + } + } + + public boolean isSuccess() { + return this.success; + } + + public DruidQueryLogEvent setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); + } + + public long getCreation_time() { + return this.creation_time; + } + + public DruidQueryLogEvent setCreation_time(long creation_time) { + this.creation_time = creation_time; + setCreation_timeIsSet(true); + return this; + } + + public void unsetCreation_time() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATION_TIME_ISSET_ID); + } + + /** Returns true if field creation_time is set (has been assigned a value) and false otherwise */ + public boolean isSetCreation_time() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATION_TIME_ISSET_ID); + } + + public void setCreation_timeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATION_TIME_ISSET_ID, value); + } + + public long getExecution_time() { + return this.execution_time; + } + + public DruidQueryLogEvent setExecution_time(long execution_time) { + this.execution_time = execution_time; + setExecution_timeIsSet(true); + return this; + } + + public void unsetExecution_time() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXECUTION_TIME_ISSET_ID); + } + + /** Returns true if field execution_time is set (has been assigned a value) and false otherwise */ + public boolean isSetExecution_time() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXECUTION_TIME_ISSET_ID); + } + + public void setExecution_timeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXECUTION_TIME_ISSET_ID, value); + } + + public long getOutput_result_size() { + return this.output_result_size; + } + + public DruidQueryLogEvent setOutput_result_size(long output_result_size) { + this.output_result_size = output_result_size; + setOutput_result_sizeIsSet(true); + return this; + } + + public void unsetOutput_result_size() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OUTPUT_RESULT_SIZE_ISSET_ID); + } + + /** Returns true if field output_result_size is set (has been assigned a value) and false otherwise */ + public boolean isSetOutput_result_size() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OUTPUT_RESULT_SIZE_ISSET_ID); + } + + public void setOutput_result_sizeIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OUTPUT_RESULT_SIZE_ISSET_ID, value); + } + + public java.lang.String getAuthenticator() { + return this.authenticator; + } + + public DruidQueryLogEvent setAuthenticator(java.lang.String authenticator) { + this.authenticator = authenticator; + return this; + } + + public void unsetAuthenticator() { + this.authenticator = null; + } + + /** Returns true if field authenticator is set (has been assigned a value) and false otherwise */ + public boolean isSetAuthenticator() { + return this.authenticator != null; + } + + public void setAuthenticatorIsSet(boolean value) { + if (!value) { + this.authenticator = null; + } + } + + public java.lang.String getStats() { + return this.stats; + } + + public DruidQueryLogEvent setStats(java.lang.String stats) { + this.stats = stats; + return this; + } + + public void unsetStats() { + this.stats = null; + } + + /** Returns true if field stats is set (has been assigned a value) and false otherwise */ + public boolean isSetStats() { + return this.stats != null; + } + + public void setStatsIsSet(boolean value) { + if (!value) { + this.stats = null; + } + } + + public java.lang.String getImply_data_cube() { + return this.imply_data_cube; + } + + public DruidQueryLogEvent setImply_data_cube(java.lang.String imply_data_cube) { + this.imply_data_cube = imply_data_cube; + return this; + } + + public void unsetImply_data_cube() { + this.imply_data_cube = null; + } + + /** Returns true if field imply_data_cube is set (has been assigned a value) and false otherwise */ + public boolean isSetImply_data_cube() { + return this.imply_data_cube != null; + } + + public void setImply_data_cubeIsSet(boolean value) { + if (!value) { + this.imply_data_cube = null; + } + } + + public java.lang.String getImply_feature() { + return this.imply_feature; + } + + public DruidQueryLogEvent setImply_feature(java.lang.String imply_feature) { + this.imply_feature = imply_feature; + return this; + } + + public void unsetImply_feature() { + this.imply_feature = null; + } + + /** Returns true if field imply_feature is set (has been assigned a value) and false otherwise */ + public boolean isSetImply_feature() { + return this.imply_feature != null; + } + + public void setImply_featureIsSet(boolean value) { + if (!value) { + this.imply_feature = null; + } + } + + public java.lang.String getImply_user() { + return this.imply_user; + } + + public DruidQueryLogEvent setImply_user(java.lang.String imply_user) { + this.imply_user = imply_user; + return this; + } + + public void unsetImply_user() { + this.imply_user = null; + } + + /** Returns true if field imply_user is set (has been assigned a value) and false otherwise */ + public boolean isSetImply_user() { + return this.imply_user != null; + } + + public void setImply_userIsSet(boolean value) { + if (!value) { + this.imply_user = null; + } + } + + public java.lang.String getImply_user_email() { + return this.imply_user_email; + } + + public DruidQueryLogEvent setImply_user_email(java.lang.String imply_user_email) { + this.imply_user_email = imply_user_email; + return this; + } + + public void unsetImply_user_email() { + this.imply_user_email = null; + } + + /** Returns true if field imply_user_email is set (has been assigned a value) and false otherwise */ + public boolean isSetImply_user_email() { + return this.imply_user_email != null; + } + + public void setImply_user_emailIsSet(boolean value) { + if (!value) { + this.imply_user_email = null; + } + } + + public java.lang.String getImply_view() { + return this.imply_view; + } + + public DruidQueryLogEvent setImply_view(java.lang.String imply_view) { + this.imply_view = imply_view; + return this; + } + + public void unsetImply_view() { + this.imply_view = null; + } + + /** Returns true if field imply_view is set (has been assigned a value) and false otherwise */ + public boolean isSetImply_view() { + return this.imply_view != null; + } + + public void setImply_viewIsSet(boolean value) { + if (!value) { + this.imply_view = null; + } + } + + public java.lang.String getImply_view_title() { + return this.imply_view_title; + } + + public DruidQueryLogEvent setImply_view_title(java.lang.String imply_view_title) { + this.imply_view_title = imply_view_title; + return this; + } + + public void unsetImply_view_title() { + this.imply_view_title = null; + } + + /** Returns true if field imply_view_title is set (has been assigned a value) and false otherwise */ + public boolean isSetImply_view_title() { + return this.imply_view_title != null; + } + + public void setImply_view_titleIsSet(boolean value) { + if (!value) { + this.imply_view_title = null; + } + } + + public int getImply_priority() { + return this.imply_priority; + } + + public DruidQueryLogEvent setImply_priority(int imply_priority) { + this.imply_priority = imply_priority; + setImply_priorityIsSet(true); + return this; + } + + public void unsetImply_priority() { + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __IMPLY_PRIORITY_ISSET_ID); + } + + /** Returns true if field imply_priority is set (has been assigned a value) and false otherwise */ + public boolean isSetImply_priority() { + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IMPLY_PRIORITY_ISSET_ID); + } + + public void setImply_priorityIsSet(boolean value) { + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __IMPLY_PRIORITY_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, java.lang.Object value) { + switch (field) { + case NATIVE_QUERY_ID: + if (value == null) { + unsetNative_query_id(); + } else { + setNative_query_id((java.lang.String)value); + } + break; + + case SQL_QUERY_ID: + if (value == null) { + unsetSql_query_id(); + } else { + setSql_query_id((java.lang.String)value); + } + break; + + case ROLE: + if (value == null) { + unsetRole(); + } else { + setRole((java.lang.String)value); + } + break; + + case DRUID_VERSION: + if (value == null) { + unsetDruid_version(); + } else { + setDruid_version((java.lang.String)value); + } + break; + + case ENVIRONMENT: + if (value == null) { + unsetEnvironment(); + } else { + setEnvironment((java.lang.String)value); + } + break; + + case DATACENTER: + if (value == null) { + unsetDatacenter(); + } else { + setDatacenter((java.lang.String)value); + } + break; + + case CLUSTER_NAME: + if (value == null) { + unsetCluster_name(); + } else { + setCluster_name((java.lang.String)value); + } + break; + + case SERVICE_NAME: + if (value == null) { + unsetService_name(); + } else { + setService_name((java.lang.String)value); + } + break; + + case HOST: + if (value == null) { + unsetHost(); + } else { + setHost((java.lang.String)value); + } + break; + + case REMOTE_ADDRESS: + if (value == null) { + unsetRemote_address(); + } else { + setRemote_address((java.lang.String)value); + } + break; + + case IS_SQL_QUERY: + if (value == null) { + unsetIs_sql_query(); + } else { + setIs_sql_query((java.lang.Boolean)value); + } + break; + + case QUERY: + if (value == null) { + unsetQuery(); + } else { + setQuery((java.lang.String)value); + } + break; + + case DATASOURCE: + if (value == null) { + unsetDatasource(); + } else { + setDatasource((java.lang.String)value); + } + break; + + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((java.lang.Boolean)value); + } + break; + + case CREATION_TIME: + if (value == null) { + unsetCreation_time(); + } else { + setCreation_time((java.lang.Long)value); + } + break; + + case EXECUTION_TIME: + if (value == null) { + unsetExecution_time(); + } else { + setExecution_time((java.lang.Long)value); + } + break; + + case OUTPUT_RESULT_SIZE: + if (value == null) { + unsetOutput_result_size(); + } else { + setOutput_result_size((java.lang.Long)value); + } + break; + + case AUTHENTICATOR: + if (value == null) { + unsetAuthenticator(); + } else { + setAuthenticator((java.lang.String)value); + } + break; + + case STATS: + if (value == null) { + unsetStats(); + } else { + setStats((java.lang.String)value); + } + break; + + case IMPLY_DATA_CUBE: + if (value == null) { + unsetImply_data_cube(); + } else { + setImply_data_cube((java.lang.String)value); + } + break; + + case IMPLY_FEATURE: + if (value == null) { + unsetImply_feature(); + } else { + setImply_feature((java.lang.String)value); + } + break; + + case IMPLY_USER: + if (value == null) { + unsetImply_user(); + } else { + setImply_user((java.lang.String)value); + } + break; + + case IMPLY_USER_EMAIL: + if (value == null) { + unsetImply_user_email(); + } else { + setImply_user_email((java.lang.String)value); + } + break; + + case IMPLY_VIEW: + if (value == null) { + unsetImply_view(); + } else { + setImply_view((java.lang.String)value); + } + break; + + case IMPLY_VIEW_TITLE: + if (value == null) { + unsetImply_view_title(); + } else { + setImply_view_title((java.lang.String)value); + } + break; + + case IMPLY_PRIORITY: + if (value == null) { + unsetImply_priority(); + } else { + setImply_priority((java.lang.Integer)value); + } + break; + + } + } + + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case NATIVE_QUERY_ID: + return getNative_query_id(); + + case SQL_QUERY_ID: + return getSql_query_id(); + + case ROLE: + return getRole(); + + case DRUID_VERSION: + return getDruid_version(); + + case ENVIRONMENT: + return getEnvironment(); + + case DATACENTER: + return getDatacenter(); + + case CLUSTER_NAME: + return getCluster_name(); + + case SERVICE_NAME: + return getService_name(); + + case HOST: + return getHost(); + + case REMOTE_ADDRESS: + return getRemote_address(); + + case IS_SQL_QUERY: + return isIs_sql_query(); + + case QUERY: + return getQuery(); + + case DATASOURCE: + return getDatasource(); + + case SUCCESS: + return isSuccess(); + + case CREATION_TIME: + return getCreation_time(); + + case EXECUTION_TIME: + return getExecution_time(); + + case OUTPUT_RESULT_SIZE: + return getOutput_result_size(); + + case AUTHENTICATOR: + return getAuthenticator(); + + case STATS: + return getStats(); + + case IMPLY_DATA_CUBE: + return getImply_data_cube(); + + case IMPLY_FEATURE: + return getImply_feature(); + + case IMPLY_USER: + return getImply_user(); + + case IMPLY_USER_EMAIL: + return getImply_user_email(); + + case IMPLY_VIEW: + return getImply_view(); + + case IMPLY_VIEW_TITLE: + return getImply_view_title(); + + case IMPLY_PRIORITY: + return getImply_priority(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case NATIVE_QUERY_ID: + return isSetNative_query_id(); + case SQL_QUERY_ID: + return isSetSql_query_id(); + case ROLE: + return isSetRole(); + case DRUID_VERSION: + return isSetDruid_version(); + case ENVIRONMENT: + return isSetEnvironment(); + case DATACENTER: + return isSetDatacenter(); + case CLUSTER_NAME: + return isSetCluster_name(); + case SERVICE_NAME: + return isSetService_name(); + case HOST: + return isSetHost(); + case REMOTE_ADDRESS: + return isSetRemote_address(); + case IS_SQL_QUERY: + return isSetIs_sql_query(); + case QUERY: + return isSetQuery(); + case DATASOURCE: + return isSetDatasource(); + case SUCCESS: + return isSetSuccess(); + case CREATION_TIME: + return isSetCreation_time(); + case EXECUTION_TIME: + return isSetExecution_time(); + case OUTPUT_RESULT_SIZE: + return isSetOutput_result_size(); + case AUTHENTICATOR: + return isSetAuthenticator(); + case STATS: + return isSetStats(); + case IMPLY_DATA_CUBE: + return isSetImply_data_cube(); + case IMPLY_FEATURE: + return isSetImply_feature(); + case IMPLY_USER: + return isSetImply_user(); + case IMPLY_USER_EMAIL: + return isSetImply_user_email(); + case IMPLY_VIEW: + return isSetImply_view(); + case IMPLY_VIEW_TITLE: + return isSetImply_view_title(); + case IMPLY_PRIORITY: + return isSetImply_priority(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that == null) + return false; + if (that instanceof DruidQueryLogEvent) + return this.equals((DruidQueryLogEvent)that); + return false; + } + + public boolean equals(DruidQueryLogEvent that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_native_query_id = true && this.isSetNative_query_id(); + boolean that_present_native_query_id = true && that.isSetNative_query_id(); + if (this_present_native_query_id || that_present_native_query_id) { + if (!(this_present_native_query_id && that_present_native_query_id)) + return false; + if (!this.native_query_id.equals(that.native_query_id)) + return false; + } + + boolean this_present_sql_query_id = true && this.isSetSql_query_id(); + boolean that_present_sql_query_id = true && that.isSetSql_query_id(); + if (this_present_sql_query_id || that_present_sql_query_id) { + if (!(this_present_sql_query_id && that_present_sql_query_id)) + return false; + if (!this.sql_query_id.equals(that.sql_query_id)) + return false; + } + + boolean this_present_role = true && this.isSetRole(); + boolean that_present_role = true && that.isSetRole(); + if (this_present_role || that_present_role) { + if (!(this_present_role && that_present_role)) + return false; + if (!this.role.equals(that.role)) + return false; + } + + boolean this_present_druid_version = true && this.isSetDruid_version(); + boolean that_present_druid_version = true && that.isSetDruid_version(); + if (this_present_druid_version || that_present_druid_version) { + if (!(this_present_druid_version && that_present_druid_version)) + return false; + if (!this.druid_version.equals(that.druid_version)) + return false; + } + + boolean this_present_environment = true && this.isSetEnvironment(); + boolean that_present_environment = true && that.isSetEnvironment(); + if (this_present_environment || that_present_environment) { + if (!(this_present_environment && that_present_environment)) + return false; + if (!this.environment.equals(that.environment)) + return false; + } + + boolean this_present_datacenter = true && this.isSetDatacenter(); + boolean that_present_datacenter = true && that.isSetDatacenter(); + if (this_present_datacenter || that_present_datacenter) { + if (!(this_present_datacenter && that_present_datacenter)) + return false; + if (!this.datacenter.equals(that.datacenter)) + return false; + } + + boolean this_present_cluster_name = true && this.isSetCluster_name(); + boolean that_present_cluster_name = true && that.isSetCluster_name(); + if (this_present_cluster_name || that_present_cluster_name) { + if (!(this_present_cluster_name && that_present_cluster_name)) + return false; + if (!this.cluster_name.equals(that.cluster_name)) + return false; + } + + boolean this_present_service_name = true && this.isSetService_name(); + boolean that_present_service_name = true && that.isSetService_name(); + if (this_present_service_name || that_present_service_name) { + if (!(this_present_service_name && that_present_service_name)) + return false; + if (!this.service_name.equals(that.service_name)) + return false; + } + + boolean this_present_host = true && this.isSetHost(); + boolean that_present_host = true && that.isSetHost(); + if (this_present_host || that_present_host) { + if (!(this_present_host && that_present_host)) + return false; + if (!this.host.equals(that.host)) + return false; + } + + boolean this_present_remote_address = true && this.isSetRemote_address(); + boolean that_present_remote_address = true && that.isSetRemote_address(); + if (this_present_remote_address || that_present_remote_address) { + if (!(this_present_remote_address && that_present_remote_address)) + return false; + if (!this.remote_address.equals(that.remote_address)) + return false; + } + + boolean this_present_is_sql_query = true; + boolean that_present_is_sql_query = true; + if (this_present_is_sql_query || that_present_is_sql_query) { + if (!(this_present_is_sql_query && that_present_is_sql_query)) + return false; + if (this.is_sql_query != that.is_sql_query) + return false; + } + + boolean this_present_query = true && this.isSetQuery(); + boolean that_present_query = true && that.isSetQuery(); + if (this_present_query || that_present_query) { + if (!(this_present_query && that_present_query)) + return false; + if (!this.query.equals(that.query)) + return false; + } + + boolean this_present_datasource = true && this.isSetDatasource(); + boolean that_present_datasource = true && that.isSetDatasource(); + if (this_present_datasource || that_present_datasource) { + if (!(this_present_datasource && that_present_datasource)) + return false; + if (!this.datasource.equals(that.datasource)) + return false; + } + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_creation_time = true; + boolean that_present_creation_time = true; + if (this_present_creation_time || that_present_creation_time) { + if (!(this_present_creation_time && that_present_creation_time)) + return false; + if (this.creation_time != that.creation_time) + return false; + } + + boolean this_present_execution_time = true; + boolean that_present_execution_time = true; + if (this_present_execution_time || that_present_execution_time) { + if (!(this_present_execution_time && that_present_execution_time)) + return false; + if (this.execution_time != that.execution_time) + return false; + } + + boolean this_present_output_result_size = true; + boolean that_present_output_result_size = true; + if (this_present_output_result_size || that_present_output_result_size) { + if (!(this_present_output_result_size && that_present_output_result_size)) + return false; + if (this.output_result_size != that.output_result_size) + return false; + } + + boolean this_present_authenticator = true && this.isSetAuthenticator(); + boolean that_present_authenticator = true && that.isSetAuthenticator(); + if (this_present_authenticator || that_present_authenticator) { + if (!(this_present_authenticator && that_present_authenticator)) + return false; + if (!this.authenticator.equals(that.authenticator)) + return false; + } + + boolean this_present_stats = true && this.isSetStats(); + boolean that_present_stats = true && that.isSetStats(); + if (this_present_stats || that_present_stats) { + if (!(this_present_stats && that_present_stats)) + return false; + if (!this.stats.equals(that.stats)) + return false; + } + + boolean this_present_imply_data_cube = true && this.isSetImply_data_cube(); + boolean that_present_imply_data_cube = true && that.isSetImply_data_cube(); + if (this_present_imply_data_cube || that_present_imply_data_cube) { + if (!(this_present_imply_data_cube && that_present_imply_data_cube)) + return false; + if (!this.imply_data_cube.equals(that.imply_data_cube)) + return false; + } + + boolean this_present_imply_feature = true && this.isSetImply_feature(); + boolean that_present_imply_feature = true && that.isSetImply_feature(); + if (this_present_imply_feature || that_present_imply_feature) { + if (!(this_present_imply_feature && that_present_imply_feature)) + return false; + if (!this.imply_feature.equals(that.imply_feature)) + return false; + } + + boolean this_present_imply_user = true && this.isSetImply_user(); + boolean that_present_imply_user = true && that.isSetImply_user(); + if (this_present_imply_user || that_present_imply_user) { + if (!(this_present_imply_user && that_present_imply_user)) + return false; + if (!this.imply_user.equals(that.imply_user)) + return false; + } + + boolean this_present_imply_user_email = true && this.isSetImply_user_email(); + boolean that_present_imply_user_email = true && that.isSetImply_user_email(); + if (this_present_imply_user_email || that_present_imply_user_email) { + if (!(this_present_imply_user_email && that_present_imply_user_email)) + return false; + if (!this.imply_user_email.equals(that.imply_user_email)) + return false; + } + + boolean this_present_imply_view = true && this.isSetImply_view(); + boolean that_present_imply_view = true && that.isSetImply_view(); + if (this_present_imply_view || that_present_imply_view) { + if (!(this_present_imply_view && that_present_imply_view)) + return false; + if (!this.imply_view.equals(that.imply_view)) + return false; + } + + boolean this_present_imply_view_title = true && this.isSetImply_view_title(); + boolean that_present_imply_view_title = true && that.isSetImply_view_title(); + if (this_present_imply_view_title || that_present_imply_view_title) { + if (!(this_present_imply_view_title && that_present_imply_view_title)) + return false; + if (!this.imply_view_title.equals(that.imply_view_title)) + return false; + } + + boolean this_present_imply_priority = true && this.isSetImply_priority(); + boolean that_present_imply_priority = true && that.isSetImply_priority(); + if (this_present_imply_priority || that_present_imply_priority) { + if (!(this_present_imply_priority && that_present_imply_priority)) + return false; + if (this.imply_priority != that.imply_priority) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetNative_query_id()) ? 131071 : 524287); + if (isSetNative_query_id()) + hashCode = hashCode * 8191 + native_query_id.hashCode(); + + hashCode = hashCode * 8191 + ((isSetSql_query_id()) ? 131071 : 524287); + if (isSetSql_query_id()) + hashCode = hashCode * 8191 + sql_query_id.hashCode(); + + hashCode = hashCode * 8191 + ((isSetRole()) ? 131071 : 524287); + if (isSetRole()) + hashCode = hashCode * 8191 + role.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDruid_version()) ? 131071 : 524287); + if (isSetDruid_version()) + hashCode = hashCode * 8191 + druid_version.hashCode(); + + hashCode = hashCode * 8191 + ((isSetEnvironment()) ? 131071 : 524287); + if (isSetEnvironment()) + hashCode = hashCode * 8191 + environment.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDatacenter()) ? 131071 : 524287); + if (isSetDatacenter()) + hashCode = hashCode * 8191 + datacenter.hashCode(); + + hashCode = hashCode * 8191 + ((isSetCluster_name()) ? 131071 : 524287); + if (isSetCluster_name()) + hashCode = hashCode * 8191 + cluster_name.hashCode(); + + hashCode = hashCode * 8191 + ((isSetService_name()) ? 131071 : 524287); + if (isSetService_name()) + hashCode = hashCode * 8191 + service_name.hashCode(); + + hashCode = hashCode * 8191 + ((isSetHost()) ? 131071 : 524287); + if (isSetHost()) + hashCode = hashCode * 8191 + host.hashCode(); + + hashCode = hashCode * 8191 + ((isSetRemote_address()) ? 131071 : 524287); + if (isSetRemote_address()) + hashCode = hashCode * 8191 + remote_address.hashCode(); + + hashCode = hashCode * 8191 + ((is_sql_query) ? 131071 : 524287); + + hashCode = hashCode * 8191 + ((isSetQuery()) ? 131071 : 524287); + if (isSetQuery()) + hashCode = hashCode * 8191 + query.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDatasource()) ? 131071 : 524287); + if (isSetDatasource()) + hashCode = hashCode * 8191 + datasource.hashCode(); + + hashCode = hashCode * 8191 + ((success) ? 131071 : 524287); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(creation_time); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(execution_time); + + hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(output_result_size); + + hashCode = hashCode * 8191 + ((isSetAuthenticator()) ? 131071 : 524287); + if (isSetAuthenticator()) + hashCode = hashCode * 8191 + authenticator.hashCode(); + + hashCode = hashCode * 8191 + ((isSetStats()) ? 131071 : 524287); + if (isSetStats()) + hashCode = hashCode * 8191 + stats.hashCode(); + + hashCode = hashCode * 8191 + ((isSetImply_data_cube()) ? 131071 : 524287); + if (isSetImply_data_cube()) + hashCode = hashCode * 8191 + imply_data_cube.hashCode(); + + hashCode = hashCode * 8191 + ((isSetImply_feature()) ? 131071 : 524287); + if (isSetImply_feature()) + hashCode = hashCode * 8191 + imply_feature.hashCode(); + + hashCode = hashCode * 8191 + ((isSetImply_user()) ? 131071 : 524287); + if (isSetImply_user()) + hashCode = hashCode * 8191 + imply_user.hashCode(); + + hashCode = hashCode * 8191 + ((isSetImply_user_email()) ? 131071 : 524287); + if (isSetImply_user_email()) + hashCode = hashCode * 8191 + imply_user_email.hashCode(); + + hashCode = hashCode * 8191 + ((isSetImply_view()) ? 131071 : 524287); + if (isSetImply_view()) + hashCode = hashCode * 8191 + imply_view.hashCode(); + + hashCode = hashCode * 8191 + ((isSetImply_view_title()) ? 131071 : 524287); + if (isSetImply_view_title()) + hashCode = hashCode * 8191 + imply_view_title.hashCode(); + + hashCode = hashCode * 8191 + ((isSetImply_priority()) ? 131071 : 524287); + if (isSetImply_priority()) + hashCode = hashCode * 8191 + imply_priority; + + return hashCode; + } + + @Override + public int compareTo(DruidQueryLogEvent other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.valueOf(isSetNative_query_id()).compareTo(other.isSetNative_query_id()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNative_query_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.native_query_id, other.native_query_id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetSql_query_id()).compareTo(other.isSetSql_query_id()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSql_query_id()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sql_query_id, other.sql_query_id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetRole()).compareTo(other.isSetRole()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRole()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, other.role); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetDruid_version()).compareTo(other.isSetDruid_version()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDruid_version()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.druid_version, other.druid_version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetEnvironment()).compareTo(other.isSetEnvironment()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEnvironment()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.environment, other.environment); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetDatacenter()).compareTo(other.isSetDatacenter()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatacenter()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.datacenter, other.datacenter); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetCluster_name()).compareTo(other.isSetCluster_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCluster_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cluster_name, other.cluster_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetService_name()).compareTo(other.isSetService_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetService_name()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.service_name, other.service_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetHost()).compareTo(other.isSetHost()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetHost()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, other.host); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetRemote_address()).compareTo(other.isSetRemote_address()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRemote_address()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remote_address, other.remote_address); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetIs_sql_query()).compareTo(other.isSetIs_sql_query()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIs_sql_query()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.is_sql_query, other.is_sql_query); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetQuery()).compareTo(other.isSetQuery()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQuery()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetDatasource()).compareTo(other.isSetDatasource()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatasource()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.datasource, other.datasource); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetCreation_time()).compareTo(other.isSetCreation_time()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreation_time()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creation_time, other.creation_time); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetExecution_time()).compareTo(other.isSetExecution_time()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExecution_time()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.execution_time, other.execution_time); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetOutput_result_size()).compareTo(other.isSetOutput_result_size()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOutput_result_size()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.output_result_size, other.output_result_size); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetAuthenticator()).compareTo(other.isSetAuthenticator()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAuthenticator()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authenticator, other.authenticator); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetStats()).compareTo(other.isSetStats()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStats()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stats, other.stats); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetImply_data_cube()).compareTo(other.isSetImply_data_cube()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImply_data_cube()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imply_data_cube, other.imply_data_cube); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetImply_feature()).compareTo(other.isSetImply_feature()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImply_feature()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imply_feature, other.imply_feature); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetImply_user()).compareTo(other.isSetImply_user()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImply_user()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imply_user, other.imply_user); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetImply_user_email()).compareTo(other.isSetImply_user_email()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImply_user_email()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imply_user_email, other.imply_user_email); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetImply_view()).compareTo(other.isSetImply_view()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImply_view()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imply_view, other.imply_view); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetImply_view_title()).compareTo(other.isSetImply_view_title()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImply_view_title()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imply_view_title, other.imply_view_title); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = java.lang.Boolean.valueOf(isSetImply_priority()).compareTo(other.isSetImply_priority()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetImply_priority()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imply_priority, other.imply_priority); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("DruidQueryLogEvent("); + boolean first = true; + + sb.append("native_query_id:"); + if (this.native_query_id == null) { + sb.append("null"); + } else { + sb.append(this.native_query_id); + } + first = false; + if (isSetSql_query_id()) { + if (!first) sb.append(", "); + sb.append("sql_query_id:"); + if (this.sql_query_id == null) { + sb.append("null"); + } else { + sb.append(this.sql_query_id); + } + first = false; + } + if (isSetRole()) { + if (!first) sb.append(", "); + sb.append("role:"); + if (this.role == null) { + sb.append("null"); + } else { + sb.append(this.role); + } + first = false; + } + if (isSetDruid_version()) { + if (!first) sb.append(", "); + sb.append("druid_version:"); + if (this.druid_version == null) { + sb.append("null"); + } else { + sb.append(this.druid_version); + } + first = false; + } + if (isSetEnvironment()) { + if (!first) sb.append(", "); + sb.append("environment:"); + if (this.environment == null) { + sb.append("null"); + } else { + sb.append(this.environment); + } + first = false; + } + if (isSetDatacenter()) { + if (!first) sb.append(", "); + sb.append("datacenter:"); + if (this.datacenter == null) { + sb.append("null"); + } else { + sb.append(this.datacenter); + } + first = false; + } + if (isSetCluster_name()) { + if (!first) sb.append(", "); + sb.append("cluster_name:"); + if (this.cluster_name == null) { + sb.append("null"); + } else { + sb.append(this.cluster_name); + } + first = false; + } + if (isSetService_name()) { + if (!first) sb.append(", "); + sb.append("service_name:"); + if (this.service_name == null) { + sb.append("null"); + } else { + sb.append(this.service_name); + } + first = false; + } + if (isSetHost()) { + if (!first) sb.append(", "); + sb.append("host:"); + if (this.host == null) { + sb.append("null"); + } else { + sb.append(this.host); + } + first = false; + } + if (isSetRemote_address()) { + if (!first) sb.append(", "); + sb.append("remote_address:"); + if (this.remote_address == null) { + sb.append("null"); + } else { + sb.append(this.remote_address); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("is_sql_query:"); + sb.append(this.is_sql_query); + first = false; + if (!first) sb.append(", "); + sb.append("query:"); + if (this.query == null) { + sb.append("null"); + } else { + sb.append(this.query); + } + first = false; + if (isSetDatasource()) { + if (!first) sb.append(", "); + sb.append("datasource:"); + if (this.datasource == null) { + sb.append("null"); + } else { + sb.append(this.datasource); + } + first = false; + } + if (!first) sb.append(", "); + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("creation_time:"); + sb.append(this.creation_time); + first = false; + if (!first) sb.append(", "); + sb.append("execution_time:"); + sb.append(this.execution_time); + first = false; + if (!first) sb.append(", "); + sb.append("output_result_size:"); + sb.append(this.output_result_size); + first = false; + if (!first) sb.append(", "); + sb.append("authenticator:"); + if (this.authenticator == null) { + sb.append("null"); + } else { + sb.append(this.authenticator); + } + first = false; + if (!first) sb.append(", "); + sb.append("stats:"); + if (this.stats == null) { + sb.append("null"); + } else { + sb.append(this.stats); + } + first = false; + if (isSetImply_data_cube()) { + if (!first) sb.append(", "); + sb.append("imply_data_cube:"); + if (this.imply_data_cube == null) { + sb.append("null"); + } else { + sb.append(this.imply_data_cube); + } + first = false; + } + if (isSetImply_feature()) { + if (!first) sb.append(", "); + sb.append("imply_feature:"); + if (this.imply_feature == null) { + sb.append("null"); + } else { + sb.append(this.imply_feature); + } + first = false; + } + if (isSetImply_user()) { + if (!first) sb.append(", "); + sb.append("imply_user:"); + if (this.imply_user == null) { + sb.append("null"); + } else { + sb.append(this.imply_user); + } + first = false; + } + if (isSetImply_user_email()) { + if (!first) sb.append(", "); + sb.append("imply_user_email:"); + if (this.imply_user_email == null) { + sb.append("null"); + } else { + sb.append(this.imply_user_email); + } + first = false; + } + if (isSetImply_view()) { + if (!first) sb.append(", "); + sb.append("imply_view:"); + if (this.imply_view == null) { + sb.append("null"); + } else { + sb.append(this.imply_view); + } + first = false; + } + if (isSetImply_view_title()) { + if (!first) sb.append(", "); + sb.append("imply_view_title:"); + if (this.imply_view_title == null) { + sb.append("null"); + } else { + sb.append(this.imply_view_title); + } + first = false; + } + if (isSetImply_priority()) { + if (!first) sb.append(", "); + sb.append("imply_priority:"); + sb.append(this.imply_priority); + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (native_query_id == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'native_query_id' was not present! Struct: " + toString()); + } + // alas, we cannot check 'is_sql_query' because it's a primitive and you chose the non-beans generator. + if (query == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'query' was not present! Struct: " + toString()); + } + // alas, we cannot check 'success' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'creation_time' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'execution_time' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'output_result_size' because it's a primitive and you chose the non-beans generator. + if (authenticator == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'authenticator' was not present! Struct: " + toString()); + } + if (stats == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'stats' was not present! Struct: " + toString()); + } + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class DruidQueryLogEventStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public DruidQueryLogEventStandardScheme getScheme() { + return new DruidQueryLogEventStandardScheme(); + } + } + + private static class DruidQueryLogEventStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, DruidQueryLogEvent struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NATIVE_QUERY_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.native_query_id = iprot.readString(); + struct.setNative_query_idIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // SQL_QUERY_ID + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.sql_query_id = iprot.readString(); + struct.setSql_query_idIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ROLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.role = iprot.readString(); + struct.setRoleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // DRUID_VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.druid_version = iprot.readString(); + struct.setDruid_versionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ENVIRONMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.environment = iprot.readString(); + struct.setEnvironmentIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // DATACENTER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.datacenter = iprot.readString(); + struct.setDatacenterIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // CLUSTER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.cluster_name = iprot.readString(); + struct.setCluster_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // SERVICE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.service_name = iprot.readString(); + struct.setService_nameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // HOST + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.host = iprot.readString(); + struct.setHostIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 10: // REMOTE_ADDRESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.remote_address = iprot.readString(); + struct.setRemote_addressIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 11: // IS_SQL_QUERY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.is_sql_query = iprot.readBool(); + struct.setIs_sql_queryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 12: // QUERY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.query = iprot.readString(); + struct.setQueryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 13: // DATASOURCE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.datasource = iprot.readString(); + struct.setDatasourceIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 14: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 15: // CREATION_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.creation_time = iprot.readI64(); + struct.setCreation_timeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // EXECUTION_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.execution_time = iprot.readI64(); + struct.setExecution_timeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 17: // OUTPUT_RESULT_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.output_result_size = iprot.readI64(); + struct.setOutput_result_sizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 18: // AUTHENTICATOR + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.authenticator = iprot.readString(); + struct.setAuthenticatorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 19: // STATS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.stats = iprot.readString(); + struct.setStatsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 20: // IMPLY_DATA_CUBE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imply_data_cube = iprot.readString(); + struct.setImply_data_cubeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 21: // IMPLY_FEATURE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imply_feature = iprot.readString(); + struct.setImply_featureIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 22: // IMPLY_USER + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imply_user = iprot.readString(); + struct.setImply_userIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 23: // IMPLY_USER_EMAIL + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imply_user_email = iprot.readString(); + struct.setImply_user_emailIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 24: // IMPLY_VIEW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imply_view = iprot.readString(); + struct.setImply_viewIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 25: // IMPLY_VIEW_TITLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.imply_view_title = iprot.readString(); + struct.setImply_view_titleIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 26: // IMPLY_PRIORITY + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.imply_priority = iprot.readI32(); + struct.setImply_priorityIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetIs_sql_query()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'is_sql_query' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetSuccess()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'success' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetCreation_time()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'creation_time' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetExecution_time()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'execution_time' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetOutput_result_size()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'output_result_size' was not found in serialized data! Struct: " + toString()); + } + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, DruidQueryLogEvent struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.native_query_id != null) { + oprot.writeFieldBegin(NATIVE_QUERY_ID_FIELD_DESC); + oprot.writeString(struct.native_query_id); + oprot.writeFieldEnd(); + } + if (struct.sql_query_id != null) { + if (struct.isSetSql_query_id()) { + oprot.writeFieldBegin(SQL_QUERY_ID_FIELD_DESC); + oprot.writeString(struct.sql_query_id); + oprot.writeFieldEnd(); + } + } + if (struct.role != null) { + if (struct.isSetRole()) { + oprot.writeFieldBegin(ROLE_FIELD_DESC); + oprot.writeString(struct.role); + oprot.writeFieldEnd(); + } + } + if (struct.druid_version != null) { + if (struct.isSetDruid_version()) { + oprot.writeFieldBegin(DRUID_VERSION_FIELD_DESC); + oprot.writeString(struct.druid_version); + oprot.writeFieldEnd(); + } + } + if (struct.environment != null) { + if (struct.isSetEnvironment()) { + oprot.writeFieldBegin(ENVIRONMENT_FIELD_DESC); + oprot.writeString(struct.environment); + oprot.writeFieldEnd(); + } + } + if (struct.datacenter != null) { + if (struct.isSetDatacenter()) { + oprot.writeFieldBegin(DATACENTER_FIELD_DESC); + oprot.writeString(struct.datacenter); + oprot.writeFieldEnd(); + } + } + if (struct.cluster_name != null) { + if (struct.isSetCluster_name()) { + oprot.writeFieldBegin(CLUSTER_NAME_FIELD_DESC); + oprot.writeString(struct.cluster_name); + oprot.writeFieldEnd(); + } + } + if (struct.service_name != null) { + if (struct.isSetService_name()) { + oprot.writeFieldBegin(SERVICE_NAME_FIELD_DESC); + oprot.writeString(struct.service_name); + oprot.writeFieldEnd(); + } + } + if (struct.host != null) { + if (struct.isSetHost()) { + oprot.writeFieldBegin(HOST_FIELD_DESC); + oprot.writeString(struct.host); + oprot.writeFieldEnd(); + } + } + if (struct.remote_address != null) { + if (struct.isSetRemote_address()) { + oprot.writeFieldBegin(REMOTE_ADDRESS_FIELD_DESC); + oprot.writeString(struct.remote_address); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldBegin(IS_SQL_QUERY_FIELD_DESC); + oprot.writeBool(struct.is_sql_query); + oprot.writeFieldEnd(); + if (struct.query != null) { + oprot.writeFieldBegin(QUERY_FIELD_DESC); + oprot.writeString(struct.query); + oprot.writeFieldEnd(); + } + if (struct.datasource != null) { + if (struct.isSetDatasource()) { + oprot.writeFieldBegin(DATASOURCE_FIELD_DESC); + oprot.writeString(struct.datasource); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(CREATION_TIME_FIELD_DESC); + oprot.writeI64(struct.creation_time); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(EXECUTION_TIME_FIELD_DESC); + oprot.writeI64(struct.execution_time); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(OUTPUT_RESULT_SIZE_FIELD_DESC); + oprot.writeI64(struct.output_result_size); + oprot.writeFieldEnd(); + if (struct.authenticator != null) { + oprot.writeFieldBegin(AUTHENTICATOR_FIELD_DESC); + oprot.writeString(struct.authenticator); + oprot.writeFieldEnd(); + } + if (struct.stats != null) { + oprot.writeFieldBegin(STATS_FIELD_DESC); + oprot.writeString(struct.stats); + oprot.writeFieldEnd(); + } + if (struct.imply_data_cube != null) { + if (struct.isSetImply_data_cube()) { + oprot.writeFieldBegin(IMPLY_DATA_CUBE_FIELD_DESC); + oprot.writeString(struct.imply_data_cube); + oprot.writeFieldEnd(); + } + } + if (struct.imply_feature != null) { + if (struct.isSetImply_feature()) { + oprot.writeFieldBegin(IMPLY_FEATURE_FIELD_DESC); + oprot.writeString(struct.imply_feature); + oprot.writeFieldEnd(); + } + } + if (struct.imply_user != null) { + if (struct.isSetImply_user()) { + oprot.writeFieldBegin(IMPLY_USER_FIELD_DESC); + oprot.writeString(struct.imply_user); + oprot.writeFieldEnd(); + } + } + if (struct.imply_user_email != null) { + if (struct.isSetImply_user_email()) { + oprot.writeFieldBegin(IMPLY_USER_EMAIL_FIELD_DESC); + oprot.writeString(struct.imply_user_email); + oprot.writeFieldEnd(); + } + } + if (struct.imply_view != null) { + if (struct.isSetImply_view()) { + oprot.writeFieldBegin(IMPLY_VIEW_FIELD_DESC); + oprot.writeString(struct.imply_view); + oprot.writeFieldEnd(); + } + } + if (struct.imply_view_title != null) { + if (struct.isSetImply_view_title()) { + oprot.writeFieldBegin(IMPLY_VIEW_TITLE_FIELD_DESC); + oprot.writeString(struct.imply_view_title); + oprot.writeFieldEnd(); + } + } + if (struct.isSetImply_priority()) { + oprot.writeFieldBegin(IMPLY_PRIORITY_FIELD_DESC); + oprot.writeI32(struct.imply_priority); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class DruidQueryLogEventTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public DruidQueryLogEventTupleScheme getScheme() { + return new DruidQueryLogEventTupleScheme(); + } + } + + private static class DruidQueryLogEventTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, DruidQueryLogEvent struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + oprot.writeString(struct.native_query_id); + oprot.writeBool(struct.is_sql_query); + oprot.writeString(struct.query); + oprot.writeBool(struct.success); + oprot.writeI64(struct.creation_time); + oprot.writeI64(struct.execution_time); + oprot.writeI64(struct.output_result_size); + oprot.writeString(struct.authenticator); + oprot.writeString(struct.stats); + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSql_query_id()) { + optionals.set(0); + } + if (struct.isSetRole()) { + optionals.set(1); + } + if (struct.isSetDruid_version()) { + optionals.set(2); + } + if (struct.isSetEnvironment()) { + optionals.set(3); + } + if (struct.isSetDatacenter()) { + optionals.set(4); + } + if (struct.isSetCluster_name()) { + optionals.set(5); + } + if (struct.isSetService_name()) { + optionals.set(6); + } + if (struct.isSetHost()) { + optionals.set(7); + } + if (struct.isSetRemote_address()) { + optionals.set(8); + } + if (struct.isSetDatasource()) { + optionals.set(9); + } + if (struct.isSetImply_data_cube()) { + optionals.set(10); + } + if (struct.isSetImply_feature()) { + optionals.set(11); + } + if (struct.isSetImply_user()) { + optionals.set(12); + } + if (struct.isSetImply_user_email()) { + optionals.set(13); + } + if (struct.isSetImply_view()) { + optionals.set(14); + } + if (struct.isSetImply_view_title()) { + optionals.set(15); + } + if (struct.isSetImply_priority()) { + optionals.set(16); + } + oprot.writeBitSet(optionals, 17); + if (struct.isSetSql_query_id()) { + oprot.writeString(struct.sql_query_id); + } + if (struct.isSetRole()) { + oprot.writeString(struct.role); + } + if (struct.isSetDruid_version()) { + oprot.writeString(struct.druid_version); + } + if (struct.isSetEnvironment()) { + oprot.writeString(struct.environment); + } + if (struct.isSetDatacenter()) { + oprot.writeString(struct.datacenter); + } + if (struct.isSetCluster_name()) { + oprot.writeString(struct.cluster_name); + } + if (struct.isSetService_name()) { + oprot.writeString(struct.service_name); + } + if (struct.isSetHost()) { + oprot.writeString(struct.host); + } + if (struct.isSetRemote_address()) { + oprot.writeString(struct.remote_address); + } + if (struct.isSetDatasource()) { + oprot.writeString(struct.datasource); + } + if (struct.isSetImply_data_cube()) { + oprot.writeString(struct.imply_data_cube); + } + if (struct.isSetImply_feature()) { + oprot.writeString(struct.imply_feature); + } + if (struct.isSetImply_user()) { + oprot.writeString(struct.imply_user); + } + if (struct.isSetImply_user_email()) { + oprot.writeString(struct.imply_user_email); + } + if (struct.isSetImply_view()) { + oprot.writeString(struct.imply_view); + } + if (struct.isSetImply_view_title()) { + oprot.writeString(struct.imply_view_title); + } + if (struct.isSetImply_priority()) { + oprot.writeI32(struct.imply_priority); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, DruidQueryLogEvent struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + struct.native_query_id = iprot.readString(); + struct.setNative_query_idIsSet(true); + struct.is_sql_query = iprot.readBool(); + struct.setIs_sql_queryIsSet(true); + struct.query = iprot.readString(); + struct.setQueryIsSet(true); + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + struct.creation_time = iprot.readI64(); + struct.setCreation_timeIsSet(true); + struct.execution_time = iprot.readI64(); + struct.setExecution_timeIsSet(true); + struct.output_result_size = iprot.readI64(); + struct.setOutput_result_sizeIsSet(true); + struct.authenticator = iprot.readString(); + struct.setAuthenticatorIsSet(true); + struct.stats = iprot.readString(); + struct.setStatsIsSet(true); + java.util.BitSet incoming = iprot.readBitSet(17); + if (incoming.get(0)) { + struct.sql_query_id = iprot.readString(); + struct.setSql_query_idIsSet(true); + } + if (incoming.get(1)) { + struct.role = iprot.readString(); + struct.setRoleIsSet(true); + } + if (incoming.get(2)) { + struct.druid_version = iprot.readString(); + struct.setDruid_versionIsSet(true); + } + if (incoming.get(3)) { + struct.environment = iprot.readString(); + struct.setEnvironmentIsSet(true); + } + if (incoming.get(4)) { + struct.datacenter = iprot.readString(); + struct.setDatacenterIsSet(true); + } + if (incoming.get(5)) { + struct.cluster_name = iprot.readString(); + struct.setCluster_nameIsSet(true); + } + if (incoming.get(6)) { + struct.service_name = iprot.readString(); + struct.setService_nameIsSet(true); + } + if (incoming.get(7)) { + struct.host = iprot.readString(); + struct.setHostIsSet(true); + } + if (incoming.get(8)) { + struct.remote_address = iprot.readString(); + struct.setRemote_addressIsSet(true); + } + if (incoming.get(9)) { + struct.datasource = iprot.readString(); + struct.setDatasourceIsSet(true); + } + if (incoming.get(10)) { + struct.imply_data_cube = iprot.readString(); + struct.setImply_data_cubeIsSet(true); + } + if (incoming.get(11)) { + struct.imply_feature = iprot.readString(); + struct.setImply_featureIsSet(true); + } + if (incoming.get(12)) { + struct.imply_user = iprot.readString(); + struct.setImply_userIsSet(true); + } + if (incoming.get(13)) { + struct.imply_user_email = iprot.readString(); + struct.setImply_user_emailIsSet(true); + } + if (incoming.get(14)) { + struct.imply_view = iprot.readString(); + struct.setImply_viewIsSet(true); + } + if (incoming.get(15)) { + struct.imply_view_title = iprot.readString(); + struct.setImply_view_titleIsSet(true); + } + if (incoming.get(16)) { + struct.imply_priority = iprot.readI32(); + struct.setImply_priorityIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } +} + diff --git a/extensions-twitter/twitter-thrift-extensions/pom.xml b/extensions-twitter/twitter-thrift-extensions/pom.xml index b329900920ca..79ddc8a0a131 100644 --- a/extensions-twitter/twitter-thrift-extensions/pom.xml +++ b/extensions-twitter/twitter-thrift-extensions/pom.xml @@ -28,7 +28,7 @@ druid org.apache.druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 ../../pom.xml 4.0.0 diff --git a/hll/pom.xml b/hll/pom.xml index 3cfd1ae36da1..ac294cd55afd 100644 --- a/hll/pom.xml +++ b/hll/pom.xml @@ -24,7 +24,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 druid-hll diff --git a/indexing-hadoop/pom.xml b/indexing-hadoop/pom.xml index 68861e2c571a..db566393ae03 100644 --- a/indexing-hadoop/pom.xml +++ b/indexing-hadoop/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 diff --git a/indexing-service/pom.xml b/indexing-service/pom.xml index 1458c2198342..b0db81874205 100644 --- a/indexing-service/pom.xml +++ b/indexing-service/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 diff --git a/integration-tests/docker/Dockerfile b/integration-tests/docker/Dockerfile index b8ef7d5c45e6..200f0a2ab13e 100644 --- a/integration-tests/docker/Dockerfile +++ b/integration-tests/docker/Dockerfile @@ -51,11 +51,11 @@ ADD lib/* /usr/local/druid/lib/ # target path must match the exact path referenced in environment-configs/common # alternatively: Download the MariaDB Java connector, and pretend it is the mysql connector RUN if [ "$MYSQL_DRIVER_CLASSNAME" = "com.mysql.jdbc.Driver" ] ; \ - then wget -q "https://repo1.maven.org/maven2/mysql/mysql-connector-java/$MYSQL_VERSION/mysql-connector-java-$MYSQL_VERSION.jar" \ - -O /usr/local/druid/lib/mysql-connector-java.jar; \ + then wget -q "https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/$MYSQL_VERSION/mysql-connector-j-$MYSQL_VERSION.jar" \ + -O /usr/local/druid/lib/mysql-connector-j.jar; \ elif [ "$MYSQL_DRIVER_CLASSNAME" = "org.mariadb.jdbc.Driver" ] ; \ then wget -q "https://repo1.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/$MARIA_VERSION/mariadb-java-client-$MARIA_VERSION.jar" \ - -O /usr/local/druid/lib/mysql-connector-java.jar; \ + -O /usr/local/druid/lib/mysql-connector-j.jar; \ fi # download kafka protobuf provider diff --git a/integration-tests/docker/environment-configs/common b/integration-tests/docker/environment-configs/common index 2ded3965bb55..740adb092724 100644 --- a/integration-tests/docker/environment-configs/common +++ b/integration-tests/docker/environment-configs/common @@ -23,7 +23,7 @@ LC_ALL=C.UTF-8 # JAVA OPTS COMMON_DRUID_JAVA_OPTS=-Duser.timezone=UTC -Dfile.encoding=UTF-8 -Dlog4j.configurationFile=/shared/docker/lib/log4j2.xml -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -DRUID_DEP_LIB_DIR=/shared/hadoop_xml:/shared/docker/lib/*:/usr/local/druid/lib/mysql-connector-java.jar +DRUID_DEP_LIB_DIR=/shared/hadoop_xml:/shared/docker/lib/*:/usr/local/druid/lib/mysql-connector-j.jar # Druid configs druid_extensions_loadList=[] diff --git a/integration-tests/docker/environment-configs/common-custom-coordinator-duties b/integration-tests/docker/environment-configs/common-custom-coordinator-duties index e6bddd658f6b..fee1cf69ae0d 100644 --- a/integration-tests/docker/environment-configs/common-custom-coordinator-duties +++ b/integration-tests/docker/environment-configs/common-custom-coordinator-duties @@ -23,7 +23,7 @@ LC_ALL=C.UTF-8 # JAVA OPTS COMMON_DRUID_JAVA_OPTS=-Duser.timezone=UTC -Dfile.encoding=UTF-8 -Dlog4j.configurationFile=/shared/docker/lib/log4j2.xml -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -DRUID_DEP_LIB_DIR=/shared/hadoop_xml:/shared/docker/lib/*:/usr/local/druid/lib/mysql-connector-java.jar +DRUID_DEP_LIB_DIR=/shared/hadoop_xml:/shared/docker/lib/*:/usr/local/druid/lib/mysql-connector-j.jar # Druid configs druid_extensions_loadList=[] @@ -78,4 +78,4 @@ druid_coordinator_kill_supervisor_on=false druid_coordinator_dutyGroups=["cleanupMetadata"] druid_coordinator_cleanupMetadata_duties=["killSupervisors"] druid_coordinator_cleanupMetadata_duty_killSupervisors_retainDuration=PT0M -druid_coordinator_cleanupMetadata_period=PT10S \ No newline at end of file +druid_coordinator_cleanupMetadata_period=PT10S diff --git a/integration-tests/docker/environment-configs/common-ldap b/integration-tests/docker/environment-configs/common-ldap index 243f09d66d65..1b4d4beb707e 100644 --- a/integration-tests/docker/environment-configs/common-ldap +++ b/integration-tests/docker/environment-configs/common-ldap @@ -23,7 +23,7 @@ LC_ALL=C.UTF-8 # JAVA OPTS COMMON_DRUID_JAVA_OPTS=-Duser.timezone=UTC -Dfile.encoding=UTF-8 -Dlog4j.configurationFile=/shared/docker/lib/log4j2.xml -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -DRUID_DEP_LIB_DIR=/shared/hadoop_xml:/shared/docker/lib/*:/usr/local/druid/lib/mysql-connector-java.jar +DRUID_DEP_LIB_DIR=/shared/hadoop_xml:/shared/docker/lib/*:/usr/local/druid/lib/mysql-connector-j.jar # Druid configs druid_extensions_loadList=[] @@ -77,4 +77,4 @@ druid_auth_basic_common_maxSyncRetries=20 druid_indexer_logs_directory=/shared/tasklogs druid_sql_enable=true druid_extensions_hadoopDependenciesDir=/shared/hadoop-dependencies -druid_request_logging_type=slf4j \ No newline at end of file +druid_request_logging_type=slf4j diff --git a/integration-tests/docker/environment-configs/common-shuffle-deep-store b/integration-tests/docker/environment-configs/common-shuffle-deep-store index 30117bf369eb..e8627fbef6c9 100644 --- a/integration-tests/docker/environment-configs/common-shuffle-deep-store +++ b/integration-tests/docker/environment-configs/common-shuffle-deep-store @@ -23,7 +23,7 @@ LC_ALL=C.UTF-8 # JAVA OPTS COMMON_DRUID_JAVA_OPTS=-Duser.timezone=UTC -Dfile.encoding=UTF-8 -Dlog4j.configurationFile=/shared/docker/lib/log4j2.xml -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -DRUID_DEP_LIB_DIR=/shared/hadoop_xml:/shared/docker/lib/*:/usr/local/druid/lib/mysql-connector-java.jar +DRUID_DEP_LIB_DIR=/shared/hadoop_xml:/shared/docker/lib/*:/usr/local/druid/lib/mysql-connector-j.jar # Druid configs druid_extensions_loadList=[] diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index ee7d41a296d2..24c5f514a429 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 diff --git a/pom.xml b/pom.xml index 31a40b861d10..10408a8fefe5 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 pom Druid @@ -97,7 +97,7 @@ 2.10.5.20201202 1.9.13 2.16.0 - 5.1.48 + 8.2.0 2.7.3 3.10.6.Final 4.1.68.Final @@ -1297,6 +1297,11 @@ target/generated-sources/ + + **/DruidAdminLogEvent.java + **/DruidIndexingLogEvent.java + **/DruidQueryLogEvent.java + diff --git a/processing/pom.xml b/processing/pom.xml index bda9306ef392..38019fbd49ac 100644 --- a/processing/pom.xml +++ b/processing/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 diff --git a/server/pom.xml b/server/pom.xml index e8fa697a3208..e20ec97b71c4 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 diff --git a/server/src/main/java/org/apache/druid/server/initialization/JdbcAccessSecurityConfig.java b/server/src/main/java/org/apache/druid/server/initialization/JdbcAccessSecurityConfig.java index f2eda2cf34a4..42b0044b1d01 100644 --- a/server/src/main/java/org/apache/druid/server/initialization/JdbcAccessSecurityConfig.java +++ b/server/src/main/java/org/apache/druid/server/initialization/JdbcAccessSecurityConfig.java @@ -55,7 +55,7 @@ public class JdbcAccessSecurityConfig "HOST", "PORT", "NUM_HOSTS", - "DBNAME", + "dbname", // PostgreSQL "PGHOST", diff --git a/services/pom.xml b/services/pom.xml index f3c24cbebdc7..fca955c26848 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -27,7 +27,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 diff --git a/sql/pom.xml b/sql/pom.xml index 0a0aa3b1d281..7f16b71d9622 100644 --- a/sql/pom.xml +++ b/sql/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 diff --git a/web-console/pom.xml b/web-console/pom.xml index 5079d28ba242..5390133fd22d 100644 --- a/web-console/pom.xml +++ b/web-console/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8 diff --git a/website/pom.xml b/website/pom.xml index af106f02a1ea..41bf4f565adf 100644 --- a/website/pom.xml +++ b/website/pom.xml @@ -28,7 +28,7 @@ org.apache.druid druid - 0.22.1-tw-0.7 + 0.22.1-tw-0.8