You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hcatalog-commits@incubator.apache.org by ga...@apache.org on 2012/07/25 20:29:49 UTC
svn commit: r1365722 [2/11] - in /incubator/hcatalog/trunk: ./ ant/ conf/
hcatalog-pig-adapter/ ivy/ src/docs/src/documentation/content/xdocs/
src/docs/src/documentation/content/xdocs/images/
src/java/org/apache/hcatalog/mapreduce/ src/test/e2e/templet...
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/deletedb.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/deletedb.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/deletedb.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/deletedb.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>DELETE ddl/database/:db</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>Delete a database.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db</p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:db</strong></td>
+ <td>The database name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>ifExists</strong></td>
+ <td>Hive returns an error if the database specified does not exist,
+ unless ifExists is set to true.</td>
+ <td>Optional</td>
+ <td>false</td>
+ </tr>
+
+ <tr><td><strong>option</strong></td>
+ <td>Parameter set to either "restrict" or "cascade". Restrict will remove the
+ schema if all the tables are empty. Cascade removes everything including
+ data and definitions.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>group</strong></td>
+ <td>The user group to use</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>permissions</strong></td>
+ <td>The permissions string to use. The format is
+ "<code>rwxrw-r-x</code>".</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>database</strong></td>
+ <td>The database name</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s -X DELETE "http://localhost:50111/templeton/v1/ddl/database/newdb?user.name=ctdean"
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "database":"newdb"
+}
+</source>
+
+ <p><strong>JSON Output (error)</strong></p>
+<source>
+{
+ "errorDetail": "
+ NoSuchObjectException(message:There is no database named my_db)
+ at org.apache.hadoop.hive.metastor...
+ ",
+ "error": "There is no database named newdb",
+ "errorCode": 404,
+ "database": "newdb"
+}
+</source>
+
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/deletepartition.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/deletepartition.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/deletepartition.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/deletepartition.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>DELETE ddl/database/:db/table/:table/partition/:partition</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>Delete (drop) a partition in an HCatalog table.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db<code>/table/</code>:table<code>/partition/</code>:partition</p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:db</strong></td>
+ <td>The database name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:table</strong></td>
+ <td>The table name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:partition</strong></td>
+ <td>The partition name, col_name='value' list. Be careful to properly
+ encode the quote for http, for example, country=%27algeria%27.</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>ifExists</strong></td>
+ <td>Hive returns an error if the partition specified does not exist,
+ unless ifExists is set to true.</td>
+ <td>Optional</td>
+ <td>false</td>
+ </tr>
+
+ <tr><td><strong>group</strong></td>
+ <td>The user group to use</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>permissions</strong></td>
+ <td>The permissions string to use. The format is
+ "<code>rwxrw-r-x</code>".</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>partition</strong></td>
+ <td>The partition name</td>
+ </tr>
+
+ <tr><td><strong>table</strong></td>
+ <td>The table name</td>
+ </tr>
+
+ <tr><td><strong>database</strong></td>
+ <td>The database name</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s -X DELETE \
+ 'http://localhost:50111/templeton/v1/ddl/database/default/table/test_table/partition/country=%27algeria%27?user.name=ctdean'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "partition": "country='algeria'",
+ "table": "test_table",
+ "database": "default"
+}
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/deletetable.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/deletetable.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/deletetable.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/deletetable.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>DELETE ddl/database/:db/table/:table</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>Delete (drop) an HCatalog table.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db<code>/table/</code>:table</p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:db</strong></td>
+ <td>The database name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:table</strong></td>
+ <td>The table name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>ifExists</strong></td>
+ <td>Hive 0.70 and later returns an error if the table specified does not exist,
+ unless ifExists is set to true.</td>
+ <td>Optional</td>
+ <td>false</td>
+ </tr>
+
+ <tr><td><strong>group</strong></td>
+ <td>The user group to use</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>permissions</strong></td>
+ <td>The permissions string to use. The format is
+ "<code>rwxrw-r-x</code>".</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>table</strong></td>
+ <td>The table name</td>
+ </tr>
+
+ <tr><td><strong>database</strong></td>
+ <td>The database name</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s -X DELETE 'http://localhost:50111/templeton/v1/ddl/database/default/table/test_table?user.name=ctdean'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "table": "test_table",
+ "database": "default"
+}
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/desccolumn.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/desccolumn.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/desccolumn.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/desccolumn.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>GET ddl/database/:db/table/:table/column/:column</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>Describe a single column in an HCatalog table.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db<code>/table/</code>:table<code>/column/</code>:column</p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:db</strong></td>
+ <td>The database name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:table</strong></td>
+ <td>The table name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:column</strong></td>
+ <td>The column name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>database</strong></td>
+ <td>The database name</td>
+ </tr>
+
+ <tr><td><strong>table</strong></td>
+ <td>The table name</td>
+ </tr>
+
+ <tr><td><strong>column</strong></td>
+ <td>A JSON object containing the column name, type, and comment (if any)</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s 'http://localhost:50111/templeton/v1/ddl/database/default/table/test_table/column/price?user.name=ctdean'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "database": "default",
+ "table": "test_table",
+ "column": {
+ "name": "price",
+ "comment": "The unit price",
+ "type": "float"
+ }
+}
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/descdb.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/descdb.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/descdb.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/descdb.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>GET ddl/database/:db</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>Describe a database. (Note: this resource has a "format=extended" parameter however
+ the output structure does not change if it is used.)</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db</p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:db</strong></td>
+ <td>The database name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>location</strong></td>
+ <td>The database location</td>
+ </tr>
+
+ <tr><td><strong>params</strong></td>
+ <td>The database parameters</td>
+ </tr>
+
+ <tr><td><strong>comment</strong></td>
+ <td>The database comment</td>
+ </tr>
+
+ <tr><td><strong>database</strong></td>
+ <td>The database name</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s 'http://localhost:50111/templeton/v1/ddl/database/newdb?user.name=ctdean'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "location":"hdfs://localhost:9000/warehouse/newdb.db",
+ "params":"{a=b}",
+ "comment":"Hello there",
+ "database":"newdb"
+}
+</source>
+
+ <p><strong>JSON Output (error)</strong></p>
+<source>
+{
+ "error": "No such database: newdb",
+ "errorCode": 404
+}
+</source>
+
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/descpartition.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/descpartition.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/descpartition.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/descpartition.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>GET ddl/database/:db/table/:table/partition/:partition</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>Describe a single partition in an HCatalog table.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db<code>/table/</code>:table<code>/partition/</code>:partition</p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:db</strong></td>
+ <td>The database name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:table</strong></td>
+ <td>The table name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:partition</strong></td>
+ <td>The partition name, col_name='value' list. Be careful to properly
+ encode the quote for http, for example, country=%27algeria%27.</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>database</strong></td>
+ <td>The database name</td>
+ </tr>
+
+ <tr><td><strong>table</strong></td>
+ <td>The table name</td>
+ </tr>
+
+ <tr><td><strong>partition</strong></td>
+ <td>The partition name</td>
+ </tr>
+
+ <tr><td><strong>partitioned</strong></td>
+ <td>True if the table is partitioned</td>
+ </tr>
+
+ <tr><td><strong>location</strong></td>
+ <td>Location of table</td>
+ </tr>
+
+ <tr><td><strong>outputFormat</strong></td>
+ <td>Output format</td>
+ </tr>
+
+ <tr><td><strong>columns</strong></td>
+ <td>list of column names, types, and comments</td>
+ </tr>
+
+ <tr><td><strong>owner</strong></td>
+ <td>The owner's user name</td>
+ </tr>
+
+ <tr><td><strong>partitionColumns</strong></td>
+ <td>List of the partition columns</td>
+ </tr>
+
+ <tr><td><strong>inputFormat</strong></td>
+ <td>Input format</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s \
+ 'http://localhost:50111/templeton/v1/ddl/database/default/table/mytest/partition/country=%27US%27?user.name=ctdean'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "partitioned": true,
+ "location": "hdfs://ip-10-77-6-151.ec2.internal:8020/apps/hive/warehouse/mytest/loc1",
+ "outputFormat": "org.apache.hadoop.hive.ql.io.RCFileOutputFormat",
+ "columns": [
+ {
+ "name": "i",
+ "type": "int"
+ },
+ {
+ "name": "j",
+ "type": "bigint"
+ },
+ {
+ "name": "ip",
+ "comment": "IP Address of the User",
+ "type": "string"
+ }
+ ],
+ "owner": "rachel",
+ "partitionColumns": [
+ {
+ "name": "country",
+ "type": "string"
+ }
+ ],
+ "inputFormat": "org.apache.hadoop.hive.ql.io.RCFileInputFormat",
+ "database": "default",
+ "table": "mytest",
+ "partition": "country='US'"
+}
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/descproperty.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/descproperty.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/descproperty.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/descproperty.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>GET ddl/database/:db/table/:table/property/:property</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>Return the value of a single table property.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db<code>/table/</code>:table<code>/property/</code>:property</p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:db</strong></td>
+ <td>The database name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:table</strong></td>
+ <td>The table name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:property</strong></td>
+ <td>The property name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>property</strong></td>
+ <td>The requested property's name: value pair</td>
+ </tr>
+
+ <tr><td><strong>database</strong></td>
+ <td>The database name</td>
+ </tr>
+
+ <tr><td><strong>table</strong></td>
+ <td>The table name</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s 'http://localhost:50111/templeton/v1/ddl/database/default/table/test_table/property/fruit?user.name=ctdean'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "property": {
+ "fruit": "apple"
+ },
+ "table": "test_table",
+ "database": "default"
+}
+</source>
+
+ <p><strong>JSON Output (error)</strong></p>
+<source>
+{
+ "error": "Table test_table does not exist",
+ "errorCode": 404,
+ "database": "default",
+ "table": "test_table"
+}
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/desctable.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/desctable.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/desctable.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/desctable.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>GET ddl/database/:db/table/:table</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>Describe an HCatalog table. Normally returns a simple list of columns
+ (using "desc table"), but the extended format will show more information (using
+ "show table extended like").</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db<code>/table/</code>:table</p>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db<code>/table/</code>:table<code>?format=extended</code></p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:db</strong></td>
+ <td>The database name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:table</strong></td>
+ <td>The table name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>format</strong></td>
+ <td>Set "format=extended" to see additional information (using "show table
+ extended like")</td>
+ <td>Optional</td>
+ <td>Not extended</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>columns</strong></td>
+ <td>A list of column names and types</td>
+ </tr>
+
+ <tr><td><strong>database</strong></td>
+ <td>The database name</td>
+ </tr>
+
+ <tr><td><strong>table</strong></td>
+ <td>The table name</td>
+ </tr>
+
+ <tr><td><strong>partitioned</strong> (extended only)</td>
+ <td>True if the table is partitioned</td>
+ </tr>
+
+ <tr><td><strong>location</strong> (extended only)</td>
+ <td>Location of table</td>
+ </tr>
+
+ <tr><td><strong>outputFormat</strong> (extended only)</td>
+ <td>Output format</td>
+ </tr>
+
+ <tr><td><strong>owner</strong> (extended only)</td>
+ <td>The owner's user name</td>
+ </tr>
+
+ <tr><td><strong>partitionColumns</strong> (extended only)</td>
+ <td>List of the partition columns</td>
+ </tr>
+
+ <tr><td><strong>inputFormat</strong> (extended only)</td>
+ <td>Input format</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command (simple)</strong></p>
+<source>
+% curl -s 'http://localhost:50111/templeton/v1/ddl/database/default/table/my_table?user.name=ctdean'
+</source>
+
+ <p><strong>JSON Output (simple)</strong></p>
+<source>
+{
+ "columns": [
+ {
+ "name": "id",
+ "type": "bigint"
+ },
+ {
+ "name": "user",
+ "comment": "The user name",
+ "type": "string"
+ },
+ {
+ "name": "my_p",
+ "type": "string"
+ },
+ {
+ "name": "my_q",
+ "type": "string"
+ }
+ ],
+ "database": "default",
+ "table": "my_table"
+}
+</source>
+
+ <p><strong>Curl Command (extended)</strong></p>
+<source>
+% curl -s 'http://localhost:50111/templeton/v1/ddl/database/default/table/test_table?user.name=ctdean&format=extended'
+</source>
+
+ <p><strong>JSON Output (extended)</strong></p>
+<source>
+{
+ "partitioned": true,
+ "location": "hdfs://ip-10-77-6-151.ec2.internal:8020/apps/hive/warehouse/test_table",
+ "outputFormat": "org.apache.hadoop.hive.ql.io.RCFileOutputFormat",
+ "columns": [
+ {
+ "name": "id",
+ "type": "bigint"
+ },
+ {
+ "name": "price",
+ "comment": "The unit price",
+ "type": "float"
+ }
+ ],
+ "owner": "ctdean",
+ "partitionColumns": [
+ {
+ "name": "country",
+ "type": "string"
+ }
+ ],
+ "inputFormat": "org.apache.hadoop.hive.ql.io.RCFileInputFormat",
+ "database": "default",
+ "table": "test_table"
+}
+</source>
+
+ <p><strong>JSON Output (error)</strong></p>
+<source>
+{
+ "error": "Table xtest_table does not exist",
+ "errorCode": 404,
+ "database": "default",
+ "table": "xtest_table"
+}
+</source>
+
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/example.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/example.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/example.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/example.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>Example </title>
+ </header>
+ <body>
+ <p>The following example, extracted from the HCatalog documentation, shows how people
+ might use HCatalog along with various other Hadoop tools to move data from the grid
+ into a database and ultimately analyze it.</p>
+
+ <p><strong>Without Templeton</strong> there are three main steps to completing
+ the task.</p>
+
+ <p>First, Joe in data acquisition uses distcp to get data
+ onto the grid.</p>
+
+<source>
+hadoop distcp file:///file.dat hdfs://data/rawevents/20100819/data
+
+hcat "alter table rawevents add partition 20100819 hdfs://data/rawevents/20100819/data"
+</source>
+
+<p>Second, Sally in data processing uses Pig to cleanse and prepare the
+ data. Oozie will be notified by HCatalog that data is available and can then
+ start the Pig job</p>
+
+<source>
+A = load 'rawevents' using HCatLoader;
+B = filter A by date = '20100819' and by bot_finder(zeta) = 0;
+â¦
+store Z into 'processedevents' using HCatStorer("date=20100819");
+</source>
+
+<p>Third, Robert in client management uses Hive to analyze his
+ clients' results.</p>
+
+<source>
+insert overwrite table 20100819events
+select advertiser_id, count(clicks)
+from processedevents
+where date = â20100819â
+group by adverstiser_id;
+</source>
+
+<p><strong>With Templeton</strong> all these steps can be easily performed programatcally
+ upon receipt of the initial data. Sally and Robert can still maintain their own scripts
+ and simply push them into HDFS to be accessed when required by Templeton. </p>
+
+<source>
+??Still need to add web hdfs push!
+
+>POST /v1/templeton/ddl.json?exec="alter table rawevents add partition 20100819 hdfs://data/rawevents/20100819/data"
+>{"result":"ok"}
+>
+>POST /v1/templeton/pig.json?src="hdfs://scripts/cleanse.pig"
+>{"result": "ok", "jobid": "123"}
+>
+>...
+>GET /v1/templeton/queue/123.json
+>{"result": "ok", "status" "completed"}
+>
+>POST /v1/templeton/hive.json?src="hdfs://scripts/analyze.hive"
+>{"result": "ok", "jobid": "456"}
+>
+</source>
+
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/hive.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/hive.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/hive.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/hive.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>POST hive </title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>Runs a <a href="http://hive.apache.org/">Hive</a> query or set of commands.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/hive</code></p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>execute</strong></td>
+ <td>String containing an entire, short hive program to run.</td>
+ <td>One of either "execute" or "file" is required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>file</strong></td>
+ <td>HDFS file name of a hive program to run.</td>
+ <td>One of either "exec" or "file" is required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>define</strong></td>
+ <td>Set a Hive configuration variable using the syntax
+ <code>define=NAME=VALUE</code>.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>statusdir</strong></td>
+ <td>A directory where Templeton will write the status of the
+ Hive job. If provided, it is the caller's responsibility
+ to remove this directory when done.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>callback</strong></td>
+ <td>Define a URL to be called upon job completion. You may embed a specific
+ job ID into this URL using <code>$jobId</code>. This tag
+ will be replaced in the callback URL with this job's job ID.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>id</strong></td>
+ <td>A string containing the job ID similar to "job_201110132141_0001".</td>
+ </tr>
+
+ <tr><td><strong>info</strong></td>
+ <td>A JSON object containing the information returned when the job was queued.
+ See the Hadoop documentation
+ (<a href="http://hadoop.apache.org/common/docs/stable/api/org/apache/hadoop/mapred/TaskController.html">Class
+ TaskController</a>) for more information.</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s -d user.name=ctdean \
+ -d execute="select+*+from+pokes;" \
+ -d statusdir="pokes.output" \
+ 'http://localhost:50111/templeton/v1/hive'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "id": "job_201111111311_0005",
+ "info": {
+ "stdout": "templeton-job-id:job_201111111311_0005
+ ",
+ "stderr": "",
+ "exitcode": 0
+ }
+}
+</source>
+
+ <p><strong>Results</strong></p>
+<source>
+% hadoop fs -ls pokes.output
+Found 2 items
+-rw-r--r-- 1 ctdean supergroup 610 2011-11-11 13:22 /user/ctdean/pokes.output/stderr
+-rw-r--r-- 1 ctdean supergroup 15 2011-11-11 13:22 /user/ctdean/pokes.output/stdout
+
+% hadoop fs -cat pokes.output/stdout
+1 a
+2 bb
+3 ccc
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/images/TempletonArch.jpg
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/images/TempletonArch.jpg?rev=1365722&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/images/TempletonArch.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/images/templetonlogo.png
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/images/templetonlogo.png?rev=1365722&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/images/templetonlogo.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/images/templetonlogov2.png
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/images/templetonlogov2.png?rev=1365722&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/images/templetonlogov2.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/images/templetontitle.jpg
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/images/templetontitle.jpg?rev=1365722&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/images/templetontitle.jpg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listcolumns.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listcolumns.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listcolumns.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listcolumns.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>GET ddl/database/:db/table/:table/column</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>List the columns in an HCatalog table.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db<code>/table/</code>:table<code>/column</code></p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:db</strong></td>
+ <td>The database name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:table</strong></td>
+ <td>The table name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>columns</strong></td>
+ <td>A list of column names and types</td>
+ </tr>
+
+ <tr><td><strong>database</strong></td>
+ <td>The database name</td>
+ </tr>
+
+ <tr><td><strong>table</strong></td>
+ <td>The table name</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s 'http://localhost:50111/templeton/v1/ddl/database/default/table/my_table/column?user.name=ctdean'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "columns": [
+ {
+ "name": "id",
+ "type": "bigint"
+ },
+ {
+ "name": "user",
+ "comment":"The user name",
+ "type": "string"
+ },
+ {
+ "name": "my_p",
+ "type": "string"
+ },
+ {
+ "name": "my_q",
+ "type": "string"
+ }
+ ],
+ "database": "default",
+ "table": "my_table"
+}
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listdbs.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listdbs.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listdbs.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listdbs.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>GET ddl/database</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>List the databases in HCatalog.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database</code></p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>like</strong></td>
+ <td>List only databases whose names match the specified pattern</td>
+ <td>Optional</td>
+ <td>"*" (List all)</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>databases</strong></td>
+ <td>A list of database names</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s 'http://localhost:50111/templeton/v1/ddl/database?user.name=ctdean&like=n*'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "databases": [
+ "newdb",
+ "newdb2"
+ ]
+}
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listpartitions.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listpartitions.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listpartitions.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listpartitions.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>GET ddl/database/:db/table/:table/partition</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>List all the partitions in an HCatalog table.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db<code>/table/</code>:table<code>/partition</code></p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:db</strong></td>
+ <td>The database name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:table</strong></td>
+ <td>The table name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>partitions</strong></td>
+ <td>A list of partition values and of partition names</td>
+ </tr>
+
+ <tr><td><strong>database</strong></td>
+ <td>The database name</td>
+ </tr>
+
+ <tr><td><strong>table</strong></td>
+ <td>The table name</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s 'http://localhost:50111/templeton/v1/ddl/database/default/table/my_table/partition?user.name=ctdean'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "partitions": [
+ {
+ "values": [
+ {
+ "columnName": "dt",
+ "columnValue": "20120101"
+ },
+ {
+ "columnName": "country",
+ "columnValue": "US"
+ }
+ ],
+ "name": "dt='20120101',country='US'"
+ }
+ ],
+ "database": "default",
+ "table": "my_table"
+}
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listproperties.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listproperties.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listproperties.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listproperties.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>GET ddl/database/:db/table/:table/property</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>List all the properties of an HCatalog table.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db<code>/table/</code>:table<code>/property</code></p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:db</strong></td>
+ <td>The database name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>:table</strong></td>
+ <td>The table name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>properties</strong></td>
+ <td>A list of the tables properties in name: value pairs</td>
+ </tr>
+
+ <tr><td><strong>database</strong></td>
+ <td>The database name</td>
+ </tr>
+
+ <tr><td><strong>table</strong></td>
+ <td>The table name</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s 'http://localhost:50111/templeton/v1/ddl/database/default/table/test_table/property?user.name=ctdean'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "properties": {
+ "fruit": "apple",
+ "last_modified_by": "ctdean",
+ "hcat.osd": "org.apache.hcatalog.rcfile.RCFileOutputDriver",
+ "color": "blue",
+ "last_modified_time": "1331620706",
+ "hcat.isd": "org.apache.hcatalog.rcfile.RCFileInputDriver",
+ "transient_lastDdlTime": "1331620706",
+ "comment": "Best table made today",
+ "country": "Albania"
+ },
+ "table": "test_table",
+ "database": "default"
+}
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listtables.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listtables.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listtables.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/listtables.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>GET ddl/database/:db/table</title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>List the tables in an HCatalog database.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/ddl/database/</code>:db<code>/table</code></p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:db</strong></td>
+ <td>The database name</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>like</strong></td>
+ <td>List only tables whose names match the specified pattern</td>
+ <td>Optional</td>
+ <td>"*" (List all tables)</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>tables</strong></td>
+ <td>A list of table names</td>
+ </tr>
+
+ <tr><td><strong>database</strong></td>
+ <td>The database name</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s 'http://localhost:50111/templeton/v1/ddl/database/default/table?user.name=ctdean&like=m*'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "tables": [
+ "my_table",
+ "my_table_2",
+ "my_table_3"
+ ],
+ "database": "default"
+}
+</source>
+
+ <p><strong>JSON Output (error)</strong></p>
+<source>
+{
+ "errorDetail": "
+ org.apache.hadoop.hive.ql.metadata.HiveException: ERROR: The database defaultsd does not exist.
+ at org.apache.hadoop.hive.ql.exec.DDLTask.switchDatabase(DDLTask.java:3122)
+ at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:224)
+ at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:134)
+ at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
+ at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1332)
+ at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1123)
+ at org.apache.hadoop.hive.ql.Driver.run(Driver.java:931)
+ at org.apache.hcatalog.cli.HCatDriver.run(HCatDriver.java:42)
+ at org.apache.hcatalog.cli.HCatCli.processCmd(HCatCli.java:247)
+ at org.apache.hcatalog.cli.HCatCli.processLine(HCatCli.java:203)
+ at org.apache.hcatalog.cli.HCatCli.main(HCatCli.java:162)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
+ at java.lang.reflect.Method.invoke(Method.java:597)
+ at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
+ ",
+ "error": "FAILED: Error in metadata: ERROR: The database defaultsd does not exist.",
+ "errorCode": 500,
+ "database": "defaultsd"
+}
+</source>
+
+
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/mapreducejar.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/mapreducejar.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/mapreducejar.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/mapreducejar.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>POST mapreduce/jar </title>
+ </header>
+
+ <body>
+
+ <section>
+ <title>Description</title>
+ <p>Creates and queues a standard
+ <a href="http://hadoop.apache.org/common/docs/current/commands_manual.html">
+ Hadoop MapReduce</a> job.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/mapreduce/jar</code></p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>jar</strong></td>
+ <td>Name of the jar file for Map Reduce to use.</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>class</strong></td>
+ <td>Name of the class for Map Reduce to use.</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>libjars</strong></td>
+ <td>Comma separated jar files to include in the classpath.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr
+>
+ <tr><td><strong>files</strong></td>
+ <td>Comma separated files to be copied to the map reduce cluster</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>arg</strong></td>
+ <td>Set a program argument.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>define</strong></td>
+ <td>Set an Hadoop configuration variable using the syntax
+ <code>define=NAME=VALUE</code></td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>statusdir</strong></td>
+ <td>A directory where Templeton will write the status of the
+ Map Reduce job. If provided, it is the caller's responsibility
+ to remove this directory when done.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>callback</strong></td>
+ <td>Define a URL to be called upon job completion. You may embed a specific
+ job ID into this URL using <code>$jobId</code>. This tag
+ will be replaced in the callback URL with this job's job ID.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>id</strong></td>
+ <td>A string containing the job ID similar to "job_201110132141_0001".</td>
+ </tr>
+
+ <tr><td><strong>info</strong></td>
+ <td>A JSON object containing the information returned when the job was queued.
+ See the Hadoop documentation
+ (<a href="http://hadoop.apache.org/common/docs/stable/api/org/apache/hadoop/mapred/TaskController.html">Class
+ TaskController</a>) for more information.</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Code and Data Setup</strong></p>
+<source>
+% hadoop fs -put wordcount.jar .
+% hadoop fs -put transform.jar .
+
+% hadoop fs -ls .
+Found 2 items
+-rw-r--r-- 1 ctdean supergroup 23 2011-11-11 13:29 /user/ctdean/wordcount.jar
+-rw-r--r-- 1 ctdean supergroup 28 2011-11-11 13:29 /user/ctdean/transform.jar
+</source>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s -d user.name=ctdean \
+ -d jar=wordcount.jar \
+ -d class=org.myorg.WordCount \
+ -d libjars=transform.jar \
+ -d arg=wordcount/input \
+ -d arg=wordcount/output \
+ 'http://localhost:50111/templeton/v1/mapreduce/jar'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "id": "job_201111121211_0001",
+ "info": {
+ "stdout": "templeton-job-id:job_201111121211_0001
+ ",
+ "stderr": "",
+ "exitcode": 0
+ }
+}
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/mapreducestreaming.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/mapreducestreaming.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/mapreducestreaming.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/mapreducestreaming.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>POST mapreduce/streaming </title>
+ </header>
+
+ <body>
+
+ <section>
+ <title>Description</title>
+ <p>Create and queue an
+ <a href="http://hadoop.apache.org/common/docs/current/streaming.html">Hadoop
+ streaming MapReduce</a> job.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/mapreduce/streaming</code></p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>input</strong></td>
+ <td>Location of the input data in Hadoop.</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>output</strong></td>
+ <td>Location in which to store the output data. If not specified,
+ Templeton will store the output in a location that can be discovered
+ using the <a href="queue.html">queue</a> resource.</td>
+ <td>Optional</td>
+ <td>See description</td>
+ </tr>
+
+ <tr><td><strong>mapper</strong></td>
+ <td>Location of the mapper program in Hadoop.</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>reducer</strong></td>
+ <td>Location of the reducer program in Hadoop.</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>file</strong></td>
+ <td>Add an HDFS file to the distributed cache.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>define</strong></td>
+ <td>Set an Hadoop configuration variable using the syntax
+ <code>define=NAME=VALUE</code></td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>cmdenv</strong></td>
+ <td>Set an environment variable using the syntax
+ <code>cmdenv=NAME=VALUE</code></td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>arg</strong></td>
+ <td>Set a program argument.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>statusdir</strong></td>
+ <td>A directory where Templeton will write the status of the
+ Map Reduce job. If provided, it is the caller's responsibility
+ to remove this directory when done.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>callback</strong></td>
+ <td>Define a URL to be called upon job completion. You may embed a specific
+ job ID into this URL using <code>$jobId</code>. This tag
+ will be replaced in the callback URL with this job's job ID.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>id</strong></td>
+ <td>A string containing the job ID similar to "job_201110132141_0001".</td>
+ </tr>
+
+ <tr><td><strong>info</strong></td>
+ <td>A JSON object containing the information returned when the job was queued.
+ See the Hadoop documentation
+ (<a href="http://hadoop.apache.org/common/docs/stable/api/org/apache/hadoop/mapred/TaskController.html">Class
+ TaskController</a>) for more information.</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Code and Data Setup</strong></p>
+<source>
+% cat mydata/file01 mydata/file02
+Hello World Bye World
+Hello Hadoop Goodbye Hadoop
+
+% hadoop fs -put mydata/ .
+
+% hadoop fs -ls mydata
+Found 2 items
+-rw-r--r-- 1 ctdean supergroup 23 2011-11-11 13:29 /user/ctdean/mydata/file01
+-rw-r--r-- 1 ctdean supergroup 28 2011-11-11 13:29 /user/ctdean/mydata/file02
+</source>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s -d user.name=ctdean \
+ -d input=mydata \
+ -d output=mycounts \
+ -d mapper=/bin/cat \
+ -d reducer="/usr/bin/wc -w" \
+ 'http://localhost:50111/templeton/v1/mapreduce/streaming'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "id": "job_201111111311_0008",
+ "info": {
+ "stdout": "packageJobJar: [] [/Users/ctdean/var/hadoop/hadoop-0.20.205.0/share/hadoop/contrib/streaming/hadoop-streaming-0.20.205.0.jar...
+ templeton-job-id:job_201111111311_0008
+ ",
+ "stderr": "11/11/11 13:26:43 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments
+ 11/11/11 13:26:43 INFO mapred.FileInputFormat: Total input paths to process : 2
+ ",
+ "exitcode": 0
+ }
+}
+</source>
+
+ <p><strong>Results</strong></p>
+<source>
+% hadoop fs -ls mycounts
+Found 3 items
+-rw-r--r-- 1 ctdean supergroup 0 2011-11-11 13:27 /user/ctdean/mycounts/_SUCCESS
+drwxr-xr-x - ctdean supergroup 0 2011-11-11 13:26 /user/ctdean/mycounts/_logs
+-rw-r--r-- 1 ctdean supergroup 10 2011-11-11 13:27 /user/ctdean/mycounts/part-00000
+
+% hadoop fs -cat mycounts/part-00000
+ 8
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/pig.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/pig.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/pig.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/pig.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>POST pig </title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>Create and queue a <a href="http://pig.apache.org/">Pig</a> job.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/pig</code></p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>execute</strong></td>
+ <td>String containing an entire, short pig program to run.</td>
+ <td>One of either "execcute" or "file" is required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>file</strong></td>
+ <td>HDFS file name of a pig program to run.</td>
+ <td>One of either "exec" or "file" is required</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>arg</strong></td>
+ <td>Set a program argument.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>files</strong></td>
+ <td>Comma separated files to be copied to the map reduce cluster</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>statusdir</strong></td>
+ <td>A directory where Templeton will write the status of the
+ Pig job. If provided, it is the caller's responsibility
+ to remove this directory when done.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ <tr><td><strong>callback</strong></td>
+ <td>Define a URL to be called upon job completion. You may embed a specific
+ job ID into this URL using <code>$jobId</code>. This tag
+ will be replaced in the callback URL with this job's job ID.</td>
+ <td>Optional</td>
+ <td>None</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+
+ <tr><td><strong>id</strong></td>
+ <td>A string containing the job ID similar to "job_201110132141_0001".</td>
+ </tr>
+
+ <tr><td><strong>info</strong></td>
+ <td>A JSON object containing the information returned when the job was queued.
+ See the Hadoop documentation
+ (<a href="http://hadoop.apache.org/common/docs/stable/api/org/apache/hadoop/mapred/TaskController.html">Class
+ TaskController</a>) for more information.</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Code and Data Setup</strong></p>
+<source>
+% cat id.pig
+A = load 'passwd' using PigStorage(':');
+B = foreach A generate $0 as id;
+dump B;
+
+% cat fake-passwd
+ctdean:Chris Dean:secret
+pauls:Paul Stolorz:good
+carmas:Carlos Armas:evil
+dra:Deirdre McClure:marvelous
+
+% hadoop fs -put id.pig .
+% hadoop fs -put fake-passwd passwd
+</source>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s -d user.name=ctdean \
+ -d file=id.pig \
+ -d arg=-v \
+ 'http://localhost:50111/templeton/v1/pig'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "id": "job_201111101627_0018",
+ "info": {
+ "stdout": "templeton-job-id:job_201111101627_0018
+ ",
+ "stderr": "",
+ "exitcode": 0
+ }
+}
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/queue.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/queue.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/queue.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/queue.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>GET queue/:jobid </title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>Check the status of a job and get related job information given its job ID.
+ Substitute ":jobid" with the job ID received when the job was created.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/queue/</code>:jobid<code></code></p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:jobid</strong></td>
+ <td>The job ID to check. This is the ID received when the
+ job was created.</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+ <tr><td><strong>status</strong></td>
+ <td>A JSON object containing the job status information.
+ See the Hadoop documentation
+ (<a href="http://hadoop.apache.org/common/docs/stable/api/org/apache/hadoop/mapred/JobStatus.html">Class
+ JobStatus</a>) for more information.</td>
+ </tr>
+
+ <tr><td><strong>profile</strong></td>
+ <td>A JSON object containing the job profile information.
+ See the Hadoop documentation
+ (<a href="http://hadoop.apache.org/common/docs/stable/api/org/apache/hadoop/mapred/JobProfile.html">Class
+ JobProfile</a>) for more information.
+</td>
+ </tr>
+
+ <tr><td><strong>id</strong></td>
+ <td>The job ID.</td>
+ </tr>
+
+ <tr><td><strong>parentId</strong></td>
+ <td>The parent job ID.</td>
+ </tr>
+
+ <tr><td><strong>percentComplete</strong></td>
+ <td>The job completion percentage, for example "75% complete".</td>
+ </tr>
+
+ <tr><td><strong>exitValue</strong></td>
+ <td>The job's exit value.</td>
+ </tr>
+
+ <tr><td><strong>user</strong></td>
+ <td>User name of the job creator.</td>
+ </tr>
+
+ <tr><td><strong>callback</strong></td>
+ <td>The callback URL, if any.</td>
+ </tr>
+
+ <tr><td><strong>completed</strong></td>
+ <td>A string representing completed status, for example "done".</td>
+ </tr>
+
+ </table>
+ </section>
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s 'http://localhost:50111/templeton/v1/queue/job_201112212038_0003?user.name=ctdean'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "status": {
+ "startTime": 1324529476131,
+ "username": "ctdean",
+ "jobID": {
+ "jtIdentifier": "201112212038",
+ "id": 4
+ },
+ "jobACLs": {
+ },
+ "schedulingInfo": "NA",
+ "failureInfo": "NA",
+ "jobId": "job_201112212038_0004",
+ "jobPriority": "NORMAL",
+ "runState": 2,
+ "jobComplete": true
+ },
+ "profile": {
+ "url": "http://localhost:50030/jobdetails.jsp?jobid=job_201112212038_0004",
+ "jobID": {
+ "jtIdentifier": "201112212038",
+ "id": 4
+ },
+ "user": "ctdean",
+ "queueName": "default",
+ "jobFile": "hdfs://localhost:9000/tmp/hadoop-ctdean/mapred/staging/ctdean/.staging/job_201112212038_0004/job.xml",
+ "jobName": "PigLatin:DefaultJobName",
+ "jobId": "job_201112212038_0004"
+ },
+ "id": "job_201112212038_0004",
+ "parentId": "job_201112212038_0003",
+ "percentComplete": "100% complete",
+ "exitValue": 0,
+ "user": "ctdean",
+ "callback": null,
+ "completed": "done"
+}
+</source>
+ </section>
+ </body>
+</document>
Added: incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/queuedelete.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/queuedelete.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/queuedelete.xml (added)
+++ incubator/hcatalog/trunk/src/docs/src/documentation/content/xdocs/queuedelete.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+ <header>
+ <title>DELETE queue/:jobid </title>
+ </header>
+
+ <body>
+ <section>
+ <title>Description</title>
+ <p>Kill a job given its job ID.
+ Substitute ":jobid" with the job ID received when the job was created.</p>
+ </section>
+
+ <section>
+ <title>URL</title>
+ <p><code>http://</code>www.myserver.com<code>/templeton/v1/queue/</code>:jobid<code></code></p>
+ </section>
+
+ <section>
+ <title>Parameters</title>
+ <table>
+ <tr><th>Name</th><th>Description</th><th>Required?</th><th>Default</th></tr>
+
+ <tr><td><strong>:jobid</strong></td>
+ <td>The job ID to delete. This is the ID received when the job
+ job was created.</td>
+ <td>Required</td>
+ <td>None</td>
+ </tr>
+ </table>
+ </section>
+
+ <section>
+ <title>Results</title>
+ <table>
+ <tr><th>Name</th><th>Description</th></tr>
+ <tr><td><strong>status</strong></td>
+ <td>A JSON object containing the job status information.
+ See the Hadoop documentation
+ (<a href="http://hadoop.apache.org/common/docs/stable/api/org/apache/hadoop/mapred/JobStatus.html">Class
+ JobStatus</a>) for more information.</td>
+ </tr>
+
+ <tr><td><strong>profile</strong></td>
+ <td>A JSON object containing the job profile information.
+ See the Hadoop documentation
+ (<a href="http://hadoop.apache.org/common/docs/stable/api/org/apache/hadoop/mapred/JobProfile.html">Class
+ JobProfile</a>) for more information.
+</td>
+ </tr>
+
+ <tr><td><strong>id</strong></td>
+ <td>The job ID.</td>
+ </tr>
+
+ <tr><td><strong>parentId</strong></td>
+ <td>The parent job ID.</td>
+ </tr>
+
+ <tr><td><strong>percentComplete</strong></td>
+ <td>The job completion percentage, for example "75% complete".</td>
+ </tr>
+
+ <tr><td><strong>exitValue</strong></td>
+ <td>The job's exit value.</td>
+ </tr>
+
+ <tr><td><strong>user</strong></td>
+ <td>User name of the job creator.</td>
+ </tr>
+
+ <tr><td><strong>callback</strong></td>
+ <td>The callback URL, if any.</td>
+ </tr>
+
+ <tr><td><strong>completed</strong></td>
+ <td>A string representing completed status, for example "done".</td>
+ </tr>
+
+ </table>
+ </section>
+
+
+ <section>
+ <title>Example</title>
+
+ <p><strong>Curl Command</strong></p>
+<source>
+% curl -s -X DELETE 'http://localhost:50111/templeton/v1/queue/job_201111111311_0009?user.name=ctdean'
+</source>
+
+ <p><strong>JSON Output</strong></p>
+<source>
+{
+ "status": {
+ "startTime": 1321047216471,
+ "username": "ctdean",
+ "jobID": {
+ "jtIdentifier": "201111111311",
+ "id": 9
+ },
+ "jobACLs": {
+ },
+ "schedulingInfo": "NA",
+ "failureInfo": "NA",
+ "jobId": "job_201111111311_0009",
+ "jobPriority": "NORMAL",
+ "runState": 1,
+ "jobComplete": false
+ },
+ "profile": {
+ "url": "http://localhost:50030/jobdetails.jsp?jobid=job_201111111311_0009",
+ "user": "ctdean",
+ "jobID": {
+ "jtIdentifier": "201111111311",
+ "id": 9
+ },
+ "queueName": "default",
+ "jobFile": "hdfs://localhost:9000/tmp/hadoop-ctdean/mapred/staging/ctdean/.staging/job_201111111311_0009/job.xml",
+ "jobName": "streamjob3322518350676530377.jar",
+ "jobId": "job_201111111311_0009"
+ }
+ "id": "job_201111111311_0009",
+ "parentId": "job_201111111311_0008",
+ "percentComplete": "10% complete",
+ "exitValue": 0,
+ "user": "ctdean",
+ "callback": null,
+ "completed": "false"
+}
+</source>
+<p><strong>Note:</strong> The job is not immediately deleted, therefore the
+ information returned may not reflect deletion, as in our example.
+ Use <a href="queue.html"><code>GET queue/:jobid</code></a>
+ to monitor the job and confirm that it is eventually deleted.</p>
+ </section>
+ </body>
+</document>