Back to search

Iowa State University

Random sampling in Apache Hive

Abstract

dc:description.abstract

<p>Data generated by humans and machines is growing at a rapid pace. Analyzing the data provides trends, patterns, and useful insights in data which helps to make important organizational decisions. Traditional database systems have been storing and analyzing large amounts of data for many decades. In traditional databases, handling and analyzing growing data needs lots of resources and time. Reading and writing large data from a single disk is significantly slow. Storing and reading from multiple disks and combining them for analyzing on a single CPU is also not reasonable for huge amounts of data. The problem of storing and analyzing large amount of data is handled by Apache Hadoop. Apache Hadoop is a collection of open source big data software’s that can efficiently handle storing large amounts of data by dividing data into small blocks and replicates the data to handle system failures. Data is analyzed based on the concept of parallel computation. Hive is a data warehousing software that works on top of Hadoop file system. It has an Hive QL interface to execute queries, and are automatically converted into map reduce or tez or spark jobs. For aggregate queries like AVG, SUM, count e.t.c., and for analyzing trends in data, sampling gives good approximation about overall data. Analyzing sample population can be achieved with limited amount of resources. There are different sampling techniques to draw sample from a population, and choice of sampling technique depends on type of analysis we perform to achieve the goal. In this thesis, we have investigated three techniques to perform random sampling on Hive: simple random sampling using sorting, Bernoulli’s sampling, and our algorithm random sampling using bucketing. Simple random sampling using sorting, and Bernoulli’s sampling goes through the whole data to perform sampling in Hive. This slows down the performance when the data is huge. To avoid whole table scan while performing simple random sampling, our algorithm uses bucketing in hive architecture to manage the data stored on Hadoop Distributed File System. Bucketing divides the whole data into specified number of small blocks. Data is divided into buckets based on a specified column in a table. Bucketing allows to select any bucket of required size without scanning the whole table. Limiting data scan and sorting fewer elements decreases the time taken to perform simple random sampling using bucketing. Our experiments shows random sampling using bucketing performs much faster than random sampling using sorting and Bernoulli sampling when the data sizes or sample sizes are large.</p>

Degree

thesis:*
Name thesis:degree_name
Master of Science
Level thesis:degree_level
thesis
Discipline thesis:degree_discipline
Computer Engineering
Department dc:contributor.department
Department of Electrical and Computer Engineering
Year dc:date.issued
2019

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Parvathaneni, Sai Sree
Advisor dc:contributor.advisor
  • Srikanta Tirthapura

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*
Identifier
archive/lib.dr.iastate.edu/etd/17765/
Dc Identifier Other
8772
16525119
Mods Identifier Filename
archive/lib.dr.iastate.edu/etd/17765/Parvathaneni_iastate_0097M_18278.pdf|||Fri Jan 14 21:28:35 UTC 2022

Chain of custody

source
Harvested from
Iowa State University
Base URL
dr.lib.iastate.edu/server/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
related terms
citation

Parvathaneni, Sai Sree. Random sampling in Apache Hive. thesis thesis, 2019. https://dr.lib.iastate.edu/handle/20.500.12876/31948