You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Esteban Gutierrez (JIRA)" <ji...@apache.org> on 2011/07/07 02:05:17 UTC

[jira] [Created] (HIVE-2268) CREATE.. TABLE...LIKE should propagate current owner:

CREATE.. TABLE...LIKE should propagate current owner:
-----------------------------------------------------

                 Key: HIVE-2268
                 URL: https://issues.apache.org/jira/browse/HIVE-2268
             Project: Hive
          Issue Type: Bug
          Components: Metastore
    Affects Versions: 0.7.1, 0.7.0, 0.8.0
            Reporter: Esteban Gutierrez


-- 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

        

[jira] [Commented] (HIVE-2268) CREATE.. TABLE.. LIKE should not inherit the original owner of the table.

Posted by "Charles Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066220#comment-13066220 ] 

Charles Chen commented on HIVE-2268:
------------------------------------

This will be fixed in https://issues.apache.org/jira/browse/HIVE-1218

> 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: Charles Chen
>              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

        

[jira] [Updated] (HIVE-2268) CREATE.. TABLE.. LIKE should not inherit the original owner of the table.

Posted by "Charles Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Charles Chen updated HIVE-2268:
-------------------------------

    Issue Type: Sub-task  (was: Bug)
        Parent: HIVE-1218

> 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: Sub-task
>          Components: Metastore, Security
>    Affects Versions: 0.7.0, 0.7.1, 0.8.0
>            Reporter: Esteban Gutierrez
>            Assignee: Charles Chen
>              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

        

[jira] [Reopened] (HIVE-2268) CREATE.. TABLE.. LIKE should not inherit the original owner of the table.

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach reopened HIVE-2268:
----------------------------------


> 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: Charles Chen
>              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

        

[jira] [Commented] (HIVE-2268) CREATE.. TABLE.. LIKE should not inherit the original owner of the table.

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13062149#comment-13062149 ] 

John Sichi commented on HIVE-2268:
----------------------------------

Agree, the owner should be the person executing the CREATE TABLE LIKE command.

> 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
>              Labels: create, ddl, table
>
> 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

        

[jira] [Commented] (HIVE-2268) CREATE.. TABLE.. LIKE should not inherit the original owner of the table.

Posted by "Esteban Gutierrez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066131#comment-13066131 ] 

Esteban Gutierrez commented on HIVE-2268:
-----------------------------------------

I guess if throws IOException, it should not create the table at all.


> 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

        

[jira] [Resolved] (HIVE-2268) CREATE.. TABLE.. LIKE should not inherit the original owner of the table.

Posted by "Carl Steinbach (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl Steinbach resolved HIVE-2268.
----------------------------------

    Resolution: Duplicate

> 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: Charles Chen
>              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

        

[jira] [Resolved] (HIVE-2268) CREATE.. TABLE.. LIKE should not inherit the original owner of the table.

Posted by "Charles Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Charles Chen resolved HIVE-2268.
--------------------------------

    Resolution: Fixed

I have verified that this was fixed by https://issues.apache.org/jira/browse/HIVE-1218

> 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: Charles Chen
>              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

        

[jira] [Updated] (HIVE-2268) CREATE.. TABLE.. LIKE should not inherit the original owner of the table.

Posted by "Franklin Hu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Franklin Hu updated HIVE-2268:
------------------------------

    Description: 
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)



  was:

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)



       Assignee: Charles Chen  (was: 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: Charles Chen
>              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

        

[jira] [Assigned] (HIVE-2268) CREATE.. TABLE.. LIKE should not inherit the original owner of the table.

Posted by "Franklin Hu (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] [Updated] (HIVE-2268) CREATE.. TABLE.. LIKE should not inherit the original owner of the table.

Posted by "Esteban Gutierrez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Esteban Gutierrez updated HIVE-2268:
------------------------------------

    Component/s: Security
    Description: 

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)



  was:
-- 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)



         Labels: create ddl table  (was: )
        Summary: CREATE.. TABLE.. LIKE should not inherit the original owner of the table.  (was: CREATE.. TABLE...LIKE should propagate current owner:)

> 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
>              Labels: create, ddl, table
>
> 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

        

[jira] [Updated] (HIVE-2268) CREATE.. TABLE.. LIKE should not inherit the original owner of the table.

Posted by "Franklin Hu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Franklin Hu updated HIVE-2268:
------------------------------

    Attachment: hive-2268.1.patch

Sets owner when executing CREATE TABLE .. LIKE, if for some reason throws IOException, just default to the original owner

> 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

        

[jira] [Updated] (HIVE-2268) CREATE.. TABLE.. LIKE should not inherit the original owner of the table.

Posted by "Charles Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Charles Chen updated HIVE-2268:
-------------------------------

    Issue Type: Bug  (was: Sub-task)
        Parent:     (was: HIVE-1218)

> 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: Charles Chen
>              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