tajo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyunsik Choi (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TAJO-220) Implement catalog dump feature
Date Fri, 04 Oct 2013 08:01:53 GMT

     [ https://issues.apache.org/jira/browse/TAJO-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Hyunsik Choi updated TAJO-220:

    Attachment: TAJO-220.patch

I've uploaded the patch. After this patch, users can backup the tajo catalog to a sql file
as follows:

$ bin/tajo_dump customer > table_backup.sql
$ cat table_backup.sql
-- Tajo database dump
-- Dump date: 10/04/2013 16:28:03

-- Name: customer; Type: TABLE; Storage: CSV
-- Path: file:/home/hyunsik/tpch/customer
CREATE EXTERNAL TABLE customer (c_custkey INT8, c_name TEXT, c_address TEXT, c_nationkey INT8,
c_phone TEXT, c_acctbal FLOAT8, c_mktsegment TEXT, c_comment TEXT) USING CSV LOCATION 'file:/home/hyunsik/tpch/customer';

You can also backup the catalog from this sql as follows:
bin/tsql -f table_backup.sql

If you use an option '-a', tajo_dump will dump all table DDLs.
bin/tajo_dump -a > all_backup.sql

> Implement catalog dump feature
> ------------------------------
>                 Key: TAJO-220
>                 URL: https://issues.apache.org/jira/browse/TAJO-220
>             Project: Tajo
>          Issue Type: New Feature
>          Components: catalog
>            Reporter: Hyunsik Choi
>            Priority: Critical
>              Labels: backup, restore
>             Fix For: 0.2-incubating
>         Attachments: TAJO-220.patch
> The current catalog does not support backup and restore feature. Catalog dump feature
will print out all tables and others included in catalog as Tajo DDL statements (i.e., SQL)
via stdout. It can also be stored as a file via shell redirection.
> Also, we need a script to call catalog dump feature in a convenient way as follows:
> {code}
> $ bin/tajo_dump [table name or db name] > tajo_backup.sql
> {code}

This message was sent by Atlassian JIRA

View raw message