AMGA Handson - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

AMGA Handson

Description:

... metadata-optional directory replication constraints entry ... Query cd tutorial. Query pwd /isgc/taipei100/tutorial/ A directory-like structure ... – PowerPoint PPT presentation

Number of Views:88
Avg rating:3.0/5.0
Slides: 19
Provided by: www2T1
Category:
Tags: amga | cd | handson | replication

less

Transcript and Presenter's Notes

Title: AMGA Handson


1
AMGA Hands-on
  • Speaker Namgyu KIM
  • Staff Sehoon Lee
  • 2009. 4. 18. ASGC, Taipei, Taiwan

2
Logging to the machine
  • Host bit143.sinica.edu.tw
  • Account(s) taipeiXX, where XX01,..,60
  • OS Password GridTAIXX where XX01,..,60
  • Ex)
  • login as taipei100
  • taipei100_at_bit143.sinica.edu.tw's password
    (GridTAI100)
  • Last login Sat Apr 18 001958 2009 from
    140.109.175.184
  • taipei100_at_bit143

3
Connecting to the AMGA server
  • taipei100_at_bit143 mdclient
  • Connecting to kenobi.kisti.re.kr8822...
  • ARDA Metadata Server 1.9.0
  • Querygt

4
AMGA help
  • Querygt help
  • gtgt help topic
  • gtgt Displays help on a command or a topic.
  • gtgt Valid topics are help metadata
    metadata-optional directory replication
    constraints entry group acl index schema sequence
    user view site replicas ticket capabilities
    commands
  • Querygt help ls
  • gtgt ls -Plgm entry
  • gtgt List a directory.

5
Checking a current directory
  • Querygt help pwd
  • gtgt pwd
  • gtgt Prints current working directory.
  • Querygt pwd
  • gtgt /isgc/taipei100/

6
Creating a directory
  • Querygt help createdir
  • gtgt createdir /parentdir/dir option
  • gtgt Creates a new directory..
  • Querygt createdir tutorial
  • Querygt ls -l
  • gtgt drwxrwxr-x taipei100
    /isgc/taipei100/tutorial

7
Changing a current directory
  • Querygt help cd
  • gtgt cd directory
  • gtgt Changes current working directory.
  • Querygt pwd
  • gtgt /isgc/taipei100/
  • Querygt cd tutorial
  • Querygt pwd
  • gtgt /isgc/taipei100/tutorial/

8
A directory-like structure
  • Querygt cd ..
  • Querygt pwd
  • gtgt /isgc/taipei100/tutorial/
  • Querygt createdir tutorial/handson
  • Querygt cd tutorial
  • Querygt ls
  • gtgt /isgc/taipei100/tutorial/handson
  • Querygt cd handson
  • Querygt pwd
  • gtgt /isgc/taipei100/tutorial/handson

9
Adding attributes to schema
  • Querygt cd ../..
  • Querygt pwd
  • gtgt /isgc/taipei100/
  • Querygt help addattr
  • gtgt addattr dir attribute type
  • gtgt Adds a new attribute to a directory.
  • Querygt createdir cities
  • Querygt addattr cities altitude int
  • Querygt addattr cities latitude int
  • Querygt addattr cities population int
  • Querygt listattr cities
  • gtgt altitude
  • gtgt int
  • gtgt latitude
  • gtgt int
  • gtgt population
  • gtgt int

10
Filling the schema with entries
  • Querygt pwd
  • gtgt /isgc/taipei100/
  • Querygt help addentry
  • gtgt addentry entry1 attr value...
  • gtgt Adds a new entry and initializes some
    attributes.
  • Querygt addentry cities/Seoul altitude 86 latitude
    37 population 100297004
  • Querygt addentry cities/Hamburg altitude 6
    latitude 53 population 280229
  • Querygt addentry cities/Geneva altitude 374
    latitude 46 population 188000
  • Querygt ls -l cities
  • gtgt -rwxrwxrwx NULL
    Seoul
  • gtgt -rwxrwxrwx NULL
    Hamburg
  • gtgt -rwxrwxrwx NULL
    Geneva

11
Filling the schema with entries reading them
using native SQL
  • Querygt pwd
  • gtgt /isgc/taipei100/
  • Querygt INSERT INTO cities (FILE, altitude,
    latitude, population) VALUES (Taipei',33, 25,
    22815000)
  • Querygt ls cities
  • gtgt Seoul
  • gtgt Hamburg
  • gtgt Geneva
  • gtgt Taipei
  • Querygt SELECT FILE FROM cities
  • gtgt FILE
  • gtgt Seoul
  • gtgt Hamburg
  • gtgt Geneva
  • gtgt Taipei

12
Reading information with condition
  • Querygt pwd
  • gtgt /isgc/taipei100/
  • Querygt help selectattr
  • gtgt selectattr attr... condition
  • gtgt Returns the values of given attributes for
    all files matching condition.
  • Querygt selectattr citiesFILE population
    'altitude gt 100'
  • gtgt Geneva
  • gtgt 188000
  • Querygt SELECT FILE, population FROM cities WHERE
    altitudegt100
  • gtgt FILE
  • gtgt population
  • gtgt Geneva
  • gtgt 188000

13
Preparing and Warming up for Quiz
  • Querygt quit
  • Exiting
  • taipei100_at_bit143 ./add_weather_info.sh
  • ..
  • taipei100_at_bit143 mdclient
  • Connecting to kenobi.kisti.re.kr8822...
  • ARDA Metadata Server 1.9.0
  • Querygt ls
  • gtgt /isgc/taipei100/cities
  • gtgt /isgc/taipei100/weather

14
Preparing and Warming up for Quiz
15
Warming up questions
  • Which are the cities further north than 50
    degrees north, and how high are they?

Querygt selectattr citiesFILE altitude 'latitude
gt 50' gtgt Hamburg gtgt 6
Querygt SELECT cities.FILE, altitude FROM cities
WHERE latitude gt 50
16
Warming up questions
  • Which city has low temperature less than 14
    degrees in June?

Querygt SELECT city FROM weather WHERE temp_lolt14
AND month'June' gtgt city gtgt Hamburg gtgt Geneva
Querygt selectattr weathercity 'temp_lolt14 and
monthJune'
17
Warming up questions
  • Which city has high temperatures higher than 30
    degrees and the altitude of city is higher than
    50 meters. Also How many people do live in that
    city and What low temperature is at that time?

Querygt selectattr citiesFILE citiespopulation
weathertemp_lo 'weathertemp_hi gt 30 and
weathercity citiesFILE and citiesaltitude gt
50 gtgt Seoul gtgt 100297004 gtgt 21
Querygt SELECT weather.city, cities.population,
weather.temp_lo FROM cities, weather WHERE
weather.temp_higt30 AND weather.citycities.FILE
AND cities.altitudegt50
18
Quiz
  • Find the city name, the population and low
    temperature of city which is high temperature
    less than 20 in July and altitude of city is
    higher than 100.

Querygt SELECT cities.FILE, cities.population,
weather.temp_lo FROM cities, weather WHERE
weather.temp_hilt20 AND weather.month'July' AND
cities.altitudegt100 AND cities.FILEweather.city
Querygt selectattr citiesFILE citiespopulation
weathertemp_lo 'weathertemp_hilt20 and
weathermonth"July" and citiesaltitudegt100 and
citiesFILEweathercity'
Write a Comment
User Comments (0)
About PowerShow.com