|
@@ -1800,7 +1800,59 @@ class TestHiveServer2API():
|
|
|
prev_extended_describe = getattr(MockHiveServerTable, 'extended_describe')
|
|
prev_extended_describe = getattr(MockHiveServerTable, 'extended_describe')
|
|
|
|
|
|
|
|
try:
|
|
try:
|
|
|
- extended_describe = 'Table(tableName:page_view, dbName:default, owner:romain, createTime:1360732885, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:viewtime, type:int, comment:null), FieldSchema(name:userid, type:bigint, comment:null), FieldSchema(name:page_url, type:string, comment:null), FieldSchema(name:referrer_url, type:string, comment:null), FieldSchema(name:ip, type:string, comment:IP Address of the User), FieldSchema(name:dt, type:string, comment:null), FieldSchema(name:country, type:string, comment:null)], location:hdfs://localhost:8020/user/hive/warehouse/page_view, 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=1}), bucketCols:[], sortCols:[], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[], skewedColValueLocationMaps:{}), storedAsSubDirectories:false), partitionKeys:[FieldSchema(name:dt, type:string, comment:null), FieldSchema(name:country, type:string, comment:null)], parameters:{numPartitions=0, numFiles=1, transient_lastDdlTime=1360732885, comment=This is the page view table}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE)'
|
|
|
|
|
|
|
+ extended_describe = (
|
|
|
|
|
+ 'Table('
|
|
|
|
|
+ 'tableName:page_view, '
|
|
|
|
|
+ 'dbName:default, '
|
|
|
|
|
+ 'owner:romain, '
|
|
|
|
|
+ 'createTime:1360732885, '
|
|
|
|
|
+ 'lastAccessTime:0, '
|
|
|
|
|
+ 'retention:0, '
|
|
|
|
|
+ 'sd:StorageDescriptor('
|
|
|
|
|
+ 'cols:['
|
|
|
|
|
+ 'FieldSchema(name:viewtime, type:int, comment:null), '
|
|
|
|
|
+ 'FieldSchema(name:userid, type:bigint, comment:null), '
|
|
|
|
|
+ 'FieldSchema(name:page_url, type:string, comment:null), '
|
|
|
|
|
+ 'FieldSchema(name:referrer_url, type:string, comment:null), '
|
|
|
|
|
+ 'FieldSchema(name:ip, type:string, comment:IP Address of the User), '
|
|
|
|
|
+ 'FieldSchema(name:dt, type:string, comment:null), '
|
|
|
|
|
+ 'FieldSchema(name:country, type:string, comment:null)'
|
|
|
|
|
+ '], '
|
|
|
|
|
+ 'location:hdfs://localhost:8020/user/hive/warehouse/page_view, '
|
|
|
|
|
+ '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=1}'
|
|
|
|
|
+ '), '
|
|
|
|
|
+ 'bucketCols:[], '
|
|
|
|
|
+ 'sortCols:[], '
|
|
|
|
|
+ 'parameters:{}, '
|
|
|
|
|
+ 'skewedInfo:SkewedInfo('
|
|
|
|
|
+ 'skewedColNames:[], '
|
|
|
|
|
+ 'skewedColValues:[], '
|
|
|
|
|
+ 'skewedColValueLocationMaps:{}'
|
|
|
|
|
+ '), '
|
|
|
|
|
+ 'storedAsSubDirectories:false'
|
|
|
|
|
+ '), '
|
|
|
|
|
+ 'partitionKeys:['
|
|
|
|
|
+ 'FieldSchema(name:dt, type:string, comment:null), '
|
|
|
|
|
+ 'FieldSchema(name:country, type:string, comment:null)'
|
|
|
|
|
+ '], '
|
|
|
|
|
+ 'parameters:{'
|
|
|
|
|
+ 'numPartitions=0, '
|
|
|
|
|
+ 'numFiles=1, '
|
|
|
|
|
+ 'transient_lastDdlTime=1360732885, '
|
|
|
|
|
+ 'comment=This is the page view table'
|
|
|
|
|
+ '}, '
|
|
|
|
|
+ 'viewOriginalText:null, '
|
|
|
|
|
+ 'viewExpandedText:null, '
|
|
|
|
|
+ 'tableType:MANAGED_TABLE'
|
|
|
|
|
+ ')'
|
|
|
|
|
+ )
|
|
|
setattr(table, 'extended_describe', extended_describe)
|
|
setattr(table, 'extended_describe', extended_describe)
|
|
|
|
|
|
|
|
assert_equal([['tableName', 'page_view'],
|
|
assert_equal([['tableName', 'page_view'],
|