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

Franklin Hu reassigned HIVE-2268:
---------------------------------

    Assignee: Franklin Hu

> CREATE.. TABLE.. LIKE should not inherit the original owner of the table.
> -------------------------------------------------------------------------
>
>                 Key: HIVE-2268
>                 URL: https://issues.apache.org/jira/browse/HIVE-2268
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore, Security
>    Affects Versions: 0.7.0, 0.7.1, 0.8.0
>            Reporter: Esteban Gutierrez
>            Assignee: Franklin Hu
>              Labels: create, ddl, table
>         Attachments: hive-2268.1.patch
>
>
> When a new table is created by using CREATE.. TABLE.. LIKE.. the new table 
> inherits the existing owner of the table, this is issue is potentially 
> conflicting for multiuser environments where Hive authorization is planned 
> for future use.
> -- alice creates table 
> CREATE EXTERNAL TABLE foo(bar double)
> ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
> STORED AS TEXTFILE LOCATION '/user/alice/foo';
> -- table owner is alice as expected
> hive> DESCRIBE EXTENDED foo;
> OK
> bar     double  
>                  
> Detailed Table Information      Table(tableName:foo, dbName:default, 
> {color:red} owner:alice {color}, createTime:1309996190, lastAccessTime:0, 
> retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:bar, type:double, 
> comment:null)], location:hdfs://localhost/user/alice/foo, 
> inputFormat:org.apache.hadoop.mapred.TextInputFormat, 
> outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, 
> compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, 
> serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, 
> parameters:{serialization.format=,, field.delim=,, line.delim=       
> }), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], 
> parameters:{EXTERNAL=TRUE, transient_lastDdlTime=1309996190}, 
> viewOriginalText:null, viewExpandedText:null, tableType:EXTERNAL_TABLE)      
> -- bob calls CREATE..TABLE..LIKE
> CREATE TABLE foo_like LIKE foo;
> -- bob created a new table using like but the owner stills alice
> -- but the expected is owner:bob
> hive>  DESCRIBE EXTENDED foo_like;
> OK
> bar     double  
>                  
> Detailed Table Information      Table(tableName:foo_like, dbName:default, 
> {color:red} owner:alice {color}, createTime:1309996554, lastAccessTime:0, 
> retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:bar, type:double, 
> comment:null)], location:hdfs://localhost/user/hive/warehouse/foo_like, 
> inputFormat:org.apache.hadoop.mapred.TextInputFormat, 
> outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, 
> compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, 
> serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, 
> parameters:{serialization.format=,, field.delim=,, line.delim=  
> }), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], 
> parameters:{transient_lastDdlTime=1309996554}, viewOriginalText:null, 
> viewExpandedText:null, tableType:MANAGED_TABLE)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to