描述分区-GET ddl/database /:db/table /:table/partition /:partition

Description

在 HCatalog 表中描述单个分区。

URL

http:// * www.myserver.com * /templeton/v1/ddl/database/ *:db * /table/ *:table * /partition/ *:partition *

Parameters

NameDescriptionRequired?Default
:db数据库名称RequiredNone
:table表名RequiredNone
:partition分区名称 col_name ='value'列表。请注意正确编码 http 的引用,例如 country =%27algeria%27.RequiredNone

standard parameters也受支持。

Results

NameDescription
database数据库名称
table表名
partition分区名称
partitioned如果表已分区,则为 True
location桌子的位置
outputFormatOutput format
columns列名称,类型和 Comments 的列表
owner所有者的用户名
partitionColumns分区列列表
inputFormatInput format

Example

Curl Command

% curl -s \
   'http://localhost:50111/templeton/v1/ddl/database/default/table/mytest/partition/country=%27US%27?user.name=ctdean'

JSON Output

{
  "partitioned": true,
  "location": "hdfs://ip-10-77-6-151.ec2.internal:8020/apps/hive/warehouse/mytest/loc1",
  "outputFormat": "org.apache.hadoop.hive.ql.io.RCFileOutputFormat",
  "columns": [
    {
      "name": "i",
      "type": "int"
    },
    {
      "name": "j",
      "type": "bigint"
    },
    {
      "name": "ip",
      "comment": "IP Address of the User",
      "type": "string"
    }
  ],
  "owner": "rachel",
  "partitionColumns": [
    {
      "name": "country",
      "type": "string"
    }
  ],
  "inputFormat": "org.apache.hadoop.hive.ql.io.RCFileInputFormat",
  "database": "default",
  "table": "mytest",
  "partition": "country='US'"
}

Navigation Links

上一个:GET ddl/database/:db/table/:table/partition下一个:PUT ddl/database/:db/table/:table/partition/:partition

一般:DDL ResourcesWebHCat ReferenceWebHCat ManualHCatalog ManualHive Wiki 主页Hive 项目 site