Press "Enter" to skip to content

Day: May 25, 2021

Understanding Consumer Lag in Apache Kafka

Loretta Jones takes us through the notion of consumer lag in an Apache Kafka topic:

Amongst various metrics that Kafka monitoring includes consumer lag is nearly the most important of them all. In this post, we will explore potential reasons for Kafka consumer lag and what you could do when you experience lag.

This post is fairly high-level, and it does a good job of explaining the notion to someone without much familiarity with Kafka.

Comments closed

Broadcast Variables in Apache Spark

The Hadoop in Real World team explains the notion of broadcast variables in Apache Spark:

Broadcast variables are variables which are available in all executors executing the Spark application. These variables are already cached and ready to be used by tasks executing as part of the application. Broadcast variables are sent to the executors only once and it is available for all tasks executing in the executors.

Read on to understand when they are useful and, just as importantly, when not to use them. They seem like the type of thing which a newer developer could easily misuse.

Comments closed

Testing TLS Protocol Versions with cURL

Anthony Nocentino has a tip for us:

Ever need to set your web server a specific protocol version of TLS for web servers and need a quick way to test that out to confirm? Let’s check out how to use curl to go just that.

This code here uses curl with the parameters --tlsv1.1 --tls-max 1.1, which will force the max TLS protocol version to 1.1. Using the --verbose parameter gives you the ability to see the TLS handshake and get the output sent to standard out.

Also, check the comments for a very helpful addendum.

I should note that cURL is built into Windows 10 as of v1803, and it’s been a part of MacOS and Linux for a long, long time.

Comments closed

Understanding the PipelineVariable

Chad Baldwin shows off the PipelineVariable parameter:

PowerShell has been a daily tool for me for at least 5 or 6 years at this point, so when I learn something new that seems fairly useful I figure it’s probably worth writing about. These posts also help me remember because they force me to do more research into it than I normally would.

TIL (Today I Learned) about the -PipelineVariable parameter in PowerShell, known as a “Common Parameter”; which are automatically added by PowerShell to cmdlets that are decorated with the [cmdletbinding()] attribute.

This is by no means a “new” feature, -PipelineVariable was added as a common parameter in 2017 for version v4.0.

Read on for a clear explanation of how it works and where it can be useful.

Comments closed

Querying the SQL Server Backup History

Chad Callihan takes us through our sordid pasts:

What do you do when you want to check the history of your database backups? Do you look at a drive containing your backups? Do you have software like Netbackup for you to open and review? My preference is to run a query in SSMS to get a quick overview.

With a couple tweaks this versatile script can be helpful in a variety of scenarios. You can check a single database, an entire SQL server, or multiple SQL servers. Here is how I use this type of script that queries the backupset table and backupmediafamily table in msdb. I recommend checking out these two tables because there are some good column options that you may want to include when reviewing backups. If you’re feeling dangerous, just modify the scripts below to be SELECT * and see what you get.

Click through for the scripts.

Comments closed

Network Configuration with Powershell

Patrick Gruenauer shows how to configure network settings on a Windows machine using Powershell:

Today I would like to give a tutorial for a basic network configuration on Windows systems using PowerShell. We start with a fresh installation of a Windows operating system.

Read on for a fairly simple example, one which lays out the foundation for more complicated scenarios such as configuring networking settings for an Availability Group.

Comments closed

Taskbar Management with Powershell

Jeffrey Hicks shows how you can use Powershell to manage Windows 10 taskbar settings:

When I’m working on a Pluralsight course, I tend to setup a virtual machine for recording. Although, lately I’ve been trying with Windows 10 Sandbox. This is handy when all I need is a Windows 10 desktop. When I setup the system, I have particular settings I need to configure. Naturally I use a PowerShell script to automate the process. One item that I wanted to address was Windows 10 taskbar. When I’m recording a course, I like to have it auto-hide. Sure, I could manually set it. But that’s no fun.

After a little online research I came across this page. In addition to the manual steps, the author also provided a snippet of PowerShell code! I assumed there would be registry setting I could configure and was hoping to find that. But this was even better. The author’s code was written to be used from a CMD prompt to invoke a few PowerShell commands. But since I’m already using PowerShell for my desktop configuration, I took his code and created re-usable PowerShell functions.

Read on for a lengthy but helpful script.

Comments closed

Percentages in Execution Plans

Hugo Kornelis shares some information with us:

A lot of information you see when looking at execution plan is shown as a percentage. And those percentages are often the first thing that draws our attention. So it’s really important to know what those values are. And yet, I had forgotten to include coverage for percentages in my training videos. And you’ll also not find those percentages mentioned in the Execution Plan Reference. Why? Simple. They don’t exist.

It is here that I imagine a short silence. Followed by a huge outburst. “What? Of course they exist! I look at them every day!”

Read on to see what Hugo means, and also check out the video training course.

Comments closed