H-Store Introduction Andy Pavlo February 13, 2012 Terminology - - PowerPoint PPT Presentation

h store introduction
SMART_READER_LITE
LIVE PREVIEW

H-Store Introduction Andy Pavlo February 13, 2012 Terminology - - PowerPoint PPT Presentation

H-Store Introduction Andy Pavlo February 13, 2012 Terminology Partition: Logical subset of the database. Site: A JVM instance that contains one or more partitions. Host: A single node in the cluster that contains one or more sites.


slide-1
SLIDE 1

Andy Pavlo February 13, 2012

H-Store Introduction

slide-2
SLIDE 2
  • Partition: Logical subset of the

database.

  • Site: A JVM instance that contains one
  • r more partitions.
  • Host: A single node in the cluster that

contains one or more sites.

Terminology

slide-3
SLIDE 3
  • Catalog: Internal information about

the current database.

  • Client: Application that issues

transaction requests at sites.

Terminology

slide-4
SLIDE 4
  • Linux / Mac OS X
  • Only runs on 64-bit platforms.
  • Dependencies:

– gcc/g++ (≥4.3) – java (≥1.6) – ant (≥1.7)

Environment Setup

http://bit.ly/yCJNGQ

slide-5
SLIDE 5
  • Network filesystem.
  • Passwordless SSH login.

Environment Setup

http://bit.ly/yCJNGQ

$ ssh-keygen-t dsa <Use Empty Passwor

  • rd>

d> $ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

slide-6
SLIDE 6
  • All operations executed through ant.
  • H-Store has built-in test applications.
  • Application + Cluster information gets

compiled into “project jar files”.

Introduction

http://bit.ly/yLKvU2

$ ant hstore-prepare epare–Dproject=tpcc

slide-7
SLIDE 7
  • Use build to compile all of the system:
  • Can also compile a subset of the system:

Building H-Store

http://bit.ly/zF28BA

$ ant clean-all all build $ ant clean-java ava build-jav java $ ant clean-cp cpp build-cp cpp

slide-8
SLIDE 8
  • Cluster configuration defined in either

file or from command-line:

– <HostName>:<SiteId>:<PartitionId>

Cluster Configuration

http://bit.ly/yXJsMS

$ ant hstore-prepare epare–Dproject=tpcc –Dhosts

  • sts=h

=hosts

  • sts.txt

txt $ ant hstore-prepare epare–Dproject=tpcc \

  • Dhost

sts=“host:0:0-1;ho host st:1:2 1:2-3”

slide-9
SLIDE 9
  • Use catalog-info to view cluster

configuration.

  • Use catalog-viewer for graphical

catalog browser.

Catalog Information

http://bit.ly/ycNNbs

$ ant catalo alog-info nfo–Dproject=tpcc $ ant catalo alog-view viewer er–Dproject=tpcc

slide-10
SLIDE 10
  • BenchmarkController will

automatically deploy cluster, execute benchmark, and then shutdown:

  • Five built-in benchmarks

– TPC-C and TM1 are most stable.

Executing H-Store

http://bit.ly/w8fHL7

$ ant hstore-ben ench chmar ark–Dproject=tpcc

slide-11
SLIDE 11
  • Can also execute a single procedure:

Executing H-Store

http://bit.ly/w8fHL7

$ ant hstore-ben ench chmar ark–Dproject=tpcc\

  • Dno

noex execut ecute=tru =true e \

  • Dnoshu

shutd tdown wn=tru =true $ ant hstore-invoke nvoke–Dproject=tpcc\

  • Dproc
  • c=Pr

Procedure

  • cedureNam

Name–Dparam am0=123 0=123

slide-12
SLIDE 12
  • Define parameters in hstore.conf

– See website for full listing of available options

  • Can override parameters at start-up

Configuration Files

http://bit.ly/xPH1uU

$ ant hstore-ben ench chmar ark–Dproject=tpcc\

  • Dsite.memo

te.memory=4 =4096 96 \

  • Dcli

lien ent.tx t.txnrat nrate=1 =1000 00

slide-13
SLIDE 13
  • Each site’s log files are written to

separate files in obj/logs/sites

  • Can control log file verbosity by editing

log4j.properties

Log Files

slide-14
SLIDE 14
  • Continuous integration testing.
  • Execute Java-only tests:
  • Execute C++-only tests

Unit Tests

$ ant junit $ ant eecheck eck

slide-15
SLIDE 15
  • src: System source code directories.
  • tests: Unit tests source code.
  • properties: Configuration files.
  • third_party: Additional libraries/jars.

Source Code Hierarchy

slide-16
SLIDE 16
  • src: System source code directories.

–catgen: System catalog schema. –ee: Execution Engine (C++). –frontend: Database Frontend (Java). –protorpc: Network RPC schema. –hsqldb: HSQLDB Wrapper.

Source Code Hierarchy

slide-17
SLIDE 17
  • HStoreSite:

– Manages multiple PartitionExecutors.

  • PartitionExecutor:

– Executes Java stored procedures. – Processes query requests.

  • HStoreCoordinator:

– Communicates with remote HStoreSites.

System Overview

slide-18
SLIDE 18

Partition Executor C++ Execution Engine

Partition Data

↓JNI ↑

Partition Executor C++ Execution Engine

Partition Data

↓JNI ↑

Partition Executor C++ Execution Engine

Partition Data

↓JNI ↑

… Procedure Listener

Procedure Invocation HStoreCoordinator

slide-19
SLIDE 19

HStoreCoordinator HStoreCoordinator

HStoreService (ProtoRPC) Handlers

Transaction Init Transaction Work Transaction Prepare Transaction Finish Dispatcher Send Data Network

Txn#1001 #1001 Execute query at remote site

Local Callback Remote Callback

Execute te Work rk

Invoke Callback Invoke Callback Network

slide-20
SLIDE 20
  • Try running H-Store yourself.

– Let me know if you need more space on department filesystem.

  • Setup H-Store in Eclipse.

– http://bit.ly/xpyLir

What’s Next?

slide-21
SLIDE 21
  • Create a Github account.

– Please use a profile picture so that it easier to know who you are.

  • Fork the H-Store project on Github

– If in two-person group, create one fork and make other team member a “collaborator.”

What’s Next?

slide-22
SLIDE 22
  • Project Proposal

– How you are going to implement your project? – System components and source code files that you think you will need to change/add. – How are you going to test your project? – Interesting issues or unanswered. – Missing or broken features in H-Store.

For Next Class (in Two Weeks)