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

  • Pipelines on Fire: Why Your CI/CD Tools Are the New Cyber Battlefield
  • Databricks Lakebase: Give Your Agent a Branch, Not Your Production Database
  • Extracting Entities and Relationships From Engineering Documents With spaCy
  • 3D Air Quality Maps With Neo4j, Python, and R

Trending

  • Building a Python API Client That Doesn’t Fall Apart When the API Misbehaves
  • Why AI Hallucinations Are a Quality Engineering Problem
  • Golden Prompts: Turning AI Prompting into an Engineering Practice
  • MCP for Enterprise Tasks: Making the Rare Frequent Enough to Master
  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

  • Pipelines on Fire: Why Your CI/CD Tools Are the New Cyber Battlefield
  • Databricks Lakebase: Give Your Agent a Branch, Not Your Production Database
  • Extracting Entities and Relationships From Engineering Documents With spaCy
  • 3D Air Quality Maps With Neo4j, Python, and R

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