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
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Apache Phoenix: Global Secondary Indexes With Tunable Consistency
  • Grounding AI Agents in Governed Data
  • Engineering Self-Healing SQL Pipelines With LLMs: Validation, Guardrails, and Safe Recovery
  • One Agent, Two Runtimes: Defining State Ownership Between Temporal and LangGraph

Trending

  • One Agent, Two Runtimes: Defining State Ownership Between Temporal and LangGraph
  • The Silent Container Death: A TCP Dial That Never Times Out
  • Kill the Worker, Keep the Research: Build a Recoverable LangGraph Agent on Temporal
  • Building an AI-Ready Data Layer Without Rebuilding the Enterprise
  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
43.0K 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

  • Apache Phoenix: Global Secondary Indexes With Tunable Consistency
  • Grounding AI Agents in Governed Data
  • Engineering Self-Healing SQL Pipelines With LLMs: Validation, Guardrails, and Safe Recovery
  • One Agent, Two Runtimes: Defining State Ownership Between Temporal and LangGraph

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