Abstract
In the coming decade, astronomical surveys of the sky will generate tens of terabytes of images and detect hundreds of millions of sources every night. The study of these sources will involve computation challenges such as anomaly detection and classification, and moving object tracking. Since such studies benefit from the highest quality data, methods such as image coaddition (stacking) will be a critical preprocessing step prior to scientific investigation. With a requirement that these images be analyzed on a nightly basis to identify moving sources or transient objects, these data streams present many computational challenges. Given the quantity of data involved, the computational load of these problems can only be addressed by distributing the workload over a large number of nodes. However, the high data throughput demanded by these applications may present scalability challenges for certain storage architectures. One scalable data-processing method that has emerged in recent years is MapReduce, and in this paper we focus on its popular open-source implementation called Hadoop. In the Hadoop framework, the data is partitioned among storage attached directly to worker nodes, and the processing workload is scheduled in parallel on the nodes that contain the required input data. A further motivation for using Hadoop is that it allows us to exploit cloud computing resources, e.g., Amazon's EC2. We report on our experience implementing a scalable image-processing pipeline for the SDSS imaging database using Hadoop. This multi-terabyte imaging dataset provides a good testbed for algorithm development since its scope and structure approximate future surveys. First, we describe MapReduce and how we adapted image coaddition to the MapReduce framework. Then we describe a number of optimizations to our basic approach and report experimental results comparing their performance.
Introduction: The Challenge of the Data Deluge
Modern astronomy is facing a significant "data deluge." Upcoming surveys, such as the Large Synoptic Survey Telescope (LSST), are expected to generate tens of terabytes of data every night, totaling petabytes over their lifetime. To identify faint objects like distant galaxies or track moving threats like hazardous asteroids, astronomers rely on image coaddition (or stacking). This technique involves aligning and combining multiple overlapping images of the same sky region to significantly improve the signal-to-noise ratio.
Traditional processing methods, often single-threaded or utilizing MPI (Message Passing Interface), struggle to scale to these volumes or handle the hardware failures common in massive clusters. This research investigates whether the MapReduce framework, specifically the open-source Hadoop implementation, can provide a scalable, fault-tolerant, and cloud-ready alternative for these intensive pipelines.
Methodology: Adapting Coaddition to MapReduce
The researchers adapted the coaddition algorithm into a two-stage MapReduce process designed to handle the heavy computational load of image warping and summation.
- Map Stage: Each "mapper" processes a single input image. It verifies if the image matches the query parameters (color filter and sky coordinates) and then performs the primary computation: projecting and warping the image into a common coordinate system.
- Reduce Stage: The "reducer" aggregates all projected images for a specific query and sums them into a final stacked "coadd" image.
Overcoming the "Small File" Bottleneck
Because Hadoop was designed for large web logs rather than millions of small scientific FITS files, the authors introduced several optimizations:
- Sequence Files: Bundling thousands of small files into larger "Sequence Files" reduced the overhead of the Hadoop NameNode.
- Structured Storage: Organizing bundles to match the physical layout of the SDSS camera allowed the system to skip irrelevant data blocks.
- SQL Prefiltering: An external SQL database indexed image metadata, allowing the system to pinpoint exactly which data chunks to send to mappers, minimizing wasted computation.
Datasets and Implementation
The study utilized the Sloan Digital Sky Survey (SDSS) Stripe 82 dataset as a high-fidelity testbed. This dataset consists of approximately 100,000 FITS images (roughly 600 GB uncompressed), approximating the structure of future massive surveys.
Key insights revealed that the primary hurdle was metadata overhead rather than the mathematics of stacking. By bundling files, the researchers achieved an immediate 5x speedup. Furthermore, they found that maintaining data locality—ensuring mappers process data already on their local disks—was critical for performance.
Key Results
The optimized "Structured Sequence File" approach yielded a 10x speedup, reducing the processing time for a large query from 42 minutes to just 4 minutes. On a 400-node cluster, the system processed 100,000 files (300 million pixels) in roughly 3 minutes. Compared to legacy tools like Montage, which took 32 minutes for 40 million pixels, the Hadoop-based system demonstrated a significant leap in throughput, handling 120 million pixels in the same 3-minute window when scaled.
Conclusion and Future Work
While the current Java-based implementation is highly effective, future work involves porting core logic to C++ for further performance gains. The researchers also plan to incorporate more sophisticated Point Spread Function (PSF) matching, background subtraction, and "time-bounds" for tracking transient objects. Long-term goals include integrating parallel machine-learning algorithms directly into the pipeline for automated anomaly detection in the cloud.
Summary updated