HIVE-28144: Remove overly verbose debug messages from MetastoreDirectSqlUtils (Stamatis Zampetakis reviewed by Butao Zhang)

When BITVECTOR or KLL stats are disabled/not present in the metastore the following message may appear way too often in the HMS logs.
```
2024-03-22T01:50:57,849 DEBUG [CachedStore-CacheUpdateService: Thread-240] metastore.MetastoreDirectSqlUtils: Expected blob type but got java.lang.String
```
In fact in some cases, the message appears more than once for every single partition that is present in the table(s) being queried. When the number of partitions is important it can easily clog the logs with redundant and useless information.

To put things in perspective while running the cbo_query10.q on the statistics of TPC-DS30TB dataset the message occupies more than 50% (26MB) of the total log file (46MB).

The presence of the message does not tells us much on its own. In conjunction with the code we can infer that we are not fetching BITVECTOR/KLL stats from the metastore but this could be done in a different place without having to print the same message 170K times.

Removing this message saves disk space, avoids frequent log rotation, and improves the overall readability of the log file.

There is another redundant message which appears when transforming a database value to Boolean. The message is redundant since it is followed directly by an exception so there is no reason to have both. This message may not appear as often as the previous one but given that it doesn't add much value it can also be removed.

Close apache/hive#5159
1 file changed
tree: 84fd9f0b2ab67eb84a91a96fe28651d13a73f65e
  1. .github/
  2. accumulo-handler/
  3. beeline/
  4. bin/
  5. checkstyle/
  6. classification/
  7. cli/
  8. common/
  9. conf/
  10. contrib/
  11. data/
  12. dev-support/
  13. druid-handler/
  14. hbase-handler/
  15. hcatalog/
  16. hplsql/
  17. iceberg/
  18. itests/
  19. jdbc/
  20. jdbc-handler/
  21. kafka-handler/
  22. kudu-handler/
  23. lib/
  24. llap-client/
  25. llap-common/
  26. llap-ext-client/
  27. llap-server/
  28. llap-tez/
  29. metastore/
  30. packaging/
  31. parser/
  32. ql/
  33. serde/
  34. service/
  35. service-rpc/
  36. shims/
  37. spotbugs/
  38. standalone-metastore/
  39. storage-api/
  40. streaming/
  41. testutils/
  42. udf/
  43. vector-code-gen/
  44. .arcconfig
  45. .asf.yaml
  46. .checkstyle
  47. .gitattributes
  48. .gitignore
  49. .reviewboardrc
  50. errata.txt
  51. Jenkinsfile
  52. LICENSE
  53. LICENSE-binary
  54. NOTICE
  55. pom.xml
  56. README.md
  57. RELEASE_NOTES.txt
README.md

Apache Hive (TM)

Master Build Status Maven Central

The Apache Hive (TM) data warehouse software facilitates reading, writing, and managing large datasets residing in distributed storage using SQL. Built on top of Apache Hadoop (TM), it provides:

  • Tools to enable easy access to data via SQL, thus enabling data warehousing tasks such as extract/transform/load (ETL), reporting, and data analysis

  • A mechanism to impose structure on a variety of data formats

  • Access to files stored either directly in Apache HDFS (TM) or in other data storage systems such as Apache HBase (TM)

  • Query execution using Apache Hadoop MapReduce or Apache Tez frameworks.

Hive provides standard SQL functionality, including many of the later 2003 and 2011 features for analytics. These include OLAP functions, subqueries, common table expressions, and more. Hive's SQL can also be extended with user code via user defined functions (UDFs), user defined aggregates (UDAFs), and user defined table functions (UDTFs).

Hive users can choose between Apache Hadoop MapReduce or Apache Tez frameworks as their execution backend. Note that MapReduce framework has been deprecated since Hive 2, and Apache Tez is recommended. MapReduce is a mature framework that is proven at large scales. However, MapReduce is a purely batch framework, and queries using it may experience higher latencies (tens of seconds), even over small datasets. Apache Tez is designed for interactive query, and has substantially reduced overheads versus MapReduce.

Users are free to switch back and forth between these frameworks at any time. In each case, Hive is best suited for use cases where the amount of data processed is large enough to require a distributed system.

Hive is not designed for online transaction processing. It is best used for traditional data warehousing tasks. Hive is designed to maximize scalability (scale out with more machines added dynamically to the Hadoop cluster), performance, extensibility, fault-tolerance, and loose-coupling with its input formats.

General Info

For the latest information about Hive, please visit out website at:

http://hive.apache.org/

Getting Started

Requirements

Java

Hive VersionJava Version
Hive 1.0Java 6
Hive 1.1Java 6
Hive 1.2Java 7
Hive 2.xJava 7
Hive 3.xJava 8
Hive 4.xJava 8

Hadoop

  • Hadoop 1.x, 2.x
  • Hadoop 3.x (Hive 3.x)

Upgrading from older versions of Hive

  • Hive includes changes to the MetaStore schema. If you are upgrading from an earlier version of Hive it is imperative that you upgrade the MetaStore schema by running the appropriate schema upgrade scripts located in the scripts/metastore/upgrade directory.

  • We have provided upgrade scripts for MySQL, PostgreSQL, Oracle, Microsoft SQL Server, and Derby databases. If you are using a different database for your MetaStore you will need to provide your own upgrade script.

Useful mailing lists

  1. user@hive.apache.org - To discuss and ask usage questions. Send an empty email to user-subscribe@hive.apache.org in order to subscribe to this mailing list.

  2. dev@hive.apache.org - For discussions about code, design and features. Send an empty email to dev-subscribe@hive.apache.org in order to subscribe to this mailing list.

  3. commits@hive.apache.org - In order to monitor commits to the source repository. Send an empty email to commits-subscribe@hive.apache.org in order to subscribe to this mailing list.