How To Write A Nosql Database In Spring Data Project



Similar documents
Hadoop: The Definitive Guide

Hadoop: The Definitive Guide

Spring Data JDBC Extensions Reference Documentation

ITG Software Engineering

Windows PowerShell Cookbook

Hadoop Job Oriented Training Agenda

Workshop on Hadoop with Big Data

Introduction to Big data. Why Big data? Case Studies. Introduction to Hadoop. Understanding Features of Hadoop. Hadoop Architecture.

Programming Hadoop 5-day, instructor-led BD-106. MapReduce Overview. Hadoop Overview

COURSE CONTENT Big Data and Hadoop Training

HADOOP ADMINISTATION AND DEVELOPMENT TRAINING CURRICULUM

brief contents PART 1 BACKGROUND AND FUNDAMENTALS...1 PART 2 PART 3 BIG DATA PATTERNS PART 4 BEYOND MAPREDUCE...385

Jenkins: The Definitive Guide

Data Algorithms. Mahmoud Parsian. Tokyo O'REILLY. Beijing. Boston Farnham Sebastopol

Complete Java Classes Hadoop Syllabus Contact No:

Peers Techno log ies Pv t. L td. HADOOP

Chapter 11 Map-Reduce, Hadoop, HDFS, Hbase, MongoDB, Apache HIVE, and Related

Qsoft Inc

FIFTH EDITION. Oracle Essentials. Rick Greenwald, Robert Stackowiak, and. Jonathan Stern O'REILLY" Tokyo. Koln Sebastopol. Cambridge Farnham.

Enterprise JavaBeans 3.1

Implement Hadoop jobs to extract business value from large and varied data sets

MongoDB Developer and Administrator Certification Course Agenda

Creating Big Data Applications with Spring XD

TRAINING PROGRAM ON BIGDATA/HADOOP

Introduction to Big Data Training

BIG DATA - HADOOP PROFESSIONAL amron

You should have a working knowledge of the Microsoft Windows platform. A basic knowledge of programming is helpful but not required.

Big Data Course Highlights

Hadoop Ecosystem Overview. CMSC 491 Hadoop-Based Distributed Computing Spring 2015 Adam Shook

The Data Access Handbook

Cloud Scale Distributed Data Storage. Jürmo Mehine

Sentimental Analysis using Hadoop Phase 2: Week 2

How To Scale Out Of A Nosql Database

Hive Interview Questions

HDFS. Hadoop Distributed File System

Cloudera Certified Developer for Apache Hadoop

JAVA. EXAMPLES IN A NUTSHELL. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo. Third Edition.

Data processing goes big

Learning Web App Development

Introduction and Overview for Oracle 11G 4 days Weekends

Pro Apache Hadoop. Second Edition. Sameer Wadkar. Madhu Siddalingaiah

EMC Federation Big Data Solutions. Copyright 2015 EMC Corporation. All rights reserved.

Open Source Technologies on Microsoft Azure

ESS event: Big Data in Official Statistics. Antonino Virgillito, Istat

Oracle Big Data SQL Technical Update

OLH: Oracle Loader for Hadoop OSCH: Oracle SQL Connector for Hadoop Distributed File System (HDFS)

NoSQL Data Base Basics

Apache Flink Next-gen data analysis. Kostas

Infomatics. Big-Data and Hadoop Developer Training with Oracle WDP

System Administration of Windchill 10.2

Federated SQL on Hadoop and Beyond: Leveraging Apache Geode to Build a Poor Man's SAP HANA. by Christian

SQL VS. NO-SQL. Adapted Slides from Dr. Jennifer Widom from Stanford

MongoDB in the NoSQL and SQL world. Horst Rechner Berlin,

ISSN: (Online) Volume 3, Issue 4, April 2015 International Journal of Advance Research in Computer Science and Management Studies

Automating System Administration with Perl

Getting Started with SandStorm NoSQL Benchmark

BIG DATA SERIES: HADOOP DEVELOPER TRAINING PROGRAM. An Overview

DBX. SQL database extension for Splunk. Siegfried Puchbauer

Data storing and data access

Creating Connection with Hive

Rails Cookbook. Rob Orsini. O'REILLY 8 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

Internals of Hadoop Application Framework and Distributed File System

HADOOP. Revised 10/19/2015

Hadoop Ecosystem B Y R A H I M A.

Big Data Analytics From Strategie Planning to Enterprise Integration with Tools, Techniques, NoSQL, and Graph

Hadoop IST 734 SS CHUNG

Java Power Tools. John Ferguson Smart. ULB Darmstadt 1 PI. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

Hadoop implementation of MapReduce computational model. Ján Vaňo

Hadoop & Spark Using Amazon EMR

Integrate Master Data with Big Data using Oracle Table Access for Hadoop

Building Scalable Big Data Infrastructure Using Open Source Software. Sam William

INTRODUCTION TO APACHE HADOOP MATTHIAS BRÄGER CERN GS-ASE

Spring,2015. Apache Hive BY NATIA MAMAIASHVILI, LASHA AMASHUKELI & ALEKO CHAKHVASHVILI SUPERVAIZOR: PROF. NODAR MOMTSELIDZE

Table Of Contents. 1. GridGain In-Memory Database

Large Scale Text Analysis Using the Map/Reduce

Spectrum Technology Platform. Version 9.0. Administration Guide

Hadoop 只 支 援 用 Java 開 發 嘛? Is Hadoop only support Java? 總 不 能 全 部 都 重 新 設 計 吧? 如 何 與 舊 系 統 相 容? Can Hadoop work with existing software?

BIRT: A Field Guide to Reporting

Big Data JAMES WARREN. Principles and best practices of NATHAN MARZ MANNING. scalable real-time data systems. Shelter Island

Lambda Architecture. Near Real-Time Big Data Analytics Using Hadoop. January Website:

Big Data Approaches. Making Sense of Big Data. Ian Crosland. Jan 2016

How to Install and Configure EBF15328 for MapR or with MapReduce v1

How To Create A Data Visualization With Apache Spark And Zeppelin

Big Data Development CASSANDRA NoSQL Training - Workshop. March 13 to am to 5 pm HOTEL DUBAI GRAND DUBAI

The evolution of database technology (II) Huibert Aalbers Senior Certified Executive IT Architect

Leveraging the Power of SOLR with SPARK. Johannes Weigend QAware GmbH Germany pache Big Data Europe September 2015

Kafka & Redis for Big Data Solutions

Integrating Big Data into the Computing Curricula

extensible record stores document stores key-value stores Rick Cattel s clustering from Scalable SQL and NoSQL Data Stores SIGMOD Record, 2010

Applications for Big Data Analytics

[Type text] Week. National summer training program on. Big Data & Hadoop. Why big data & Hadoop is important?

t] open source Hadoop Beginner's Guide ij$ data avalanche Garry Turkington Learn how to crunch big data to extract meaning from

Cloud Architecture Patterns

BIG DATA & HADOOP DEVELOPER TRAINING & CERTIFICATION

Certified Big Data and Apache Hadoop Developer VS-1221

project collects data from national events, both natural and manmade, to be stored and evaluated by

American International Journal of Research in Science, Technology, Engineering & Mathematics

Scaling Up 2 CSE 6242 / CX Duen Horng (Polo) Chau Georgia Tech. HBase, Hive

Framework Adoption for Java Enterprise Application Development

Transcription:

Spring Data Modern Data Access for Enterprise Java Mark Pollack, Oliver Gierke, Thomas Risberg, Jon Brisbin, and Michael Hunger O'REILLY* Beijing Cambridge Farnham Koln Sebastopol Tokyo

Table of Contents Foreword xiii Preface xv Part I. Background 1. The Spring Data Project 3 NoSQL Data Access for Spring Developers 3 General Themes 5 The Domain 6 The Sample Code 6 Importing the Source Code into Your IDE 7 2. Repositories: Convenient Data Access Layers 13 Quick Start 13 Defining Query Methods 16 Query Lookup Strategies 16 Query Derivation 17 Pagination and Sorting 18 Defining Repositories 19 Fine-Tuning Repository Interfaces 20 Manually Implementing Repository Methods 21 IDE Integration 22 IntelliJ IDEA 25 3. Type-Safe Querying Using Querydsl 27 Introduction to Querydsl 27 Generating the Query Metamodel 30 Build System Integration 30 Supported Annotation Processors 31 vii

Querying Stores Using Querydsl 32 Integration with Spring Data Repositories 32 Executing Predicates 33 Manually Implementing Repositories 34 Part II. Relational Databases 4. JPA Repositories 37 The Sample Project 37 The Traditional Approach 42 Bootstrapping the Sample Code 44 Using Spring Data Repositories 47 Transactionality 50 Repository Querydsl Integration 51 5. Type-Safe JDBC Programming with Querydsl SQL 53 The Sample Project and Setup 53 The HyperSQL Database 54 The SQL Module of Querydsl 54 Build System Integration 58 The Database Schema 59 The Domain Implementation of the Sample Project 60 The QueryDslJdbcTemplate 63 Executing Queries 64 The Beginning of the Repository Implementation 64 Querying for a Single Object 65 The OneToManyResultSetExtractor Abstract Class 67 The CustomerListExtractor Implementation 68 The Implementations tor the RowMappers 69 Querying for a List of Objects 71 Insert, Update, and Delete Operations 71 Inserting with the SQLInsertClause 7] Updating with the SQLUpdateClause 72 Deleting Rows with the SQLDeleteClause 73 Part III. NoSQL 6. MongoDB: A Document Store 77 MongoDB in a Nutshell 77 Setting Up MongoDB 78 Using the MongoDB Shell 79 viii Table of Contents

The MongoDB Java Driver 80 Setting Up the Infrastructure Using the Spring Namespace 81 The Mapping Subsystem 83 The Domain Model 83 Setting Up the Mapping Infrastructure 89 Indexing 91 Customizing Conversion 91 MongoTcmplatc 94 Mongo Repositories 96 Infrastructure Setup 96 Repositories in Detail 97 Mongo Qucrydsl Integration 99 7. Neo4j: A Graph Database 101 Graph Databases 101 Nco4j 102 Spring Data Nco4j Overview 10.5 Modeling the Domain as a Graph 106 Persisting Domain Objects with Spring Data Nco4j 111 Neo4jTcmplatc 112 Combining Graph and Repository Power 113 Basic Graph Repository Operations 11.5 Derived and Annotated Finder Methods 116 Advanced Graph Use Cases in the Fxample Domain 119 Multiple Roles for a Single Node 119 Product Categories and Tags as Fxamples for In-Graph Indexes 120 Leverage Similar Interests (Collaborative Filtering) 121 Recommendations 122 Transactions, Fntity Life Cycle, and Fetch Strategies 122 Advanced Mapping Mode 123 Working with Nco4j Server 124 Continuing From Here 126 8. Redis: A Key/Value Store 127 Redis in a Nutshell 127 Setting Up Redis 127 Using the Redis Shell 128 Connecting to Redis 129 Object Conversion 130 Object Mapping 133 Atomic Counters 134 Pub/Sub Functionality 13.5 Listening and Responding to Messages 13.5 Table of Contents ix

Using Spring's Cache Abstraction with Redis 136 Part IV. Rapid Application Development 9. Persistence Layers with Spring Roo 141 A Brief Introduction to Roo 141 Roo's Persistence Layers 143 Quick Start 143 Using Roo from the Command Line 143 Using Roo with Spring Tool Suite 145 A Spring Roo JPA Repository Example 147 Creating the Project 147 Setting Up JPA Persistence 148 Creating the Entities 148 Defining the Repositories 150 Creating the Web Layer 150 Running the Example 151 A Spring Roo MongoDB Repository Example 152 Creating the Project 153 Setting Up MongoDB Persistence 153 Creating the Entities 153 Defining the Repositories 154 Creating the Web Layer 154 Running the Example 154 10. REST Repository Exporter 157 The Sample Project 158 Interacting with the REST Exporter 160 Accessing Products 162 Accessing Customers 165 Accessing Orders 169 PartV. Big Data 11. Spring for Apache Hadoop 175 Challenges Developing with Hadoop 176 Hello World 177 Hello World Revealed 179 Hello World Using Spring for Apache Hadoop 183 Scripting HDFS on the JVM 187 Combining HDFS Scripting and Job Submission 190 x Table of Contents

Job Scheduling 191 Scheduling MapReduce Jobs with a TaskScheduler 191 Scheduling MapReduce Jobs with Quartz 193 12. Analyzing Data with Hadoop 195 Using Hive 195 Hello World 196 Running a Hive Server 197 Using the Hive Thrift Client 198 Using the Hive JDBC Client 201 Apache Logfile Analysis Using Hive 202 Using Pig 204 Hello World 205 Running a PigServer 207 Controlling Runtime Script Execution 209 Calling Pig Scripts Inside Spring Integration Data Pipelines 211 Apache Logfile Analysis Using Pig 212 Using HBase 214 Hello World 214 Using the HBase Java Client 215 13. Creating Big Data Pipelines with Spring Batch and Spring Integration 219 Collecting and Loading Data into HDFS 219 An Introduction to Spring Integration 220 Copying Logfiles 222 Event Streams 226 Event Forwarding 229 Management 230 An Introduction to Spring Batch 232 Processing and Loading Data from a Database 234 Hadoop Workflows 238 Spring Batch Support for Hadoop 238 Wordcount as a Spring Batch Application 240 Hive and Pig Steps 242 Exporting Data from HDFS 243 From HDFS to JDBC 243 From HDFS to MongoDB 249 Collecting and Loading Data into Splunk 250 Table of Contents xi

Part VI. Data Grids 14. GemFire: A Distributed Data Grid 255 GemFire in a Nutshell 255 Caches and Regions 257 How to Get GemFire 258 Configuring GemFire with the Spring XML Namespace 258 Cache Configuration 258 Region Configuration 263 Cache Client Configuration 265 Cache Server Configuration 267 WAN Configuration 267 Disk Store Configuration 268 Data Access with GemfircTemplate 269 Repository Usage 271 POJO Mapping 271 Creating a Repository 272 PDX Serialization 272 Continuous Query Support 273 Bibliography 275 Index 277 xii Table ofcontents