incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1365722 [6/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...
Date Wed, 25 Jul 2012 20:29:49 GMT
Added: incubator/hcatalog/trunk/src/test/e2e/templeton/tests/hcatperms.conf
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/test/e2e/templeton/tests/hcatperms.conf?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/test/e2e/templeton/tests/hcatperms.conf (added)
+++ incubator/hcatalog/trunk/src/test/e2e/templeton/tests/hcatperms.conf Wed Jul 25 20:29:44 2012
@@ -0,0 +1,1478 @@
+###############################################################################
+# curl command tests for templeton
+#
+#
+
+#use Yahoo::Miners::Test::PigSetup;
+
+#PigSetup::setup();
+
+#my $me = `whoami`;
+#chomp $me;
+
+$cfg = 
+{
+ 'driver' => 'Curl',
+
+ 'groups' => 
+ [
+
+##=============================================================================================================
+  {
+   'name' => 'DB_OPS',
+   'tests' => 
+   [
+    {
+     #check if db created by UNAME_OTHER is visible for user UNAME
+     'num' => 1,
+
+     'setup' => [
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_a',
+                  'user_name' => ':UNAME_OTHER:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{"comment":"Hello there", "properties":{"a":"b"}}'],
+                 }
+                ],
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/',
+     'user_name' => ':UNAME:',
+
+     'format_header' => 'Content-Type: application/json',
+     'json_field_substr_match' => {'databases' => 'hcatperms_a'},
+
+     'status_code' => 200,
+    },
+
+
+    {
+
+     #check if group id is set as per spec
+     'num' => 2,
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_b',
+                  'user_name' => ':UNAME:',
+                 },
+                 {
+                  'method' => 'PUT',
+                  'post_options' => [
+                               '{"permissions" : "rwxrwxrwx", 
+                                  "group" : ":UGROUP:"
+                                }'
+                                            ],
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_b',
+                  'user_name' => ':UNAME:',
+                 },
+
+                ],
+
+
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_b',
+     'user_name' => ':UNAME:',
+     'format_header' => 'Content-Type: application/json',
+     'json_field_substr_match' => {'location_perms' => 'rwxrwxrwx', 'location_group' => ':UGROUP:'},
+     'status_code' => 200,
+    },
+    {
+
+     #check if group id is set as per spec
+     'num' => 3,
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_c',
+                  'user_name' => ':UNAME:',
+                 },
+                 {
+                  'method' => 'PUT',
+                  'post_options' => [
+                               '{"permissions" : "rwxr-x---", 
+                                  "group" : ":UGROUP:"
+                                }'
+                                    ],
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_c',
+                  'user_name' => ':UNAME:',
+                 },
+
+                ],
+
+
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_c',
+     'user_name' => ':UNAME:',
+     'format_header' => 'Content-Type: application/json',
+     'json_field_substr_match' => {'location_perms' => 'rwxr-x---', 'location_group' => ':UGROUP:'},
+     'status_code' => 200,
+    },
+
+    {
+
+     #check if user belonging to same group is able to access
+     'num' => 4,
+
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_d',
+                  'user_name' => ':UNAME:',
+                 },
+
+                 {
+                  'method' => 'PUT',
+                  'post_options' => [
+                                     '{
+                                     "permissions" : "rwxr-x---", 
+                                     "group" : ":UGROUP:"
+                                      }'
+                                    ],
+               
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_d',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                 }
+                ],
+
+
+
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_d',
+     'user_name' => ':UNAME_GROUP:',
+     'format_header' => 'Content-Type: application/json',
+     'json_field_substr_match' => {'location_perms' => 'rwxr-x---', 'location_group' => ':UGROUP:'},
+     'status_code' => 200,
+    },
+
+    {
+
+     #check default db permissions 
+     #the default group is currently the group of parent dir
+
+     'num' => 5,
+
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_e',
+                  'user_name' => ':UNAME:',
+                 },
+
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_e',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{}']
+
+                 }
+                ],
+
+
+
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_e',
+     'user_name' => ':UNAME:',
+     'format_header' => 'Content-Type: application/json',
+     'json_field_substr_match' => {'location_perms' => 'rwx------'},
+     'status_code' => 200,
+    },
+
+    {
+
+     #check if user can delete db
+     'num' => 6,
+
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_f',
+                  'user_name' => ':UNAME:',
+                 },
+
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_f',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{}']
+
+                 }
+                ],
+
+
+
+     'method' => 'DELETE',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_f',
+     'user_name' => ':UNAME:',
+     'format_header' => 'Content-Type: application/json',
+     'status_code' => 200,
+    },
+
+    {
+
+     #check if user belonging to group can delete table 
+     'num' => 7,
+
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                 },
+
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwxrwx---", "group" : ":UGROUP:" }']
+
+                 }
+                ],
+
+
+
+     'method' => 'DELETE',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+     'user_name' => ':UNAME_GROUP:',
+     'format_header' => 'Content-Type: application/json',
+     'status_code' => 200,
+    },
+    {
+
+     #check if user belonging to group is unable to delete table  
+     'num' => 8,
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                 },
+
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwx------", "group" : ":UGROUP:" }']
+
+                 }
+                ],
+
+
+     'method' => 'DELETE',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+     'user_name' => ':UNAME_GROUP:',
+     'format_header' => 'Content-Type: application/json',
+     'status_code' => 500,
+    },
+
+    {
+
+     #check if user belonging to 'other' is unable to delete table  
+     'num' => 10,
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                 },
+
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwx------", "group" : ":UGROUP:" }']
+
+                 }
+                ],
+
+
+     'method' => 'DELETE',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+     'user_name' => ':UNAME_OTHER:',
+     'format_header' => 'Content-Type: application/json',
+     'status_code' => 500,
+    },
+
+
+    {
+
+     #check if user is able to create table
+     'num' => 11,
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:?ifExists=true&option=cascade',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwx------" }']
+
+                 },
+
+                ],
+
+
+      'method' => 'PUT',
+      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:/table/permstable_:TNUM:',
+      'format_header' => 'Content-Type: application/json', 
+      'post_options' => ['{
+              "columns": [
+                      { "name" : "i", "type" : "int" },
+                      { "name" : "j", "type" : "bigint", "comment" : "some comment" }
+              ], 
+  	          "format" : {  "storedAs" : "rcfile"} 
+          }'],
+      'user_name' => ':UNAME:',
+      'status_code' => 200,
+
+    },
+
+    {
+
+     #check if group user is able to create table
+     'num' => 12,
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:?ifExists=true&option=cascade',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwxrwx---" , "group" : ":UGROUP:"} ']
+
+                 },
+
+                ],
+
+
+      'method' => 'PUT',
+      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:/table/permstable_:TNUM:',
+      'format_header' => 'Content-Type: application/json', 
+      'post_options' => ['{
+              "columns": [
+                      { "name" : "i", "type" : "int" },
+                      { "name" : "j", "type" : "bigint", "comment" : "some comment" }
+              ], 
+  	          "format" : {  "storedAs" : "rcfile"} 
+          }'],
+      'user_name' => ':UNAME_GROUP:',
+      'status_code' => 200,
+
+    },
+
+    {
+
+     #check if group user is unable to create table without permissions
+     'num' => 13,
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:?ifExists=true&option=cascade',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwx------", "group" : ":UGROUP:" }']
+
+                 },
+
+                ],
+
+     
+      'method' => 'PUT',
+      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:/table/permstable_:TNUM:',
+      'format_header' => 'Content-Type: application/json', 
+      'post_options' => ['{
+              "columns": [
+                      { "name" : "i", "type" : "int" },
+                      { "name" : "j", "type" : "bigint", "comment" : "some comment" }
+              ], 
+  	          "format" : {  "storedAs" : "rcfile"} 
+          }'],
+      'user_name' => ':UNAME_GROUP:',
+      'status_code' => 500,
+
+    },
+
+    {
+
+     #check if other user is unable to create table without permissions
+     'num' => 14,
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:?ifExists=true&option=cascade',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwxrwx---", "group" : ":UGROUP:" }'],
+                  'status_code' => 200,
+                 },
+
+                ],
+
+     
+      'method' => 'PUT',
+      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:/table/permstable_:TNUM:',
+      'format_header' => 'Content-Type: application/json', 
+      'post_options' => ['{
+              "columns": [
+                      { "name" : "i", "type" : "int" },
+                      { "name" : "j", "type" : "bigint", "comment" : "some comment" }
+              ], 
+  	          "format" : {  "storedAs" : "rcfile"} 
+          }'],
+      'user_name' => ':UNAME_OTHER:',
+      'status_code' => 500,
+
+    },
+
+    {
+
+     #show table allowed for user
+     'num' => 15,
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:?ifExists=true&option=cascade',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwxrwx---", "group" : ":UGROUP:" }'],
+                  'status_code' => 200,
+                 },
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{
+              "columns": [
+                      { "name" : "i", "type" : "int" }
+              ], 
+  	          "format" : {  "storedAs" : "rcfile"} 
+          }'],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     
+      'method' => 'GET',
+      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:/table/',
+      'format_header' => 'Content-Type: application/json', 
+      'user_name' => ':UNAME:',
+      'status_code' => 200,
+     'json_field_substr_match' => {'tables' => 'permstable_:TNUM:'},
+
+
+    },
+
+
+    {
+
+     #show table allowed for group
+     'num' => 16,
+     'setup' => [
+                 {
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:?ifExists=true&option=cascade',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwxrwx---", "group" : ":UGROUP:" }'],
+                  'status_code' => 200,
+                 },
+                 {
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{
+              "columns": [
+                      { "name" : "i", "type" : "int" }
+              ], 
+  	          "format" : {  "storedAs" : "rcfile"} 
+          }'],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     
+      'method' => 'GET',
+      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:/table/',
+      'format_header' => 'Content-Type: application/json', 
+      'user_name' => ':UNAME_GROUP:',
+      'status_code' => 200,
+     'json_field_substr_match' => {'tables' => 'permstable_:TNUM:'},
+
+
+    },
+
+    {
+
+     #show table not allowed for group user without permissions
+     'num' => 17,
+     'setup' => [
+                 { #drop db cascade
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:?ifExists=true&option=cascade',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+
+                 {
+                  #create db
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwx------", "group" : ":UGROUP:" }'],
+                  'status_code' => 200,
+                 },
+                 {
+                  #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{
+              "columns": [
+                      { "name" : "i", "type" : "int" }
+              ], 
+  	          "format" : {  "storedAs" : "rcfile"} 
+          }'],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     
+      'method' => 'GET',
+      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:/table/',
+      'format_header' => 'Content-Type: application/json', 
+      'user_name' => ':UNAME_GROUP:',
+      'status_code' => 500,
+
+
+    },
+
+    {
+     #show table not allowed for other  user without permissions
+     'num' => 18,
+     'setup' => [
+                 { #drop db cascade
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:?ifExists=true&option=cascade',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+
+                 {
+                  #create db
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwx------", "group" : ":UGROUP:" }'],
+                  'status_code' => 200,
+                 },
+                 {
+                  #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{
+              "columns": [
+                      { "name" : "i", "type" : "int" }
+              ], 
+  	          "format" : {  "storedAs" : "rcfile"} 
+          }'],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     
+      'method' => 'GET',
+      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:/table/',
+      'format_header' => 'Content-Type: application/json', 
+      'user_name' => ':UNAME_OTHER:',
+      'status_code' => 500,
+     'json_field_substr_match' => {'error' => 'unable to show tables'},
+
+
+    },
+
+
+    {
+
+     #describe db - by user
+     'num' => 19,
+     'setup' => [
+                 { #drop db cascade
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:?ifExists=true&option=cascade',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+
+                 {
+                  #create db
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwxrwx---" }'],
+                  'status_code' => 200,
+                 },
+
+                ],
+
+     
+      'method' => 'GET',
+      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+      'format_header' => 'Content-Type: application/json', 
+      'user_name' => ':UNAME:',
+      'status_code' => 200,
+     'json_field_substr_match' => {'database' => 'hcatperms_:TNUM:', 
+                                   'location' => 'hcatperms_:TNUM:'},
+
+
+    },
+
+    {
+
+     #describe db - by group user
+     'num' => 20,
+     'setup' => [
+                 { #drop db cascade
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:?ifExists=true&option=cascade',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+
+                 {
+                  #create db
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwxrwx---", "group" : ":UGROUP:" }'],
+                  'status_code' => 200,
+                 },
+
+                ],
+
+     
+      'method' => 'GET',
+      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+      'format_header' => 'Content-Type: application/json', 
+      'user_name' => ':UNAME_GROUP:',
+      'status_code' => 200,
+     'json_field_substr_match' => {'database' => 'hcatperms_:TNUM:', 
+                                   'location' => 'hcatperms_:TNUM:'},
+
+
+    },
+
+    {
+
+     #describe db - by group user without permissions
+     'num' => 21,
+     'setup' => [
+                 { #drop db cascade
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:?ifExists=true&option=cascade',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+
+                 {
+                  #create db
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwx------", "group" : ":UGROUP:" }'],
+                  'status_code' => 200,
+                 },
+
+                ],
+
+     
+      'method' => 'GET',
+      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+      'format_header' => 'Content-Type: application/json', 
+      'user_name' => ':UNAME_GROUP:',
+      'status_code' => 500,
+
+    },
+
+    {
+
+     #describe db - by other user without permissions
+     'num' => 22,
+     'setup' => [
+                 { #drop db cascade
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:?ifExists=true&option=cascade',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+
+                 {
+                  #create db
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+                  'user_name' => ':UNAME:',
+                  'format_header' => 'Content-Type: application/json',
+                  'post_options' => ['{ "permissions" : "rwx------", "group" : ":UGROUP:" }'],
+                  'status_code' => 200,
+                 },
+
+                ],
+
+     
+      'method' => 'GET',
+      'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/hcatperms_:TNUM:',
+      'format_header' => 'Content-Type: application/json', 
+      'user_name' => ':UNAME_OTHER:',
+      'status_code' => 500,
+
+    },
+
+   ]
+  },
+
+##=============================================================================================================
+
+  {
+   'name' => 'TABLE_OPS',
+   'tests' => 
+   [
+    {
+     #test if the permissions and group for table are set correctly 
+     'num' => 1,
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],"format" : {  "storedAs" : "rcfile"},
+                          "permissions" : "rwxr-xr-x", "group" : ":UGROUP:" }'],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?format=extended',
+     'format_header' => 'Content-Type: application/json', 
+     'user_name' => ':UNAME:',
+     'status_code' => 200,
+     'json_field_substr_match' => {'location_perms' => 'rwxr-xr-x', 'location_group' => ':UGROUP:'},
+
+    },
+
+    {
+     #check default permissions 
+     #the default group is currently the group of parent dir
+     'num' => 2,
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],"format" : {  "storedAs" : "rcfile"} }'],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?format=extended',
+     'format_header' => 'Content-Type: application/json', 
+     'user_name' => ':UNAME:',
+     'status_code' => 200,
+     'json_field_substr_match' => {'location_perms' => 'rwx------', 'location_owner' => ':UNAME:'},
+
+    },
+
+    {
+     #alter table permissions for user
+     'num' => 3,
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],"format" : {  "storedAs" : "rcfile"} }'],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     #alter table add column j
+     'method' => 'PUT',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:/column/j',
+     'format_header' => 'Content-Type: application/json', 
+     'post_options' => ['{"type": "string", "comment": "The 2nd col"}'],
+     'user_name' => ':UNAME:',
+     'status_code' => 200,
+    },
+
+    {
+     #alter table for group user - with permissions
+     'num' => 4,
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],
+                          "format" : {  "storedAs" : "rcfile"}, 
+                          "permissions" : "rwxrwxr-x", "group" : ":UGROUP:" }' ],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     #alter table add column j
+     'method' => 'PUT',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:/column/j',
+     'format_header' => 'Content-Type: application/json', 
+     'post_options' => ['{"type": "string", "comment": "The 2nd col"}'],
+     'user_name' => ':UNAME_GROUP:',
+     'status_code' => 200,
+    },
+
+    {
+     #alter table for group user -without permissions
+     'num' => 5,
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],
+                          "format" : {  "storedAs" : "rcfile"}, 
+                          "permissions" : "rwxr-xr-x", "group" : ":UGROUP:" }' ],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     #alter table add column j
+     'method' => 'PUT',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:/column/j',
+     'format_header' => 'Content-Type: application/json', 
+     'post_options' => ['{"type": "string", "comment": "The 2nd col"}'],
+     'user_name' => ':UNAME_GROUP:',
+     'status_code' => 500,
+    },
+
+    {
+     #alter table for other user -without permissions
+     'num' => 6,
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],
+                          "format" : {  "storedAs" : "rcfile"}, 
+                          "permissions" : "rwxr-xr-x", "group" : ":UGROUP:" }' ],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     #alter table add column j
+     'method' => 'PUT',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:/column/j',
+     'format_header' => 'Content-Type: application/json', 
+     'post_options' => ['{"type": "string", "comment": "The 2nd col"}'],
+     'user_name' => ':UNAME_OTHER:',
+     'status_code' => 500,
+    },
+
+    {
+     #drop table by user
+     'num' => 7,
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],
+                          "format" : {  "storedAs" : "rcfile"}, 
+                          "permissions" : "rwxr-xr-x", "group" : ":UGROUP:" }' ],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+                   #drop table
+     'method' => 'DELETE',
+     'format_header' => 'Content-Type: application/json',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+     'user_name' => ':UNAME:',
+     'status_code' => 200,
+    },
+
+    {
+     #drop table by group user with permissions
+     'num' => 8,
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],
+                          "format" : {  "storedAs" : "rcfile"}, 
+                          "permissions" : "rwxrwx---", "group" : ":UGROUP:" }' ],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+                   #drop table
+     'method' => 'DELETE',
+     'format_header' => 'Content-Type: application/json',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+     'user_name' => ':UNAME_GROUP:',
+     'status_code' => 200,
+    },
+
+    {
+     #drop table by group user without permissions
+     'num' => 9,
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],
+                          "format" : {  "storedAs" : "rcfile"}, 
+                          "permissions" : "rwx------", "group" : ":UGROUP:" }' ],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+                   #drop table
+     'method' => 'DELETE',
+     'format_header' => 'Content-Type: application/json',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+     'user_name' => ':UNAME_GROUP:',
+     'status_code' => 500,
+    },
+
+    {
+     #drop table by other user without permissions
+     'num' => 10,
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],
+                          "format" : {  "storedAs" : "rcfile"}, 
+                          "permissions" : "rwx------", "group" : ":UGROUP:" }' ],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+                   #drop table
+     'method' => 'DELETE',
+     'format_header' => 'Content-Type: application/json',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+     'user_name' => ':UNAME_OTHER:',
+     'status_code' => 500,
+    },
+
+
+    {
+     #show table allowed for user
+     'num' => 11,
+     'setup' => [
+                  {
+                   'method' => 'DELETE',
+                   'format_header' => 'Content-Type: application/json',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:?ifExists=true&option=cascade',
+                   'user_name' => ':UNAME:',
+                   'status_code' => 200,
+                  },
+
+                  {
+                   'method' => 'PUT',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:',
+                   'user_name' => ':UNAME:',
+                   'format_header' => 'Content-Type: application/json',
+                   'post_options' => ['{ "permissions" : "rwxrwx---" }'],
+                   'status_code' => 200,
+                  },
+                  {
+                   'method' => 'PUT',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:/table/permstable_:TNUM:',
+                   'format_header' => 'Content-Type: application/json', 
+                   'post_options' => ['{
+              "columns": [
+                      { "name" : "i", "type" : "int" }
+              ], 
+  	          "format" : {  "storedAs" : "rcfile"} 
+          }'],
+                   'user_name' => ':UNAME:',
+                   'status_code' => 200,
+                  }
+
+                 ],
+
+     
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:/table/',
+     'format_header' => 'Content-Type: application/json', 
+     'user_name' => ':UNAME:',
+     'status_code' => 200,
+     'json_field_substr_match' => {'tables' => 'permstable_:TNUM:'},
+
+    },
+
+    {
+     #show table allowed for group  user with permissions
+     'num' => 12,
+     'setup' => [
+                  {
+                   'method' => 'DELETE',
+                   'format_header' => 'Content-Type: application/json',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:?ifExists=true&option=cascade',
+                   'user_name' => ':UNAME:',
+                   'status_code' => 200,
+                  },
+
+                  {
+                   'method' => 'PUT',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:',
+                   'user_name' => ':UNAME:',
+                   'format_header' => 'Content-Type: application/json',
+                   'post_options' => ['{ "permissions" : "rwxrwx---",  "group" : ":UGROUP:" }'],
+                   'status_code' => 200,
+                  },
+                  {
+                   'method' => 'PUT',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:/table/permstable_:TNUM:',
+                   'format_header' => 'Content-Type: application/json', 
+                   'post_options' => ['{
+                        "columns": [ { "name" : "i", "type" : "int" }], "permissions" : "rwxrwx---", "group" : ":UGROUP:" }
+  	                  "format" : {  "storedAs" : "rcfile"} 
+                    }'],
+                   'user_name' => ':UNAME:',
+                   'status_code' => 200,
+                  }
+
+                 ],
+
+     
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:/table/',
+     'format_header' => 'Content-Type: application/json', 
+     'user_name' => ':UNAME_GROUP:',
+     'status_code' => 200,
+     'json_field_substr_match' => {'tables' => 'permstable_:TNUM:'},
+
+    },
+
+    {
+     #show table not allowed for group user without permissions
+     'num' => 13,
+     'ignore' => 'HIVE-3009',
+     'setup' => [
+                  {
+                   'method' => 'DELETE',
+                   'format_header' => 'Content-Type: application/json',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:?ifExists=true&option=cascade',
+                   'user_name' => ':UNAME:',
+                   'status_code' => 200,
+                  },
+
+                  {
+                   'method' => 'PUT',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:',
+                   'user_name' => ':UNAME:',
+                   'format_header' => 'Content-Type: application/json',
+                   'post_options' => ['{ "permissions" : "rwxrwx---" }'],
+                   'status_code' => 200,
+                  },
+                  {
+                   'method' => 'PUT',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:/table/permstable_:TNUM:',
+                   'format_header' => 'Content-Type: application/json', 
+                   'post_options' => ['{
+                        "columns": [ { "name" : "i", "type" : "int" }], "permissions" : "rwx------", "group" : ":UGROUP:" }
+  	                  "format" : {  "storedAs" : "rcfile"} 
+                    }'],
+                   'user_name' => ':UNAME:',
+                   'status_code' => 200,
+                  }
+
+                 ],
+
+     
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:/table/',
+     'format_header' => 'Content-Type: application/json', 
+     'user_name' => ':UNAME_GROUP:',
+     'status_code' => 500,
+     'json_field_substr_match' => {'error' => 'unable to show tables'},
+
+    },
+
+    {
+     #show table not allowed for other user without permissions
+     'num' => 14,
+     'ignore' => 'HIVE-3009',
+     'setup' => [
+                  {
+                   'method' => 'DELETE',
+                   'format_header' => 'Content-Type: application/json',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:?ifExists=true&option=cascade',
+                   'user_name' => ':UNAME:',
+                   'status_code' => 200,
+                  },
+
+                  {
+                   'method' => 'PUT',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:',
+                   'user_name' => ':UNAME:',
+                   'format_header' => 'Content-Type: application/json',
+                   'post_options' => ['{ "permissions" : "rwxrwxrwx" }'],
+                   'status_code' => 200,
+                  },
+                  {
+                   'method' => 'PUT',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:/table/permstable_:TNUM:',
+                   'format_header' => 'Content-Type: application/json', 
+                   'post_options' => ['{
+                        "columns": [ { "name" : "i", "type" : "int" }], "permissions" : "rwx------", "group" : ":UGROUP:" }
+  	                  "format" : {  "storedAs" : "rcfile"} 
+                    }'],
+                   'user_name' => ':UNAME:',
+                   'status_code' => 200,
+                  }
+
+                 ],
+
+     
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:/table/',
+     'format_header' => 'Content-Type: application/json', 
+     'user_name' => ':UNAME_OTHER:',
+     'status_code' => 500,
+     'json_field_substr_match' => {'error' => 'unable to show tables'},
+
+    },
+
+    {
+     #show table not allowed for other user without permissions
+     'num' => 15,
+     'ignore' => 'see HIVE-3009',
+     'setup' => [
+                  {
+                   'method' => 'DELETE',
+                   'format_header' => 'Content-Type: application/json',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:?ifExists=true&option=cascade',
+                   'user_name' => ':UNAME:',
+                   'status_code' => 200,
+                  },
+
+                  {
+                   'method' => 'PUT',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:',
+                   'user_name' => ':UNAME:',
+                   'format_header' => 'Content-Type: application/json',
+                   'post_options' => ['{ "permissions" : "rwxrwxrwx" }'],
+                   'status_code' => 200,
+                  },
+                  {
+                   'method' => 'PUT',
+                   'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:/table/permstable_:TNUM:',
+                   'format_header' => 'Content-Type: application/json', 
+                   'post_options' => ['{
+                        "columns": [ { "name" : "i", "type" : "int" }], "permissions" : "rwx------", "group" : ":UGROUP:" }
+  	                  "format" : {  "storedAs" : "rcfile"} 
+                    }'],
+                   'user_name' => ':UNAME:',
+                   'status_code' => 200,
+                  }
+
+                 ],
+
+     
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/tabpermsdb:TNUM:/table/',
+     'format_header' => 'Content-Type: application/json', 
+     'user_name' => ':UNAME_OTHER:',
+     'status_code' => 500,
+     'json_field_substr_match' => {'error' => 'unable to show tables'},
+
+    },
+
+    {
+     #describe table test for user done as part of permissions check test
+     #describe table by group user
+     'num' => 16,
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],"format" : {  "storedAs" : "rcfile"},
+                          "permissions" : "rwxr-x---", "group" : ":UGROUP:" }'],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?format=extended',
+     'format_header' => 'Content-Type: application/json', 
+     'user_name' => ':UNAME_GROUP:',
+     'status_code' => 200,
+     'json_field_substr_match' => {'location_perms' => 'rwxr-x---', 'location_group' => ':UGROUP:'},
+
+    },
+
+    {
+     #describe extended, table by group user without permission
+     'num' => 17,
+     'ignore' => 'see HIVE-3009',
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],"format" : {  "storedAs" : "rcfile"},
+                          "permissions" : "rwx------", "group" : ":UGROUP:" }'],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?format=extended',
+     'format_header' => 'Content-Type: application/json', 
+     'user_name' => ':UNAME_GROUP:',
+     'status_code' => 500,
+
+    },
+
+    {
+     #describe extended, table by other user without permission
+     'num' => 18,
+     'ignore' => 'see HIVE-3009',
+     'setup' => [
+                 {              #drop table
+                  'method' => 'DELETE',
+                  'format_header' => 'Content-Type: application/json',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?ifExists=true',
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 },
+                 {              #create table
+                  'method' => 'PUT',
+                  'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:',
+                  'format_header' => 'Content-Type: application/json', 
+                  'post_options' => ['{ "columns": [ { "name" : "i", "type" : "int" } ],"format" : {  "storedAs" : "rcfile"},
+                          "permissions" : "rwx------", "group" : ":UGROUP:" }'],
+                  'user_name' => ':UNAME:',
+                  'status_code' => 200,
+                 }
+
+                ],
+
+     
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/ddl/database/default/table/permstable_:TNUM:?format=extended',
+     'format_header' => 'Content-Type: application/json', 
+     'user_name' => ':UNAME_OTHER:',
+     'status_code' => 500,
+
+    },
+
+
+
+   ] }
+
+
+ ]
+},
+  ;
+

Added: incubator/hcatalog/trunk/src/test/e2e/templeton/tests/jobsubmission.conf
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/test/e2e/templeton/tests/jobsubmission.conf?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/test/e2e/templeton/tests/jobsubmission.conf (added)
+++ incubator/hcatalog/trunk/src/test/e2e/templeton/tests/jobsubmission.conf Wed Jul 25 20:29:44 2012
@@ -0,0 +1,359 @@
+###############################################################################
+# curl command tests for templeton
+#
+#
+
+#use Yahoo::Miners::Test::PigSetup;
+
+#PigSetup::setup();
+
+#my $me = `whoami`;
+#chomp $me;
+
+$cfg = 
+{
+ 'driver' => 'Curl',
+
+ 'groups' => 
+ [
+##=============================================================================================================
+  {
+   'name' => 'TestStreaming',
+   'tests' => 
+   [
+    {
+     'num' => 1,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/mapreduce/streaming',
+     'post_options' => ['user.name=:UNAME:','input=:INPDIR_HDFS:/nums.txt','output=:OUTDIR:/mycounts', 
+                        'mapper=/bin/cat', 'reducer=/usr/bin/wc'],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS',
+     'check_call_back' => 1,
+    },
+    {
+     #-ve test - no input file
+     'num' => 2,
+     'ignore' => 'wait for fix in hadoop 1.0.3',
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/mapreduce/streaming',
+     'post_options' => ['user.name=:UNAME:','input=:INPDIR_HDFS:/nums.txt','output=:OUTDIR:/mycounts', 
+                        'mapper=/bin/ls no_such-file-12e3', 'reducer=/usr/bin/wc'],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'FAILURE',
+     'check_call_back' => 1,
+    },
+
+   ]
+  },
+##=============================================================================================================
+  {
+   'name' => 'TestKillJob',
+   'tests' => 
+   [
+    {
+     'num' => 1,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/mapreduce/streaming',
+     'post_options' => ['user.name=:UNAME:','input=:INPDIR_HDFS:/nums.txt','output=:OUTDIR:/mycounts', 
+                        'mapper=/bin/sleep 100', 'reducer=/usr/bin/wc'],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'KILLED',
+#     'check_call_back' => 1, #TODO - enable call back check after fix
+     'kill_job_timeout' => 10,
+    },
+   ]
+  },
+##=============================================================================================================
+  {
+   'name' => 'TestMapReduce',
+   'tests' => 
+   [
+    {
+         
+     'num' => 1,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/mapreduce/jar',
+     'post_options' => ['user.name=:UNAME:','arg=:INPDIR_HDFS:/nums.txt', 'arg= :OUTDIR:/wc.txt', 
+                        'jar=:INPDIR_HDFS:/hexamples.jar', 'class=wordcount', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+     'check_call_back' => 1,
+    },
+   ]
+  },
+##=============================================================================================================
+  {
+   'name' => 'TestPig',
+   'tests' => 
+   [
+    {
+                                #test syntax error
+     'ignore' => 'fails in current version',
+     'num' => 1,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/pig',
+     'post_options' => ['user.name=:UNAME:','execute=asdf', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'FAILURE', 
+     'check_call_back' => 1,
+    },
+    {
+                                #valid syntax, hdfs operation through pig
+     'num' => 2,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/pig',
+     'post_options' => ['user.name=:UNAME:','execute=fs -ls :INPDIR_HDFS:;', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+     'check_call_back' => 1,
+    },
+    {
+                                #syntax check  - valid syntax
+     'num' => 3,
+       'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/pig',
+     'post_options' => ['user.name=:UNAME:','arg=-check', 'file=:INPDIR_HDFS:/loadstore.pig', 'arg=-p', 'arg=INPDIR=:INPDIR_HDFS:','arg=-p', 'arg=OUTDIR=:OUTDIR:', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+     'check_call_back' => 1,
+    },
+    {
+                                #syntax check cmd - valid syntax
+     'num' => 4,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/pig',
+     'post_options' => ['user.name=:UNAME:', 'arg=-d', 'arg=INFO' , 'execute=fs -ls :INPDIR_HDFS: ', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+     'check_call_back' => 1,
+    },
+
+    {
+                                #a simple load store script
+     'num' => 5,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/pig',
+     'post_options' => ['user.name=:UNAME:', 'arg=-p', 'arg=INPDIR=:INPDIR_HDFS:','arg=-p', 'arg=OUTDIR=:OUTDIR:', 'file=:INPDIR_HDFS:/loadstore.pig', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+     'check_call_back' => 1,
+    },
+
+
+    {
+                                #pig query registering jar
+     'num' => 6,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/pig',
+     'post_options' => ['user.name=:UNAME:', 'arg=-p', 'arg=INPDIR=:INPDIR_HDFS:','arg=-p', 'arg=OUTDIR=:OUTDIR:', 'file=:INPDIR_HDFS:/jarregistered.pig',
+                        'files=:INPDIR_HDFS:/piggybank.jar' ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+     'check_call_back' => 1,
+    },
+
+    {
+                                #macro
+     'num' => 7,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/pig',
+     'post_options' => ['user.name=:UNAME:', 'arg=-p', 'arg=INPDIR=:INPDIR_HDFS:','arg=-p', 'arg=OUTDIR=:OUTDIR:', 'file=:INPDIR_HDFS:/rowcount_withmacro.pig',
+                        'files=:INPDIR_HDFS:/rowcountmacro.pig' ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+     'check_call_back' => 1,
+    },
+
+    {
+                                #no file to be copied, should result in launcher job error 
+     'num' => 8,
+     ignore => 'check is disabled for now in templeton',
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/pig',
+     'post_options' => ['user.name=:UNAME:', 'arg=-p', 'arg=INPDIR=:INPDIR_HDFS:','arg=-p', 'arg= OUTDIR=:OUTDIR:', 'file=:INPDIR_HDFS:/no_such_file.pig',
+                        'files=:INPDIR_HDFS:/rowcountmacro.pig' ],
+     'json_field_substr_match' => { 'error' => 'does not exist'},
+                                #results
+     'status_code' => 200,
+     'check_job_complete' => 'FAILURE', 
+
+    },
+	
+
+
+    #test 9
+    #TODO jython test
+
+
+
+
+   ]
+  },
+##=============================================================================================================
+  {
+   'name' => 'TestHive',
+   'tests' => 
+   [
+    {
+                                #test syntax error
+     'ignore' => 'fails in current version',
+     'num' => 1,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/hive',
+     'post_options' => ['user.name=:UNAME:','execute=asdf', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'FAILURE', 
+
+    },
+ 
+    {
+                                #test show tables
+     'num' => 2,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/hive',
+     'post_options' => ['user.name=:UNAME:','execute=show tables', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+     'check_call_back' => 1,
+    },
+
+    {
+                                #test show tables
+     'num' => 3,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/hive',
+     'post_options' => ['user.name=:UNAME:','execute=drop table if exists mynums;', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+     'check_call_back' => 1,
+    },
+    {
+                                #test show tables
+     'num' => 4,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/hive',
+     'post_options' => ['user.name=:UNAME:','execute=create external table mynums(a int, b int) location ":INPDIR_HDFS:/numstable/";', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS',
+     'check_call_back' => 1,
+    },
+
+    {
+                                #test describe
+     'num' => 5,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/hive',
+     'post_options' => ['user.name=:UNAME:','execute=describe formatted mynums', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+     'check_call_back' => 1,
+    },
+
+    {
+                                #test select *
+     'num' => 6,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/hive',
+     'post_options' => ['user.name=:UNAME:','execute=select * from mynums', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+     'check_call_back' => 1,
+    },
+
+    {
+                                #test select a,b
+     'num' => 7,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/hive',	
+     'post_options' => ['user.name=:UNAME:','execute=select a,b from mynums', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+     'check_call_back' => 1,
+
+    },
+
+
+    {
+                                #test udfs : select a,rand(b)
+     'num' => 8,
+     'method' => 'POST',
+     'url' => ':TEMPLETON_URL:/templeton/v1/hive',
+     'post_options' => ['user.name=:UNAME:','execute=select a,rand(b) from mynums', ],
+     'json_field_substr_match' => { 'id' => '\d+'},
+                                #results
+     'status_code' => 200,
+     'check_job_created' => 1,
+     'check_job_complete' => 'SUCCESS', 
+
+    },
+
+
+
+   ]
+  },
+
+
+
+
+
+
+
+ ]
+},
+  ;
+

Added: incubator/hcatalog/trunk/src/test/e2e/templeton/tests/serverstatus.conf
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/test/e2e/templeton/tests/serverstatus.conf?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/src/test/e2e/templeton/tests/serverstatus.conf (added)
+++ incubator/hcatalog/trunk/src/test/e2e/templeton/tests/serverstatus.conf Wed Jul 25 20:29:44 2012
@@ -0,0 +1,57 @@
+###############################################################################
+# curl command tests for templeton
+#
+#
+
+#use Yahoo::Miners::Test::PigSetup;
+
+#PigSetup::setup();
+
+#my $me = `whoami`;
+#chomp $me;
+
+$cfg = 
+{
+ 'driver' => 'Curl',
+
+ 'groups' => 
+ [
+##=============================================================================================================
+  {
+   'name' => 'TypesSupported',
+   'tests' => 
+   [
+    {
+     #types supported
+     'num' => 1,
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1',
+     'status_code' => 200,
+    },
+   ]
+  },
+##=============================================================================================================
+  {
+   'name' => 'VersionsSupported',
+   'tests' => 
+   [
+    {
+     #versions supported
+     'num' => 1,
+     'method' => 'GET',
+     'url' => ':TEMPLETON_URL:/templeton/v1/version',
+     'status_code' => 200,
+     'json_field_substr_match' => {'version' => 'v1'},
+     'json_field_match_object' => {'supportedVersions' => '["v1"]'}
+    },
+   ]
+  },
+
+
+
+
+
+ ]
+},
+  ;
+

Modified: incubator/hcatalog/trunk/storage-handlers/hbase/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/storage-handlers/hbase/ivy.xml?rev=1365722&r1=1365721&r2=1365722&view=diff
==============================================================================
--- incubator/hcatalog/trunk/storage-handlers/hbase/ivy.xml (original)
+++ incubator/hcatalog/trunk/storage-handlers/hbase/ivy.xml Wed Jul 25 20:29:44 2012
@@ -48,9 +48,9 @@
         </dependency>
 
         <dependency org="org.apache.hadoop" name="hadoop-core"
-          rev="${hadoop-core.version}" conf="common->master" />
+          rev="${hadoop.jars.version}" conf="common->master" />
         <dependency org="org.apache.hadoop" name="hadoop-test"
-          rev="${hadoop-test.version}" conf="common->master" />
+          rev="${hadoop.jars.version}" conf="common->master" />
         <dependency org="org.apache.hive" name="hive-metastore"
           rev="${hive.version}" conf="common->master"/>
         <dependency org="org.apache.hive" name="hive-common"

Added: incubator/hcatalog/trunk/webhcat/svr/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/webhcat/svr/build.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/webhcat/svr/build.xml (added)
+++ incubator/hcatalog/trunk/webhcat/svr/build.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+   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.
+-->
+
+<project name="webhcat">
+  <property name="path.to.basedir" value="${basedir}/../.."/>
+  
+  <import file="../../build-common-new.xml"/>
+
+  <path id="compile.class.path">
+    <fileset dir="${build.dir}/ivy/default" includes="*.jar"/>
+    <fileset dir="${build.dir}/ivy/common" includes="*.jar"/>
+  </path>
+
+  <path id="test.class.path">
+    <dirset dir="${basedir}/../../build/test/classes"/>
+    <dirset dir="${basedir}/build/classes"/>
+    <dirset dir="${basedir}/build/test/classes"/>
+    <fileset dir="${build.dir}/ivy/default" includes="*.jar"/>
+    <fileset dir="${build.dir}/ivy/common" includes="*.jar"/>
+  </path>
+
+  <!-- Ideally we would simply use the "default" Ivy configuration jars; however,
+  hcatalog-core.jar is not yet available at build-time so we must explicitly add it.
+  -->
+  <path id="findbugs.class.path">
+    <fileset dir="${build.dir}/ivy/default"/>
+    <fileset dir="${build.dir}/ivy/common"/>
+    <fileset dir="${basedir}/../../build/hcatalog">
+      <include name="**/hcatalog-core-*.jar"/>
+    </fileset>
+  </path>
+
+</project>

Added: incubator/hcatalog/trunk/webhcat/svr/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/webhcat/svr/ivy.xml?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/webhcat/svr/ivy.xml (added)
+++ incubator/hcatalog/trunk/webhcat/svr/ivy.xml Wed Jul 25 20:29:44 2012
@@ -0,0 +1,124 @@
+<!-- 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. -->
+
+<ivy-module version="2.0">
+  <info organisation="org.apache.hcatalog"
+        module="${ant.project.name}"
+        revision="${hcatalog.version}">
+    <license name="Apache 2.0"/>
+    <ivyauthor name="Apache HCatalog Team" url="http://incubator.apache.org/hcatalog"/>
+    <description>Apache HCatalog</description>
+  </info>
+
+  <configurations defaultconfmapping="default">
+  <!--these match the Maven configurations-->
+      <conf name="default" extends="master,runtime"/>
+      <conf name="master" description="contains the artifact but no dependencies"/>
+      <conf name="runtime" description="runtime but not the artifact" />
+      <conf name="common" visibility="private" 
+          extends="runtime"
+          description="artifacts needed to compile/test the application"/>
+      <conf name="test" visibility="private" extends="runtime"/>
+      <conf name="package" visibility="private" extends="master"/>
+      <conf name="releaseaudit" visibility="private"/>
+  </configurations>
+
+  <dependencies>
+    <dependency org="org.apache.pig" name="pig" rev="${pig.version}"/>
+    <dependency org="junit" name="junit" rev="${junit.version}"
+        conf="common->default"/>
+    <dependency org="org.apache.commons" name="commons-exec"
+        rev="${commons-exec.version}" conf="common->master"/>
+
+    <dependency org="org.apache.hive" name="hive-metastore"
+		rev="${hive.version}" conf="common->master"/>
+    <dependency org="org.apache.hive" name="hive-common"
+		rev="${hive.version}" conf="common->master"/>
+    <dependency org="org.apache.hive" name="hive-exec"
+		rev="${hive.version}" conf="common->master"/>
+    <dependency org="org.apache.hive" name="hive-cli"
+		rev="${hive.version}" conf="common->master"/>
+    <dependency org="org.apache.hive" name="hive-hbase-handler"
+		rev="${hive.version}" conf="common->master"/>
+    <dependency org="org.apache.hadoop" name="hadoop-core"
+        rev="${hadoop.jars.version}" conf="common->master"/>
+    <dependency org="org.apache.hadoop" name="hadoop-streaming"
+        rev="${hadoop.jars.version}" conf="common->master"/>
+    <dependency org="commons-configuration" name="commons-configuration"
+        rev="${commons-configuration.version}" conf="common->master"/>
+    <dependency org="commons-lang" name="commons-lang"
+        rev="${commons-lang.version}" conf="common->master"/>
+    <dependency org="commons-cli" name="commons-cli"
+        rev="${commons-cli.version}" conf="common->master"/>
+    <dependency org="commons-codec" name="commons-codec"
+        rev="${commons-codec.version}" conf="common->master"/>
+    <dependency org="org.apache.zookeeper" name="zookeeper"
+        rev="${zookeeper.version}" conf="common->master"/>
+
+    <dependency org="commons-logging" name="commons-logging"
+        rev="${commons-logging.version}" conf="common->master"/>
+    <dependency org="log4j" name="log4j" rev="${log4j.version}"
+        conf="common->master"/>
+    <dependency org="org.slf4j" name="slf4j-log4j12" rev="${slf4j.version}"
+        conf="common->master"/>
+    <dependency org="org.slf4j" name="slf4j-api" rev="${slf4j.version}"
+        conf="common->master"/>
+    <dependency org="org.slf4j" name="jul-to-slf4j" rev="${slf4j.version}"
+        conf="common->master"/>
+
+    <dependency org="org.eclipse.jetty.aggregate" name="jetty-all-server"
+        rev="${jetty.webhcat.version}" conf="common->master"/>
+    <dependency org="javax.servlet" name="servlet-api"
+        rev="${servlet-api.version}" conf="common->master"/>
+
+    <dependency org="com.sun.jersey" name="jersey-core"
+        rev="${jersey.version}" conf="common->master"/>
+    <dependency org="com.sun.jersey" name="jersey-server"
+        rev="${jersey.version}" conf="common->master"/>
+    <dependency org="com.sun.jersey" name="jersey-json"
+        rev="${jersey.version}" conf="common->master"/>
+    <dependency org="com.sun.jersey" name="jersey-json"
+        rev="${jersey.version}" conf="common->master"/>
+
+    <dependency org="org.codehaus.jackson" name="jackson-core-asl"
+        rev="${jackson.version}" conf="common->master"/>
+    <dependency org="org.codehaus.jackson" name="jackson-mapper-asl"
+        rev="${jackson.version}" conf="common->master"/>
+    <dependency org="org.codehaus.jackson" name="jackson-jaxrs"
+        rev="${jackson.version}" conf="common->master"/>
+    <dependency org="org.codehaus.jackson" name="jackson-xc"
+        rev="${jackson.version}" conf="common->master"/>
+    <dependency org="org.codehaus.jettison" name="jettison"
+        rev="${jettison.version}" conf="common->master"/>
+    <dependency org="com.sun.xml.bind" name="jaxb-impl"
+        rev="${jaxb-impl.version}" conf="common->master"/>
+    <dependency org="javax.xml.bind" name="jaxb-api"
+        rev="${jaxb-api.version}" conf="common->master"/>
+    <dependency org="javax.activation" name="activation"
+        rev="${activation.version}" conf="common->master"/>
+    <dependency org="javax.xml.stream" name="stax-api"
+        rev="${stax-api.version}" conf="common->master"/>
+    <dependency org="asm" name="asm-all"
+        rev="${asm-all.version}" conf="common->master"/>
+    <dependency org="oro" name="oro"
+        rev="${oro.version}" conf="common->master"/>
+    <dependency org="com.sun.jersey.contribs" name="wadl-resourcedoc-doclet"
+        rev="${wadl-resourcedoc-doclet.version}" conf="common->master"/>
+    <dependency org="xerces" name="xercesImpl"
+        rev="${xerces.version}" conf="common->master"/>
+
+  </dependencies>
+</ivy-module>

Added: incubator/hcatalog/trunk/webhcat/svr/src/main/bin/templeton_config.sh
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/webhcat/svr/src/main/bin/templeton_config.sh?rev=1365722&view=auto
==============================================================================
--- incubator/hcatalog/trunk/webhcat/svr/src/main/bin/templeton_config.sh (added)
+++ incubator/hcatalog/trunk/webhcat/svr/src/main/bin/templeton_config.sh Wed Jul 25 20:29:44 2012
@@ -0,0 +1,93 @@
+#!/usr/bin/env bash
+
+# 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.
+
+#====================================
+#Default config param values
+#====================================
+
+# The file containing the running pid
+PID_FILE=./templeton.pid
+
+#default log directory
+TEMPLETON_LOG_DIR=${TEMPLETON_LOG_DIR:-.}
+
+# The console error log
+ERROR_LOG=${TEMPLETON_LOG_DIR}/templeton-console-error.log
+
+# The console log
+CONSOLE_LOG=${TEMPLETON_LOG_DIR}/templeton-console.log
+
+# The name of the templeton jar file
+TEMPLETON_JAR=templeton-0.1.0-dev.jar
+
+# How long to wait before testing that the process started correctly
+SLEEP_TIME_AFTER_START=10
+
+#================================================
+#See if the default configs have been overwritten
+#================================================
+
+#These parameters can be overriden by templeton-env.sh
+# the root of the TEMPLETON installation
+export TEMPLETON_PREFIX=`dirname "$this"`/..
+
+#check to see if the conf dir is given as an optional argument
+if [ $# -gt 1 ]
+then
+    if [ "--config" = "$1" ]
+          then
+              shift
+              confdir=$1
+              shift
+              TEMPLETON_CONF_DIR=$confdir
+    fi
+fi
+
+# Allow alternate conf dir location.
+if [ -e "${TEMPLETON_PREFIX}/conf/templeton-env.sh" ]; then
+  DEFAULT_CONF_DIR=${TEMPLETON_PREFIX}/"conf"
+else
+  DEFAULT_CONF_DIR="/etc/templeton"
+fi
+TEMPLETON_CONF_DIR="${TEMPLETON_CONF_DIR:-$DEFAULT_CONF_DIR}"
+
+#users can add various env vars to templeton-env.sh in the conf
+#rather than having to export them before running the command
+if [ -f "${TEMPLETON_CONF_DIR}/templeton-env.sh" ]; then
+  . "${TEMPLETON_CONF_DIR}/templeton-env.sh"
+fi
+
+#====================================
+#determine where hadoop is
+#====================================
+
+#check HADOOP_HOME and then check HADOOP_PREFIX
+if [ -f ${HADOOP_HOME}/bin/hadoop ]; then
+  HADOOP_PREFIX=$HADOOP_HOME
+#if this is an rpm install check for /usr/bin/hadoop
+elif [ -f ${TEMPLETON_PREFIX}/bin/hadoop ]; then
+  HADOOP_PREFIX=$TEMPLETON_PREFIX
+#otherwise see if HADOOP_PREFIX is defined
+elif [ ! -f ${HADOOP_PREFIX}/bin/hadoop ]; then
+  echo "Hadoop not found."
+  exit 1
+fi
+
+
+
+
+



Mime
View raw message