Wrong results, high memory usage (OutOfMemoryError, GC pauses, etc), unresponsive server, infinite planning time, are some common issues that may arise when using Calcite and in general a query processor in production systems.
In this talk, we will demonstrate how we can exploit Calcite's built-in loggers (notably CALCITE-4704, and CALCITE-4991) to debug such issues through use-cases from Apache Hive.
Netronome's half-day tutorial on host data plane acceleration at ACM SIGCOMM 2018 introduced attendees to models for host data plane acceleration and provided an in-depth understanding of SmartNIC deployment models at hyperscale cloud vendors and telecom service providers.
Presenter Bio
Jaco Joubert is a Software Engineer at Netronome focusing on P4 and its applications on the Netronome SmartNIC. He recently started investigating network acceleration for Deep Learning on distributed systems. Prior to Netronome he worked on mobile application development and was a researcher at Telkom SA focusing on the mobile core after completing his Masters Degree in Computer, Electronic Engineering in 2014.
The document discusses optimizations made to Infinispan to improve performance and consistency for a trading application at the Chicago Board Options Exchange (CBOE). Some key points include:
- Early adoption of Infinispan led to some performance and consistency issues that required troubleshooting logs, cache contents, and test applications.
- Optimizations focused on asynchronous communication, queue flushing, and separating state provider/consumer roles to balance performance and consistency across cache tiers.
- Log analysis was important for detecting issues like out-of-order operations between active and passive nodes. Configuration tweaks like increasing queue size also helped.
GOTO 2013: Why Zalando trusts in PostgreSQLHenning Jacobs
NoSQL is on the rise but sadly when people compare the usual NoSQL candidates (Redis, MongoDB, Riak, Cassandra, HBase, ..) to relational databases they often only mention MySQL. In our presentation we tried to explain the power of the world’s most advanced opensource database - PostgreSQL. In our session we showed various examples of why we at Zalando trust PostgreSQL to reliably handle all our data. We make use of it in various scenarios, from less complex CRUD applications on a single node, to highly critical and more complex scenarios. This involves customer and order data with strong constraints for high performance and availability, sharded across multiple nodes. We believe that PostgreSQL is massively underrated and that you should have very good reasons to ignore its great features.
These are the slides I used to present "MySQL Performance Schema" at FOSSASIA, 2015 Singapore. It gives an overview of Performance Schema and also explains how it could be used to diagnose issues using few use cases.
This is a talk on how you can monitor your microservices architecture using Prometheus and Grafana. This has easy to execute steps to get a local monitoring stack running on your local machine using docker.
Nowadays when developers required to be aligned with operations it’s quite important to have common understanding of how application is performing in production. I believe quite small amount of developers are really care/think about operation of the app. In this talk I’m going to describe how it’s easy to provide performance information of application in production with Metrics by Coda Hale and to share practical use cases.
Netronome's half-day tutorial on host data plane acceleration at ACM SIGCOMM 2018 introduced attendees to models for host data plane acceleration and provided an in-depth understanding of SmartNIC deployment models at hyperscale cloud vendors and telecom service providers.
Presenter Bio
Jaco Joubert is a Software Engineer at Netronome focusing on P4 and its applications on the Netronome SmartNIC. He recently started investigating network acceleration for Deep Learning on distributed systems. Prior to Netronome he worked on mobile application development and was a researcher at Telkom SA focusing on the mobile core after completing his Masters Degree in Computer, Electronic Engineering in 2014.
The document discusses optimizations made to Infinispan to improve performance and consistency for a trading application at the Chicago Board Options Exchange (CBOE). Some key points include:
- Early adoption of Infinispan led to some performance and consistency issues that required troubleshooting logs, cache contents, and test applications.
- Optimizations focused on asynchronous communication, queue flushing, and separating state provider/consumer roles to balance performance and consistency across cache tiers.
- Log analysis was important for detecting issues like out-of-order operations between active and passive nodes. Configuration tweaks like increasing queue size also helped.
GOTO 2013: Why Zalando trusts in PostgreSQLHenning Jacobs
NoSQL is on the rise but sadly when people compare the usual NoSQL candidates (Redis, MongoDB, Riak, Cassandra, HBase, ..) to relational databases they often only mention MySQL. In our presentation we tried to explain the power of the world’s most advanced opensource database - PostgreSQL. In our session we showed various examples of why we at Zalando trust PostgreSQL to reliably handle all our data. We make use of it in various scenarios, from less complex CRUD applications on a single node, to highly critical and more complex scenarios. This involves customer and order data with strong constraints for high performance and availability, sharded across multiple nodes. We believe that PostgreSQL is massively underrated and that you should have very good reasons to ignore its great features.
These are the slides I used to present "MySQL Performance Schema" at FOSSASIA, 2015 Singapore. It gives an overview of Performance Schema and also explains how it could be used to diagnose issues using few use cases.
This is a talk on how you can monitor your microservices architecture using Prometheus and Grafana. This has easy to execute steps to get a local monitoring stack running on your local machine using docker.
Nowadays when developers required to be aligned with operations it’s quite important to have common understanding of how application is performing in production. I believe quite small amount of developers are really care/think about operation of the app. In this talk I’m going to describe how it’s easy to provide performance information of application in production with Metrics by Coda Hale and to share practical use cases.
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at RuntimeNETWAYS
If you want to trace or extract specific data from a Java application with OpenTelemetry, you usually have to modify the application’s code. However, this is often not possible, especially with bought-in software. We would like to show, how the open source inspectIT Ocelot Java agent can be used to dynamically inject OpenTelemetry code at runtime for extracting specific application and business data – and all this without having to adapt the application itself.
PyCon AU 2012 - Debugging Live Python Web ApplicationsGraham Dumpleton
Monitoring tools record the result of what happened to your web application when a problem arises, but for some classes of problems, monitoring systems are only a starting point. Sometimes it is necessary to take more intrusive steps to plan for the unexpected by embedding mechanisms that will allow you to interact with a live deployed web application and extract even more detailed information.
In the French FedEx company we used Prometheus to monitor the infrastructure. It hosts a CQRS Architecture composed with Kafka, Spark, Cassandra, ElasticSearch, and microservices APIs in scala.
This presentation is about using Prometheus in production, you will see why we choosed Prometheus, how we integrated it, configured it and what kind of insights we extracted from the whole infrastructure.
In addition, you will see how Prometheus changed our way of working, how we implemented self-healing based on Prometheus, how we configured systemd to trigger AlertManager API, integration with slack and other cool stuffs.
This document discusses how to connect logs to various network services using Logback. It begins with a brief introduction of common logging frameworks like SLF4J, Log4j 1, Log4j 2 and Logback. It then explains Logback's internal architecture including loggers, appenders and layouts. The main part demonstrates how to develop a custom appender in Logback to send logs to network services by utilizing the ILoggingEvent object. It provides code templates and examples of accessing log content and stack traces. Finally, it introduces some open source Logback appenders and the Logpush service for remote log monitoring.
How Many Ways Can I Manage Oracle GoldenGate?Enkitec
This document provides information about an upcoming E4 conference, including registration details, location information, and post-conference training days. It also contains tables describing Oracle GoldenGate parameters and commands for processes like EXTRACT, REPLICAT, and Manager. Bugs encountered with various Oracle GoldenGate components are also listed along with their corresponding MOS Note IDs for resolution. The document emphasizes properly monitoring data and evaluating any scripts used.
This document provides an overview of different tools for troubleshooting production application issues: IntelliTrace, WinDbg, and System Center Application Performance Monitoring (APM). IntelliTrace allows recording an application's execution flow and data for historical debugging. WinDbg generates dump files for critical hang/termination issues. System Center APM provides always-on monitoring of applications, performance monitoring, and correlation across servers. The document compares the tools and provides demos of collecting traces using IntelliTrace and monitoring an application with System Center APM.
Garelic: Google Analytics as App Performance monitoringJano Suchal
This document describes Garelic, an open source tool that allows using Google Analytics for app performance monitoring. It explains how Garelic uses Google Analytics features like User Timing and Custom Variables to track metrics like controller and ActiveRecord response times. Garelic implements this by monkey patching Rails and subscribing to ActiveSupport notifications to capture timing data and report it to Google Analytics. Some limitations are that it can't track redirects, AJAX, or jobs, and page caching breaks reports. Ideas for future work include error tracking and thresholding for slow responses only.
This presentation was prepared for a Webcast where John Yerhot, Engine Yard US Support Lead, and Chris Kelly, Technical Evangelist at New Relic discussed how you can scale and improve the performance of your Ruby web apps. They shared detailed guidance on issues like:
Caching strategies
Slow database queries
Background processing
Profiling Ruby applications
Picking the right Ruby web server
Sharding data
Attendees will learn how to:
Gain visibility on site performance
Improve scalability and uptime
Find and fix key bottlenecks
See the on-demand replay:
http://pages.engineyard.com/6TipsforImprovingRubyApplicationPerformance.html
GraalVM allows building native applications from Java and other JVM languages. It includes a new just-in-time compiler called Graal and the Truffle framework for building language interpreters. GraalVM also includes Sulong, which allows running LLVM-based languages on the JVM. The presenter discussed using GraalVM to build a native executable for a Zookeeper CLI tool called zkstat from Java code using techniques like ahead-of-time compilation with SubstrateVM, configuring reflection, and building a Docker image for distribution.
The document provides an overview of RxJava and its advantages over traditional Java streams and callbacks. It discusses key RxJava concepts like Observables, Observers, and Subscriptions. It demonstrates how to create Observables, subscribe to them, and compose operations like filter, map, and zip. It shows how to leverage schedulers to control threading. The document also provides examples of using RxJava with HTTP requests and the Twitter API to asynchronously retrieve user profiles and tweets. It highlights scenarios where RxJava is useful, like handling asynchronous operations, and discusses some pitfalls like its learning curve and need to understand backpressure.
Better Monitoring for Python: Inclusive Monitoring with Prometheus (Pycon Ire...Brian Brazil
Monitoring should be part of your solution, not a problem. This lightening talk takes a brief look at the ideas behind Inclusive Monitoring and how to use them with Python.
The document discusses how to monitor microservices with Prometheus by designing effective metrics. It recommends focusing on key metrics like rate, errors, and duration based on the RED methodology. Prometheus is introduced as a time-series database that collects metrics via scraping. Effective metric naming practices and integrating Prometheus with applications using client libraries and exporters are also covered. A demo shows setting up Prometheus, Grafana, and Alertmanager to monitor a sample Python application.
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
This document provides a summary of several database administration (DBA) commands and concepts relevant for developers. It discusses topics such as count(1) vs count(*), gathering system statistics, setting the DB_FILE_MULTIBLOCK_READ_COUNT parameter, analyzing tables, explaining plans, monitoring SQL performance, full table scans, pending statistics, restoring statistics history, parallel DML, Flashback Query, DBMS_APPLICATION_INFO, and privileges for reading tables. The document is intended to help developers better understand and work with database configurations and operations.
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
This document provides a summary of several database administration (DBA) commands and concepts relevant for developers. It discusses topics such as count(1) vs count(*), gathering system statistics, setting the DB_FILE_MULTIBLOCK_READ_COUNT parameter, analyzing tables, explaining plans, monitoring SQL performance, full table scans, pending statistics, restoring statistics history, parallel DML, Flashback Query, DBMS_APPLICATION_INFO, schema management, adding columns with defaults, object and system privileges. The document is intended to help developers better understand and work with database concepts.
Docker Logging and analysing with Elastic StackJakub Hajek
Collecting logs from the entire stateless environment is challenging parts of the application lifecycle. Correlating business logs with operating system metrics to provide insights is a crucial part of the entire organization. What aspects should be considered while you design your logging solutions?
Docker Logging and analysing with Elastic Stack - Jakub Hajek PROIDEA
Collecting logs from the entire stateless environment is challenging parts of the application lifecycle. Correlating business logs with operating system metrics to provide insights is a crucial part of the entire organization. We will see the technical presentation on how to manage a large amount of the data in a typical environment with microservices.
The document discusses optimization techniques for embedded systems to improve memory usage and performance. It covers profiling tools, code optimization, RAM optimization, and techniques like reducing memory footprint, resolving bottlenecks, and code refactoring. The document provides examples measuring tasks on a microcontroller and modifying the code to improve efficiency through algorithm changes, compiler optimizations, and assembly optimizations.
Like it or not, many open source developers are moving to the Microsoft .NET platform, and we're bringing our favorite tools with us!
In this session, we look inside ASF projects that are creating software for .NET and Mono, like Logging and Lucene.net -- to show you how to create leading-edge ASP.NET applications with ASF open source libraries, and how you can integrate with other appications using Thrift, Chemistry/DotCMIS, QPid or ActiveMQ.
We'll also look at integrating other .NET open source projects, like Spring.NET, NVelocity, and JayRock, into your C# application to create a complete open source .NET stack.
Malibou Pitch Deck For Its €3M Seed Roundsjcobrien
French start-up Malibou raised a €3 million Seed Round to develop its payroll and human resources
management platform for VSEs and SMEs. The financing round was led by investors Breega, Y Combinator, and FCVC.
OSMC 2021 | inspectIT Ocelot: Dynamic OpenTelemetry Instrumentation at RuntimeNETWAYS
If you want to trace or extract specific data from a Java application with OpenTelemetry, you usually have to modify the application’s code. However, this is often not possible, especially with bought-in software. We would like to show, how the open source inspectIT Ocelot Java agent can be used to dynamically inject OpenTelemetry code at runtime for extracting specific application and business data – and all this without having to adapt the application itself.
PyCon AU 2012 - Debugging Live Python Web ApplicationsGraham Dumpleton
Monitoring tools record the result of what happened to your web application when a problem arises, but for some classes of problems, monitoring systems are only a starting point. Sometimes it is necessary to take more intrusive steps to plan for the unexpected by embedding mechanisms that will allow you to interact with a live deployed web application and extract even more detailed information.
In the French FedEx company we used Prometheus to monitor the infrastructure. It hosts a CQRS Architecture composed with Kafka, Spark, Cassandra, ElasticSearch, and microservices APIs in scala.
This presentation is about using Prometheus in production, you will see why we choosed Prometheus, how we integrated it, configured it and what kind of insights we extracted from the whole infrastructure.
In addition, you will see how Prometheus changed our way of working, how we implemented self-healing based on Prometheus, how we configured systemd to trigger AlertManager API, integration with slack and other cool stuffs.
This document discusses how to connect logs to various network services using Logback. It begins with a brief introduction of common logging frameworks like SLF4J, Log4j 1, Log4j 2 and Logback. It then explains Logback's internal architecture including loggers, appenders and layouts. The main part demonstrates how to develop a custom appender in Logback to send logs to network services by utilizing the ILoggingEvent object. It provides code templates and examples of accessing log content and stack traces. Finally, it introduces some open source Logback appenders and the Logpush service for remote log monitoring.
How Many Ways Can I Manage Oracle GoldenGate?Enkitec
This document provides information about an upcoming E4 conference, including registration details, location information, and post-conference training days. It also contains tables describing Oracle GoldenGate parameters and commands for processes like EXTRACT, REPLICAT, and Manager. Bugs encountered with various Oracle GoldenGate components are also listed along with their corresponding MOS Note IDs for resolution. The document emphasizes properly monitoring data and evaluating any scripts used.
This document provides an overview of different tools for troubleshooting production application issues: IntelliTrace, WinDbg, and System Center Application Performance Monitoring (APM). IntelliTrace allows recording an application's execution flow and data for historical debugging. WinDbg generates dump files for critical hang/termination issues. System Center APM provides always-on monitoring of applications, performance monitoring, and correlation across servers. The document compares the tools and provides demos of collecting traces using IntelliTrace and monitoring an application with System Center APM.
Garelic: Google Analytics as App Performance monitoringJano Suchal
This document describes Garelic, an open source tool that allows using Google Analytics for app performance monitoring. It explains how Garelic uses Google Analytics features like User Timing and Custom Variables to track metrics like controller and ActiveRecord response times. Garelic implements this by monkey patching Rails and subscribing to ActiveSupport notifications to capture timing data and report it to Google Analytics. Some limitations are that it can't track redirects, AJAX, or jobs, and page caching breaks reports. Ideas for future work include error tracking and thresholding for slow responses only.
This presentation was prepared for a Webcast where John Yerhot, Engine Yard US Support Lead, and Chris Kelly, Technical Evangelist at New Relic discussed how you can scale and improve the performance of your Ruby web apps. They shared detailed guidance on issues like:
Caching strategies
Slow database queries
Background processing
Profiling Ruby applications
Picking the right Ruby web server
Sharding data
Attendees will learn how to:
Gain visibility on site performance
Improve scalability and uptime
Find and fix key bottlenecks
See the on-demand replay:
http://pages.engineyard.com/6TipsforImprovingRubyApplicationPerformance.html
GraalVM allows building native applications from Java and other JVM languages. It includes a new just-in-time compiler called Graal and the Truffle framework for building language interpreters. GraalVM also includes Sulong, which allows running LLVM-based languages on the JVM. The presenter discussed using GraalVM to build a native executable for a Zookeeper CLI tool called zkstat from Java code using techniques like ahead-of-time compilation with SubstrateVM, configuring reflection, and building a Docker image for distribution.
The document provides an overview of RxJava and its advantages over traditional Java streams and callbacks. It discusses key RxJava concepts like Observables, Observers, and Subscriptions. It demonstrates how to create Observables, subscribe to them, and compose operations like filter, map, and zip. It shows how to leverage schedulers to control threading. The document also provides examples of using RxJava with HTTP requests and the Twitter API to asynchronously retrieve user profiles and tweets. It highlights scenarios where RxJava is useful, like handling asynchronous operations, and discusses some pitfalls like its learning curve and need to understand backpressure.
Better Monitoring for Python: Inclusive Monitoring with Prometheus (Pycon Ire...Brian Brazil
Monitoring should be part of your solution, not a problem. This lightening talk takes a brief look at the ideas behind Inclusive Monitoring and how to use them with Python.
The document discusses how to monitor microservices with Prometheus by designing effective metrics. It recommends focusing on key metrics like rate, errors, and duration based on the RED methodology. Prometheus is introduced as a time-series database that collects metrics via scraping. Effective metric naming practices and integrating Prometheus with applications using client libraries and exporters are also covered. A demo shows setting up Prometheus, Grafana, and Alertmanager to monitor a sample Python application.
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
This document provides a summary of several database administration (DBA) commands and concepts relevant for developers. It discusses topics such as count(1) vs count(*), gathering system statistics, setting the DB_FILE_MULTIBLOCK_READ_COUNT parameter, analyzing tables, explaining plans, monitoring SQL performance, full table scans, pending statistics, restoring statistics history, parallel DML, Flashback Query, DBMS_APPLICATION_INFO, and privileges for reading tables. The document is intended to help developers better understand and work with database configurations and operations.
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
This document provides a summary of several database administration (DBA) commands and concepts relevant for developers. It discusses topics such as count(1) vs count(*), gathering system statistics, setting the DB_FILE_MULTIBLOCK_READ_COUNT parameter, analyzing tables, explaining plans, monitoring SQL performance, full table scans, pending statistics, restoring statistics history, parallel DML, Flashback Query, DBMS_APPLICATION_INFO, schema management, adding columns with defaults, object and system privileges. The document is intended to help developers better understand and work with database concepts.
Docker Logging and analysing with Elastic StackJakub Hajek
Collecting logs from the entire stateless environment is challenging parts of the application lifecycle. Correlating business logs with operating system metrics to provide insights is a crucial part of the entire organization. What aspects should be considered while you design your logging solutions?
Docker Logging and analysing with Elastic Stack - Jakub Hajek PROIDEA
Collecting logs from the entire stateless environment is challenging parts of the application lifecycle. Correlating business logs with operating system metrics to provide insights is a crucial part of the entire organization. We will see the technical presentation on how to manage a large amount of the data in a typical environment with microservices.
The document discusses optimization techniques for embedded systems to improve memory usage and performance. It covers profiling tools, code optimization, RAM optimization, and techniques like reducing memory footprint, resolving bottlenecks, and code refactoring. The document provides examples measuring tasks on a microcontroller and modifying the code to improve efficiency through algorithm changes, compiler optimizations, and assembly optimizations.
Like it or not, many open source developers are moving to the Microsoft .NET platform, and we're bringing our favorite tools with us!
In this session, we look inside ASF projects that are creating software for .NET and Mono, like Logging and Lucene.net -- to show you how to create leading-edge ASP.NET applications with ASF open source libraries, and how you can integrate with other appications using Thrift, Chemistry/DotCMIS, QPid or ActiveMQ.
We'll also look at integrating other .NET open source projects, like Spring.NET, NVelocity, and JayRock, into your C# application to create a complete open source .NET stack.
Similaire à Debugging Planning Issues Using Calcite's Built-in Loggers (20)
Malibou Pitch Deck For Its €3M Seed Roundsjcobrien
French start-up Malibou raised a €3 million Seed Round to develop its payroll and human resources
management platform for VSEs and SMEs. The financing round was led by investors Breega, Y Combinator, and FCVC.
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...XfilesPro
Wondering how X-Sign gained popularity in a quick time span? This eSign functionality of XfilesPro DocuPrime has many advancements to offer for Salesforce users. Explore them now!
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
What to do when you have a perfect model for your software but you are constrained by an imperfect business model?
This talk explores the challenges of bringing modelling rigour to the business and strategy levels, and talking to your non-technical counterparts in the process.
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemPeter Muessig
Learn about the latest innovations in and around OpenUI5/SAPUI5: UI5 Tooling, UI5 linter, UI5 Web Components, Web Components Integration, UI5 2.x, UI5 GenAI.
Recording:
https://www.youtube.com/live/MSdGLG2zLy8?si=INxBHTqkwHhxV5Ta&t=0
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfVALiNTRY360
Salesforce Healthcare CRM, implemented by VALiNTRY360, revolutionizes patient management by enhancing patient engagement, streamlining administrative processes, and improving care coordination. Its advanced analytics, robust security, and seamless integration with telehealth services ensure that healthcare providers can deliver personalized, efficient, and secure patient care. By automating routine tasks and providing actionable insights, Salesforce Healthcare CRM enables healthcare providers to focus on delivering high-quality care, leading to better patient outcomes and higher satisfaction. VALiNTRY360's expertise ensures a tailored solution that meets the unique needs of any healthcare practice, from small clinics to large hospital systems.
For more info visit us https://valintry360.com/solutions/health-life-sciences
Unveiling the Advantages of Agile Software Development.pdfbrainerhub1
Learn about Agile Software Development's advantages. Simplify your workflow to spur quicker innovation. Jump right in! We have also discussed the advantages.
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesQuickdice ERP
Explore the seamless transition to e-invoicing with this comprehensive guide tailored for Saudi Arabian businesses. Navigate the process effortlessly with step-by-step instructions designed to streamline implementation and enhance efficiency.
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
Top 9 Trends in Cybersecurity for 2024.pptxdevvsandy
Security and risk management (SRM) leaders face disruptions on technological, organizational, and human fronts. Preparation and pragmatic execution are key for dealing with these disruptions and providing the right cybersecurity program.
SMS API Integration in Saudi Arabia| Best SMS API ServiceYara Milbes
Discover the benefits and implementation of SMS API integration in the UAE and Middle East. This comprehensive guide covers the importance of SMS messaging APIs, the advantages of bulk SMS APIs, and real-world case studies. Learn how CEQUENS, a leader in communication solutions, can help your business enhance customer engagement and streamline operations with innovative CPaaS, reliable SMS APIs, and omnichannel solutions, including WhatsApp Business. Perfect for businesses seeking to optimize their communication strategies in the digital age.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
Debugging Planning Issues Using Calcite's Built-in Loggers
1. Debugging Planning Issues
Using Calcite's Built-in Loggers
Stamatis Zampetakis
Alessandro Solimando
Virtual Meetup
March 15, 2023
2. Alessandro Solimando @asolimando
Senior Software Engineer @ Rakuten*
Committer of Apache Calcite & Apache Hive
PhD in Data Management, University of Genoa
(* the work presented here was done while at Cloudera)
Stamatis Zampetakis @szampetak
Staff Software Engineer @ Cloudera, Hive query optimizer team
PMC member of Apache Calcite & Apache Hive
PhD in Data Management, INRIA & Paris-Sud University
About us
4. Common Planning Issues
Issue Diagnostic Information
OutOfMemoryError Heap dumps
StackOverflowError Stack traces
Unresponsive server Stack traces
Very slow (or hanging) queries Stack traces
Wrong results Query plans
Query crashes (NPE, AssertionError, ClassCastException) Stack traces
5. Common Planning Issues
● Many times the root cause lies in rule based transformations
Issue Diagnostic Information
OutOfMemoryError Heap dumps
StackOverflowError Stack traces
Unresponsive server Stack traces
Very slow (or hanging) queries Stack traces
Wrong results Query plans
Query crashes (NPE, AssertionError, ClassCastException) Stack traces
6. Common Planning Issues
● Many times the root cause lies in rule based transformations
● Good logs are key for finding this root cause
Issue Diagnostic Information
OutOfMemoryError Heap dumps
StackOverflowError Stack traces
Unresponsive server Stack traces
Very slow (or hanging) queries Stack traces
Wrong results Query plans
Query crashes (NPE, AssertionError, ClassCastException) Stack traces
7. Common Planning Issues
● Interactive debugging not always feasible:
○ CI/CU environment with restricted access
○ Data specific problem
● Debugging planning issues interactively (without logs) is difficult:
○ Large number of transformations
○ Complex transformation logic
○ Lots of intermediate objects
○ Repeated occurrences of transformations
14. RuleEventLogger - Example
./gradlew :core:test --tests RelOptRulesTest.testAggregateRemove3
logger.CBORuleLogger.filter.marker.onMatch= DENY
SELECT empno, count(mgr) FROM sales.emp GROUP BY empno, deptno
15. RuleEventLogger - Output Explained
./gradlew :core:test --tests RelOptRulesTest.testAggregateRemove3
RelOptRulesTest > testAggregateRemove3() STANDARD_OUT
call#0: Apply rule [AggregateRemoveRule] to [rel#11:LogicalAggregate]
call#0: Rule [AggregateRemoveRule] produced [rel#15:LogicalProject]
call#1: Apply rule [ProjectMergeRule] to [rel#13:LogicalProject,rel#15:LogicalProject]
call#1: Rule [ProjectMergeRule] produced [rel#17:LogicalProject]
call#2: Apply rule [ProjectMergeRule] to [rel#17:LogicalProject,rel#9:LogicalProject]
call#2: Rule [ProjectMergeRule] produced [rel#19:LogicalProject]
logger.CBORuleLogger.filter.marker.onMatch= DENY
SELECT empno, count(mgr) FROM sales.emp GROUP BY empno, deptno
16. RuleEventLogger - Output Explained
./gradlew :core:test --tests RelOptRulesTest.testAggregateRemove3
RelOptRulesTest > testAggregateRemove3() STANDARD_OUT
call#0: Apply rule [AggregateRemoveRule] to [rel#11:LogicalAggregate]
call#0: Rule [AggregateRemoveRule] produced [rel#15:LogicalProject]
call#1: Apply rule [ProjectMergeRule] to [rel#13:LogicalProject,rel#15:LogicalProject]
call#1: Rule [ProjectMergeRule] produced [rel#17:LogicalProject]
call#2: Apply rule [ProjectMergeRule] to [rel#17:LogicalProject,rel#9:LogicalProject]
call#2: Rule [ProjectMergeRule] produced [rel#19:LogicalProject]
logger.CBORuleLogger.filter.marker.onMatch= DENY
SELECT empno, count(mgr) FROM sales.emp GROUP BY empno, deptno
17. RuleEventLogger - Output Explained
./gradlew :core:test --tests RelOptRulesTest.testAggregateRemove3
RelOptRulesTest > testAggregateRemove3() STANDARD_OUT
call#0: Apply rule [AggregateRemoveRule] to [rel#11:LogicalAggregate]
call#0: Rule [AggregateRemoveRule] produced [rel#15:LogicalProject]
call#1: Apply rule [ProjectMergeRule] to [rel#13:LogicalProject,rel#15:LogicalProject]
call#1: Rule [ProjectMergeRule] produced [rel#17:LogicalProject]
call#2: Apply rule [ProjectMergeRule] to [rel#17:LogicalProject,rel#9:LogicalProject]
call#2: Rule [ProjectMergeRule] produced [rel#19:LogicalProject]
logger.CBORuleLogger.filter.marker.onMatch= DENY
SELECT empno, count(mgr) FROM sales.emp GROUP BY empno, deptno
18. RuleEventLogger - Output Explained
./gradlew :core:test --tests RelOptRulesTest.testAggregateRemove3
RelOptRulesTest > testAggregateRemove3() STANDARD_OUT
call#0: Apply rule [AggregateRemoveRule] to [rel#11:LogicalAggregate]
call#0: Rule [AggregateRemoveRule] produced [rel#15:LogicalProject]
call#1: Apply rule [ProjectMergeRule] to [rel#13:LogicalProject,rel#15:LogicalProject]
call#1: Rule [ProjectMergeRule] produced [rel#17:LogicalProject]
call#2: Apply rule [ProjectMergeRule] to [rel#17:LogicalProject,rel#9:LogicalProject]
call#2: Rule [ProjectMergeRule] produced [rel#19:LogicalProject]
logger.CBORuleLogger.filter.marker.onMatch= DENY
SELECT empno, count(mgr) FROM sales.emp GROUP BY empno, deptno
19. RuleEventLogger - Output Explained
./gradlew :core:test --tests RelOptRulesTest.testAggregateRemove3
RelOptRulesTest > testAggregateRemove3() STANDARD_OUT
call#0: Apply rule [AggregateRemoveRule] to [rel#11:LogicalAggregate]
call#0: Rule [AggregateRemoveRule] produced [rel#15:LogicalProject]
call#1: Apply rule [ProjectMergeRule] to [rel#13:LogicalProject,rel#15:LogicalProject]
call#1: Rule [ProjectMergeRule] produced [rel#17:LogicalProject]
call#2: Apply rule [ProjectMergeRule] to [rel#17:LogicalProject,rel#9:LogicalProject]
call#2: Rule [ProjectMergeRule] produced [rel#19:LogicalProject]
logger.CBORuleLogger.filter.marker.onMatch= DENY
SELECT empno, count(mgr) FROM sales.emp GROUP BY empno, deptno
20. RuleEventLogger - Output Explained
./gradlew :core:test --tests RelOptRulesTest.testAggregateRemove3
RelOptRulesTest > testAggregateRemove3() STANDARD_OUT
call#0: Apply rule [AggregateRemoveRule] to [rel#11:LogicalAggregate]
call#0: Full plan for rule input [rel#11:LogicalAggregate]:
LogicalAggregate(group=[{0, 1}], EXPR$1=[COUNT($2)])
LogicalProject(EMPNO=[$0], DEPTNO=[$7], MGR=[$3])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
call#0: Rule [AggregateRemoveRule] produced [rel#15:LogicalProject]
call#0: Full plan for [rel#15:LogicalProject]:
LogicalProject(EMPNO=[$0], DEPTNO=[$1], $f2=[CASE(IS NOT NULL($2), 1:BIGINT, 0:BIGINT)])
LogicalProject(EMPNO=[$0], DEPTNO=[$7], MGR=[$3])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
logger.CBORuleLogger.filter.marker.onMatch= ACCEPT
SELECT empno, count(mgr) FROM sales.emp GROUP BY empno, deptno
21. RuleEventLogger - Output Explained
./gradlew :core:test --tests RelOptRulesTest.testAggregateRemove3
RelOptRulesTest > testAggregateRemove3() STANDARD_OUT
call#0: Apply rule [AggregateRemoveRule] to [rel#11:LogicalAggregate]
call#0: Full plan for rule input [rel#11:LogicalAggregate]:
LogicalAggregate(group=[{0, 1}], EXPR$1=[COUNT($2)])
LogicalProject(EMPNO=[$0], DEPTNO=[$7], MGR=[$3])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
call#0: Rule [AggregateRemoveRule] produced [rel#15:LogicalProject]
call#0: Full plan for [rel#15:LogicalProject]:
LogicalProject(EMPNO=[$0], DEPTNO=[$1], $f2=[CASE(IS NOT NULL($2), 1:BIGINT, 0:BIGINT)])
LogicalProject(EMPNO=[$0], DEPTNO=[$7], MGR=[$3])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
logger.CBORuleLogger.filter.marker.onMatch= ACCEPT
SELECT empno, count(mgr) FROM sales.emp GROUP BY empno, deptno
22. RuleEventLogger - Output Explained
./gradlew :core:test --tests RelOptRulesTest.testAggregateRemove3
RelOptRulesTest > testAggregateRemove3() STANDARD_OUT
call#1: Apply rule [ProjectMergeRule] to [rel#13:LogicalProject,rel#15:LogicalProject]
call#1: Full plan for rule input [rel#13:LogicalProject]:
LogicalProject(EMPNO=[$0], EXPR$1=[$2])
LogicalProject(EMPNO=[$0], DEPTNO=[$1], $f2=[CASE(IS NOT NULL($2), 1:BIGINT, 0:BIGINT)])
LogicalProject(EMPNO=[$0], DEPTNO=[$7], MGR=[$3])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
call#1: Full plan for rule input [rel#15:LogicalProject]:
...
call#1: Rule [ProjectMergeRule] produced [rel#17:LogicalProject]
call#1: Full plan for [rel#17:LogicalProject]:
LogicalProject(EMPNO=[$0], EXPR$1=[CASE(IS NOT NULL($2), 1:BIGINT, 0:BIGINT)])
LogicalProject(EMPNO=[$0], DEPTNO=[$7], MGR=[$3])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
logger.CBORuleLogger.filter.marker.onMatch= ACCEPT
SELECT empno, count(mgr) FROM sales.emp GROUP BY empno, deptno
23. RuleEventLogger - Output Explained
./gradlew :core:test --tests RelOptRulesTest.testAggregateRemove3
RelOptRulesTest > testAggregateRemove3() STANDARD_OUT
call#2: Apply rule [ProjectMergeRule] to [rel#17:LogicalProject,rel#9:LogicalProject]
call#2: Full plan for rule input [rel#17:LogicalProject]:
LogicalProject(EMPNO=[$0], EXPR$1=[CASE(IS NOT NULL($2), 1:BIGINT, 0:BIGINT)])
LogicalProject(EMPNO=[$0], DEPTNO=[$7], MGR=[$3])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
call#2: Full plan for rule input [rel#9:LogicalProject]:
LogicalProject(EMPNO=[$0], DEPTNO=[$7], MGR=[$3])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
call#2: Rule [ProjectMergeRule] produced [rel#19:LogicalProject]
call#2: Full plan for [rel#19:LogicalProject]:
LogicalProject(EMPNO=[$0], EXPR$1=[CASE(IS NOT NULL($3), 1:BIGINT, 0:BIGINT)])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
logger.CBORuleLogger.filter.marker.onMatch= ACCEPT
SELECT empno, count(mgr) FROM sales.emp GROUP BY empno, deptno
25. Hanging TPC-DS queries
● Context: Upgrade Calcite version from 1.25.0 to 1.33.0
● Symptom: TPCDS queries hanging
26. Hanging TPC-DS queries
● Context: Upgrade Calcite version from 1.25.0 to 1.33.0
● Symptom: TPCDS queries hanging (e.g., query13)
select avg(ss_quantity),
avg(ss_ext_sales_price),
avg(ss_ext_wholesale_cost),
sum(ss_ext_wholesale_cost)
from store_sales
,store
,customer_demographics
,household_demographics
,customer_address
,date_dim
where s_store_sk = ss_store_sk and ss_sold_date_sk = d_date_sk and d_year = 2001 and (
(ss_hdemo_sk=hd_demo_sk and cd_demo_sk = ss_cdemo_sk and cd_marital_status = 'M'
and cd_education_status = '4 yr Degree' and ss_sales_price between 100.00 and 150.00 and hd_dep_count = 3) or
(ss_hdemo_sk=hd_demo_sk and cd_demo_sk = ss_cdemo_sk and cd_marital_status = 'D'
and cd_education_status = 'Primary' and ss_sales_price between 50.00 and 100.00 and hd_dep_count = 1) or
(ss_hdemo_sk=hd_demo_sk and cd_demo_sk = ss_cdemo_sk and cd_marital_status = 'U'
and cd_education_status = 'Advanced Degree' and ss_sales_price between 150.00 and 200.00 and hd_dep_count = 1))
and(
(ss_addr_sk = ca_address_sk and ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM')
and ss_net_profit between 100 and 200) or
(ss_addr_sk = ca_address_sk and ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN')
and ss_net_profit between 150 and 300) or
(ss_addr_sk = ca_address_sk and ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV')
and ss_net_profit between 50 and 250));
27. Hanging TPC-DS queries
● Context: Upgrade Calcite version from 1.25.0 to 1.33.0
● Symptom: TPCDS queries hanging (e.g., query13)
select avg(ss_quantity),
avg(ss_ext_sales_price),
avg(ss_ext_wholesale_cost),
sum(ss_ext_wholesale_cost)
from store_sales
,store
,customer_demographics
,household_demographics
,customer_address
,date_dim
where s_store_sk = ss_store_sk and ss_sold_date_sk = d_date_sk and d_year = 2001 and (
(ss_hdemo_sk=hd_demo_sk and cd_demo_sk = ss_cdemo_sk and cd_marital_status = 'M'
and cd_education_status = '4 yr Degree' and ss_sales_price between 100.00 and 150.00 and hd_dep_count = 3) or
(ss_hdemo_sk=hd_demo_sk and cd_demo_sk = ss_cdemo_sk and cd_marital_status = 'D'
and cd_education_status = 'Primary' and ss_sales_price between 50.00 and 100.00 and hd_dep_count = 1) or
(ss_hdemo_sk=hd_demo_sk and cd_demo_sk = ss_cdemo_sk and cd_marital_status = 'U'
and cd_education_status = 'Advanced Degree' and ss_sales_price between 150.00 and 200.00 and hd_dep_count = 1))
and(
(ss_addr_sk = ca_address_sk and ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM')
and ss_net_profit between 100 and 200) or
(ss_addr_sk = ca_address_sk and ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN')
and ss_net_profit between 150 and 300) or
(ss_addr_sk = ca_address_sk and ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV')
and ss_net_profit between 50 and 250));
28. Hanging TPC-DS queries
● Why does it take so long?
● Where is it stuck?
● What does it do?
● Gather information:
○ Profile the application (async-profiler)
○ Collect stack traces (jstack)
○ Check the logs
29. Hanging TPC-DS queries
● Why does it take so long?
● Where is it stuck?
● What does it do?
● Gather information:
○ Profile the application (async-profiler)
○ Collect stack traces (jstack)
○ Check the logs
30. java.lang.Thread.State: RUNNABLE
at java.util.TreeMap.compare(TreeMap.java:1294)
at java.util.TreeMap.put(TreeMap.java:538)
at org.apache.hive.com.google.common.collect.TreeRangeSet.replaceRangeWithSameLowerBound(TreeRangeSet.java:272)
at org.apache.hive.com.google.common.collect.TreeRangeSet.add(TreeRangeSet.java:222)
at org.apache.hive.com.google.common.collect.RangeSet.addAll(RangeSet.java:225)
at org.apache.hive.com.google.common.collect.AbstractRangeSet.addAll(AbstractRangeSet.java:64)
at org.apache.hive.com.google.common.collect.TreeRangeSet.addAll(TreeRangeSet.java:41)
at org.apache.calcite.rex.RexSimplify$RexSargBuilder.addSarg(RexSimplify.java:3056)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept2b(RexSimplify.java:2894)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept2(RexSimplify.java:2812)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept_(RexSimplify.java:2793)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept(RexSimplify.java:2778)
at org.apache.calcite.rex.RexSimplify$SargCollector.access$400(RexSimplify.java:2761)
at org.apache.calcite.rex.RexSimplify.lambda$simplifyAnd$3(RexSimplify.java:1488)
at org.apache.calcite.rex.RexSimplify$$Lambda$1099/1247334493.accept(Unknown Source)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.apache.calcite.rex.RexSimplify.simplifyAnd(RexSimplify.java:1488)
at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:279)
at org.apache.calcite.rex.RexSimplify.simplifyUnknownAs(RexSimplify.java:248)
at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:223)
at org.apache.calcite.rel.metadata.RelMdPredicates.getPredicates(RelMdPredicates.java:299)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates_$(Unknown Source)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates(Unknown Source)
at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:841)
at org.apache.calcite.rel.metadata.RelMdPredicates.getPredicates(RelMdPredicates.java:292)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates_$(Unknown Source)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates(Unknown Source)
at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:841)
at org.apache.calcite.rel.metadata.RelMdPredicates.getPredicates(RelMdPredicates.java:292)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates_$(Unknown Source)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates(Unknown Source)
at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:841)
31. java.lang.Thread.State: RUNNABLE
at java.util.TreeMap.compare(TreeMap.java:1294)
at java.util.TreeMap.put(TreeMap.java:538)
at org.apache.hive.com.google.common.collect.TreeRangeSet.replaceRangeWithSameLowerBound(TreeRangeSet.java:272)
at org.apache.hive.com.google.common.collect.TreeRangeSet.add(TreeRangeSet.java:222)
at org.apache.hive.com.google.common.collect.RangeSet.addAll(RangeSet.java:225)
at org.apache.hive.com.google.common.collect.AbstractRangeSet.addAll(AbstractRangeSet.java:64)
at org.apache.hive.com.google.common.collect.TreeRangeSet.addAll(TreeRangeSet.java:41)
at org.apache.calcite.rex.RexSimplify$RexSargBuilder.addSarg(RexSimplify.java:3056)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept2b(RexSimplify.java:2894)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept2(RexSimplify.java:2812)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept_(RexSimplify.java:2793)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept(RexSimplify.java:2778)
at org.apache.calcite.rex.RexSimplify$SargCollector.access$400(RexSimplify.java:2761)
at org.apache.calcite.rex.RexSimplify.lambda$simplifyAnd$3(RexSimplify.java:1488)
at org.apache.calcite.rex.RexSimplify$$Lambda$1099/1247334493.accept(Unknown Source)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.apache.calcite.rex.RexSimplify.simplifyAnd(RexSimplify.java:1488)
at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:279)
at org.apache.calcite.rex.RexSimplify.simplifyUnknownAs(RexSimplify.java:248)
at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:223)
at org.apache.calcite.rel.metadata.RelMdPredicates.getPredicates(RelMdPredicates.java:299)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates_$(Unknown Source)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates(Unknown Source)
at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:841)
at org.apache.calcite.rel.metadata.RelMdPredicates.getPredicates(RelMdPredicates.java:292)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates_$(Unknown Source)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates(Unknown Source)
at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:841)
at org.apache.calcite.rel.metadata.RelMdPredicates.getPredicates(RelMdPredicates.java:292)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates_$(Unknown Source)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates(Unknown Source)
at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:841)
Depth:~ 2K
Lines
32. java.lang.Thread.State: RUNNABLE
at java.util.TreeMap.compare(TreeMap.java:1294)
at java.util.TreeMap.put(TreeMap.java:538)
at org.apache.hive.com.google.common.collect.TreeRangeSet.replaceRangeWithSameLowerBound(TreeRangeSet.java:272)
at org.apache.hive.com.google.common.collect.TreeRangeSet.add(TreeRangeSet.java:222)
at org.apache.hive.com.google.common.collect.RangeSet.addAll(RangeSet.java:225)
at org.apache.hive.com.google.common.collect.AbstractRangeSet.addAll(AbstractRangeSet.java:64)
at org.apache.hive.com.google.common.collect.TreeRangeSet.addAll(TreeRangeSet.java:41)
at org.apache.calcite.rex.RexSimplify$RexSargBuilder.addSarg(RexSimplify.java:3056)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept2b(RexSimplify.java:2894)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept2(RexSimplify.java:2812)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept_(RexSimplify.java:2793)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept(RexSimplify.java:2778)
at org.apache.calcite.rex.RexSimplify$SargCollector.access$400(RexSimplify.java:2761)
at org.apache.calcite.rex.RexSimplify.lambda$simplifyAnd$3(RexSimplify.java:1488)
at org.apache.calcite.rex.RexSimplify$$Lambda$1099/1247334493.accept(Unknown Source)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.apache.calcite.rex.RexSimplify.simplifyAnd(RexSimplify.java:1488)
at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:279)
at org.apache.calcite.rex.RexSimplify.simplifyUnknownAs(RexSimplify.java:248)
at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:223)
at org.apache.calcite.rel.metadata.RelMdPredicates.getPredicates(RelMdPredicates.java:299)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates_$(Unknown Source)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates(Unknown Source)
at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:841)
at org.apache.calcite.rel.metadata.RelMdPredicates.getPredicates(RelMdPredicates.java:292)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates_$(Unknown Source)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates(Unknown Source)
at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:841)
at org.apache.calcite.rel.metadata.RelMdPredicates.getPredicates(RelMdPredicates.java:292)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates_$(Unknown Source)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates(Unknown Source)
at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:841)
Depth:~ 2K
Lines
From stack + code we can infer that the plan has more than 1K nested Filter operators
33. java.lang.Thread.State: RUNNABLE
at java.util.TreeMap.compare(TreeMap.java:1294)
at java.util.TreeMap.put(TreeMap.java:538)
at org.apache.hive.com.google.common.collect.TreeRangeSet.replaceRangeWithSameLowerBound(TreeRangeSet.java:272)
at org.apache.hive.com.google.common.collect.TreeRangeSet.add(TreeRangeSet.java:222)
at org.apache.hive.com.google.common.collect.RangeSet.addAll(RangeSet.java:225)
at org.apache.hive.com.google.common.collect.AbstractRangeSet.addAll(AbstractRangeSet.java:64)
at org.apache.hive.com.google.common.collect.TreeRangeSet.addAll(TreeRangeSet.java:41)
at org.apache.calcite.rex.RexSimplify$RexSargBuilder.addSarg(RexSimplify.java:3056)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept2b(RexSimplify.java:2894)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept2(RexSimplify.java:2812)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept_(RexSimplify.java:2793)
at org.apache.calcite.rex.RexSimplify$SargCollector.accept(RexSimplify.java:2778)
at org.apache.calcite.rex.RexSimplify$SargCollector.access$400(RexSimplify.java:2761)
at org.apache.calcite.rex.RexSimplify.lambda$simplifyAnd$3(RexSimplify.java:1488)
at org.apache.calcite.rex.RexSimplify$$Lambda$1099/1247334493.accept(Unknown Source)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.apache.calcite.rex.RexSimplify.simplifyAnd(RexSimplify.java:1488)
at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:279)
at org.apache.calcite.rex.RexSimplify.simplifyUnknownAs(RexSimplify.java:248)
at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:223)
at org.apache.calcite.rel.metadata.RelMdPredicates.getPredicates(RelMdPredicates.java:299)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates_$(Unknown Source)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates(Unknown Source)
at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:841)
at org.apache.calcite.rel.metadata.RelMdPredicates.getPredicates(RelMdPredicates.java:292)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates_$(Unknown Source)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates(Unknown Source)
at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:841)
at org.apache.calcite.rel.metadata.RelMdPredicates.getPredicates(RelMdPredicates.java:292)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates_$(Unknown Source)
at org.apache.calcite.rel.metadata.janino.GeneratedMetadata_PredicatesHandler.getPredicates(Unknown Source)
at org.apache.calcite.rel.metadata.RelMetadataQuery.getPulledUpPredicates(RelMetadataQuery.java:841)
Depth:~ 2K
Lines
From stack + code we can infer that the plan has more than 1K nested Filter operators
What creates the operators? Why?
39. Hanging TPC-DS queries - Interactive debugging
OR(=($62, _UTF-16LE'M'), =($62, _UTF-16LE'D'), =($62, _UTF-16LE'U'))
// 3. If the new conjuncts are already present in the plan, we bail out
final List<RexNode> newConjuncts =
HiveCalciteUtil.getPredsNotPushedAlready(filter.getInput(),operandsToPushDown);
40. Hanging TPC-DS queries - Interactive debugging
OR(=($62, _UTF-16LE'M'), =($62, _UTF-16LE'D'), =($62, _UTF-16LE'U'))
SEARCH($62, Sarg[_UTF-16LE'D', _UTF-16LE'M', _UTF-16LE'U']:CHAR(1))
// 3. If the new conjuncts are already present in the plan, we bail out
final List<RexNode> newConjuncts =
HiveCalciteUtil.getPredsNotPushedAlready(filter.getInput(),operandsToPushDown);
mq.getPulledUpPredicates(inp).pulledUpPredicates
42. Hanging TPC-DS queries - Interactive debugging
OR(=($62, _UTF-16LE'M'), =($62, _UTF-16LE'D'), =($62, _UTF-16LE'U'))
SEARCH($62, Sarg[_UTF-16LE'D', _UTF-16LE'M', _UTF-16LE'U']:CHAR(1))
CALCITE-4173 Add internal SEARCH operator and Sarg literal, replacing use of IN in RexCall (1.26.0)
CALCITE-5036 RelMetadataQuery#getPulledUpPredicates support to analyze constant key for the operator of
IS_NOT_DISTINCT_FROM (1.31.0)
43. Check What CBO Rules Are Applied
Command: grep --no-filename "produced" hive.log | cut -c 100-
Output format: call#$X: Rule [$RULE_DESCRIPTION] produced [rel#$Y:$REL_KIND]
Sample output:
call#1: Rule [HivePreFilteringRule] produced [rel#73:HiveFilter]
call#12: Rule [ReduceExpressionsRule(Filter)] produced [rel#76:HiveFilter]
call#14: Rule [FilterCondition] produced [rel#78:HiveFilter]
call#17: Rule [ReduceExpressionsRule(Filter)] produced [rel#80:HiveFilter]
call#21: Rule [FilterCondition] produced [rel#82:HiveFilter]
call#29: Rule [HiveProjectFilterPullUpConstantsRule] produced [rel#84:HiveProject]
call#46: Rule [HiveJoinAddNotNullRule] produced [rel#89:HiveJoin]
Once you have the rel number ($Y), you can look it up in the logs to see it printed in full
If you are interested in a particular rule application, search for the call ($X), input and output rels are printed close to the
corresponding “produced” line
44. OutOfMemory at Planning Time
● We look for a sequence of rule applications which loops from a certain point
of the query planning process
● Run “EXPLAIN” against the offending query and look at the rules which are
invoked in the logs to identify the loop
● Once identified, find the first occurrence of applications of this list, and start
analyzing the plans generated right before/after it
● Note: the rel triggering the loop might also be created outside this sequence
45. OutOfMemory at Planning Time - Example (HIVE-25758)
SELECT c.month, d.con_usd
FROM
(SELECT
cast(regexp_replace(substr(add_months(from_unixtime(unix_timestamp(),
'yyyy-MM-dd'), -1), 1, 7), '-', '') AS int) AS month
FROM test1
UNION ALL
SELECT month
FROM test2
WHERE month = 202110
) c
JOIN test3 d ON c.month = d.mth;
● Symptoms: OOM due to the creation of ever increasingly complex filters
46. OutOfMemory at Planning Time - Example (HIVE-25758)
HiveJoin(condition=[=($0, $1)], joinType=[inner], algorithm=[none], cost=[not
available])
HiveUnion(all=[true])
HiveProject(month=[CAST(regexp_replace(...):INTEGER**])
HiveFilter(condition=[IS NOT NULL(CAST(regexp_replace(...):INTEGER)])
HiveTableScan(table=[[default, test1]], table:alias=[test1])
HiveProject(month=[CAST(202110):INTEGER])
HiveFilter(condition=[=($0, 202110)])
HiveTableScan(table=[[default, test2]], table:alias=[test2])
HiveFilter(condition=[IS NOT NULL($0)])
HiveTableScan(table=[[default, test3]], table:alias=[d])
** Abbreviation of “CAST(regexp_replace(substr(add_months(FROM_UNIXTIME(UNIX_TIMESTAMP,
_UTF-16LE'yyyy-MM-dd':VARCHAR(2147483647)
CHARACTER SET "UTF-16LE"), -1), 1, 7), _UTF-16LE'-':VARCHAR(2147483647) CHARACTER SET
"UTF-16LE", _UTF-16LE'':VARCHAR(2147483647) CHARACTER SET
"UTF-16LE")):INTEGER”
47. OutOfMemory at Planning Time - Example (HIVE-25758)
call#198: Rule [HiveJoinPushTransitivePredicatesRule] produced [rel#136:HiveJoin]
call#212: Rule [HiveFilterSetOpTransposeRule] produced [rel#142:HiveUnion]
call#223: Rule [HiveFilterProjectTransposeRule] produced [rel#148:HiveProject]
call#228: Rule [HiveFilterMergeRule] produced [rel#152:HiveFilter]
call#239: Rule [HiveFilterProjectTransposeRule] produced [rel#153:HiveProject]
call#258: Rule [HiveJoinPushTransitivePredicatesRule] produced [rel#155:HiveJoin]
call#273: Rule [HiveFilterProjectTransposeRule] produced [rel#160:HiveProject]
call#278: Rule [HiveFilterMergeRule] produced [rel#164:HiveFilter]
call#283: Rule [ReduceExpressionsRule(Filter)] produced [rel#166:HiveFilter]
RHS → LHS
LHS → RHS
48. OutOfMemory at Planning Time - Example (HIVE-25758)
HiveJoin(condition=[=($0, $1)], joinType=[inner], [...])
HiveUnion(all=[true])
HiveProject(month=[CAST(regexp_replace(...)):INTEGER**])
HiveFilter(condition=[IS NOT NULL(CAST(regexp_replace(...):INTEGER)])
HiveTableScan(table=[[default, test1]], table:alias=[test1])
HiveProject(month=[CAST(202110):INTEGER])
HiveFilter(condition=[=($0, 202110)])
HiveTableScan(table=[[default, test2]], table:alias=[test2])
HiveFilter(condition=[IS NOT NULL($0)])
HiveTableScan(table=[[default, test3]], table:alias=[d])
** Abbreviation of “CAST(regexp_replace(substr(add_months(FROM_UNIXTIME(UNIX_TIMESTAMP,
_UTF-16LE'yyyy-MM-dd':VARCHAR(2147483647)
CHARACTER SET "UTF-16LE"), -1), 1, 7), _UTF-16LE'-':VARCHAR(2147483647) CHARACTER SET
"UTF-16LE", _UTF-16LE'':VARCHAR(2147483647) CHARACTER SET
"UTF-16LE")):INTEGER”
49. OutOfMemory at Planning Time - Example (HIVE-25758)
HiveJoin(condition=[=($0, $1)], joinType=[inner], [...])
HiveUnion(all=[true])
HiveProject(month=[CAST(regexp_replace(...)):INTEGER])
HiveFilter(condition=[IS NOT NULL(CAST(regexp_replace(...)):INTEGER)])
HiveTableScan(table=[[default, test1]], table:alias=[test1])
HiveProject(month=[CAST(202110):INTEGER])
HiveFilter(condition=[=($0, 202110)])
HiveTableScan(table=[[default, test2]], table:alias=[test2])
HiveFilter(condition=[OR(=($0, CAST(regexp_replace(...)):INTEGER), =($0,
202110))])
HiveFilter(condition=[IS NOT NULL($0)])
HiveTableScan(table=[[default, test3]], table:alias=[d])
call#258: Rule [HiveJoinPushTransitivePredicatesRule] produced [rel#155:HiveJoin]
50. OutOfMemory at Planning Time - Example (HIVE-25758)
HiveJoin(condition=[=($0, $1)], joinType=[inner], [...])
HiveUnion(all=[true])
HiveProject(month=[CAST(regexp_replace(...)):INTEGER])
HiveFilter(condition=[IS NOT NULL(CAST(regexp_replace(...)):INTEGER)])
HiveTableScan(table=[[default, test1]], table:alias=[test1])
HiveProject(month=[CAST(202110):INTEGER])
HiveFilter(condition=[=($0, 202110)])
HiveTableScan(table=[[default, test2]], table:alias=[test2])
HiveFilter(condition=[AND(OR(=($0, CAST(regexp_replace(...)):INTEGER), =($0,
202110)), IS NOT NULL($0))])
HiveTableScan(table=[[default, test3]], table:alias=[d])
call#278: Rule [HiveFilterMergeRule] produced [rel#164:HiveFilter]
51. OutOfMemory at Planning Time - Example (HIVE-25758)
HiveJoin(condition=[=($0, $1)], joinType=[inner], [...])
HiveUnion(all=[true])
HiveProject(month=[CAST(regexp_replace(...)):INTEGER])
HiveFilter(condition=[IS NOT NULL(CAST(regexp_replace(...)):INTEGER)])
HiveTableScan(table=[[default, test1]], table:alias=[test1])
HiveProject(month=[CAST(202110):INTEGER])
HiveFilter(condition=[=($0, 202110)])
HiveTableScan(table=[[default, test2]], table:alias=[test2])
HiveFilter(condition=[AND(OR(=($0, CAST(regexp_replace(...)):INTEGER), =($0,
202110)), IS NOT NULL($0))])
HiveTableScan(table=[[default, test3]], table:alias=[d])
ReduceExpressionsRule(Filter) can’t simplify the predicate
52. OutOfMemory at Planning Time - Example (HIVE-25758)
HiveFilter(condition=[
AND(
IN($0, CAST(regexp_replace(...)):INTEGER, 202110),
OR(
AND(
OR(
IS NOT NULL(CAST(regexp_replace(...)):INTEGER),
=(CAST(regexp_replace(...)):INTEGER, 202110)
),
=($0, CAST(regexp_replace(...)):INTEGER)
),
=($0, 202110)
)
)
])
53. Incomplete / Incorrect Plan
● Usually boils down to identifying the first rel that looks “bad”, and trace it back
by looking for the rel#, which is unique, and should appear in the preceding
part of the logs
● Resolution highly depends on the specific issue, but with a precise call# or
rel# it’s possible to set a conditional breakpoint (rules can be invoked multiple
times before producing the issue)
54. Incomplete / Incorrect Plan Hive - Example (HIVE-26722)
● OK:
SELECT * FROM (
SELECT a, b FROM t
UNION ALL
SELECT a, NULL FROM t
) AS t2 WHERE a = 1;
● KO: (missing results)
SELECT * FROM (
SELECT a, b FROM t
UNION ALL
SELECT a, cast(NULL as STRING) FROM t
) AS t2 WHERE a = 1;
HiveUnion(all=[true])
HiveProject(a=[$0], b=[$1])
HiveFilter(condition=[=(CAST($0):DOUBLE, 1)])
HiveTableScan(table=[[default, t]], table:alias=[t])
HiveProject(a=[$0], _o__c1=[null:VARCHAR(2147483647)
CHARACTER SET "UTF-16LE"])
HiveFilter(condition=[=(CAST($0):DOUBLE, 1)])
HiveTableScan(table=[[default, t]], table:alias=[t])
HiveProject(a=[$0], b=[$1])
HiveFilter(condition=[=(CAST($0):DOUBLE, 1)])
HiveTableScan(table=[[default, t]], table:alias=[t])
55. Incomplete / Incorrect Plan Hive - Example (HIVE-26722)
call#5: Rule [HiveFilterProjectTransposeRule]
produced [rel#41:HiveFilter]
call#6: Rule [HiveFilterSetOpTransposeRule]
produced [rel#43:HiveFilter
]
call#7: Rule [HiveFilterProjectTransposeRule]
produced [rel#47:HiveProject]
call#24: Rule [HivePartitionPruneRule(Filter)]
produced [rel#52:HiveFilter]
call#32: Rule [HiveFieldTrimmerRule] produced
[rel#70:HiveFilter]
call#41: Rule [HiveFilterProjectTSTransposeRule]
produced [rel#77:HiveProject]
call#43: Rule [HiveCardinalityPreservingJoinRule]
produced [rel#87:HiveProject]
call#5: Rule [HiveFilterProjectTransposeRule]
produced [rel#47:HiveFilter]
call#6: Rule [HiveFilterSetOpTransposeRule]
produced [rel#51:HiveUnion
]
call#7: Rule [HiveFilterProjectTransposeRule]
produced [rel#57:HiveProject]
call#13: Rule [HiveFilterProjectTransposeRule]
produced [rel#62:HiveProject]
call#15: Rule [ReduceExpressionsRule(Project)]
produced [rel#66:HiveProject]
call#19: Rule [HiveFilterProjectTransposeRule]
produced [rel#69:HiveProject]
call#49: Rule [HivePartitionPruneRule(Filter)]
produced [rel#73:HiveFilter]
call#64: Rule [HiveFieldTrimmerRule] produced
...
56. Disabling Rules via Configuration
● AbstractRelOptPlanner#setRuleDescExclusionFilter allows to exclude rules
based on a regex over their description, even if registered in the planner
● Benefits:
○ It avoids recompiling to exclude some rules from planning while troubleshooting
○ Can be a quick workaround to customers once the faulty rule(s) is identified
○ Can be activated “per-query”
○ Less invasive than disabling CBO altogether (e.g., “hive.cbo.enable=false”)
● HIVE-25880: “Add property to exclude CBO rules by a regex on their
description”
● Example:
set hive.cbo.rule.exclusion.regex=HiveJoinPushTransitivePredicatesRule|HivePreFilteringRule;
57. Conclusion
● Many planning issues boil down to rule transformations making plans bigger
and bigger
● Built-in loggers indispensable for fast troubleshooting
● Easy configuration via XML/Property files (Log4j2)
● Configurable verbosity via FULL_PLAN marker
● Common pain points:
○ Using multiple equivalent operators (OR, SEARCH, IN, etc.)
○ Push/Pull predicate logic in various rules
○ Inconsistent simplifications during planning
● Exploit AbstractRelOptPlanner#setRuleDescExclusionFilter for quick
workarounds and hypotheses verification