DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • The Agent in Your Pipeline Doesn't Have a Manager. That's the Problem.
  • A Practical Pipeline for Identifying Sensitive Columns Before Test Data Masking
  • Database Bottlenecks Nobody Talks About: Optimizing SQL Queries Beyond Indexing
  • Designing a Reliable Data Synchronization Layer: Idempotency, Ownership, and Observability

Trending

  • GraphQL Isn’t Dead Yet, AI Agents Revived It
  • Supply Chain Resilience Analysis With Apache Spark and Neo4j
  • Building an Async Validation API With AWS Bedrock Agents and Serverless Architecture
  • A Practical Pipeline for Identifying Sensitive Columns Before Test Data Masking
  1. DZone
  2. Data Engineering
  3. Databases
  4. Bash Magic: List Hive Table Sizes in GB

Bash Magic: List Hive Table Sizes in GB

How to list the sizes of Hive tables in Hadoop in GBs.

By 
Jakub Holý user avatar
Jakub Holý
·
Jan. 10, 13 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
42.9K Views

Join the DZone community and get the full member experience.

Join For Free

To list the sizes of Hive tables in Hadoop in GBs:


sudo -u hdfs hadoop fs -du /user/hive/warehouse/ | awk '/^[0-9]+/ { print int($1/(1024**3)) " [GB]\t" $2 }'



Result:

448 [GB] hdfs://aewb-analytics-staging-name.example.com:8020/user/hive/warehouse/mybigtable
8 [GB]hdfs://aewb-analytics-staging-name.example.com:8020/user/hive/warehouse/anotherone
0 [GB]hdfs://aewb-analytics-staging-name.example.com:8020/user/hive/warehouse/tinyone


Database Bash (Unix shell)

Published at DZone with permission of Jakub Holý. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • The Agent in Your Pipeline Doesn't Have a Manager. That's the Problem.
  • A Practical Pipeline for Identifying Sensitive Columns Before Test Data Masking
  • Database Bottlenecks Nobody Talks About: Optimizing SQL Queries Beyond Indexing
  • Designing a Reliable Data Synchronization Layer: Idempotency, Ownership, and Observability

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook