Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

API NameCreate Repository
Request TypePost
Request URLservice/public/api/repository
Request Params

application/json

•HDFS Example:

Code Block
themeFadeToGrey
languagejs
titleHDFS Example
linenumberstrue
collapsetrue
{
 "name": "hadoopdev_2",
 "description": "hdfs repository using curl",
 "repositoryType": "hdfs",
"config": "{
 "username": "policymgr",
 "password": "policymgr",
 "fs.default.name": "hdfs://sandbox.hortonworks.com:8020",
 "hadoop.security.authorization": "true",
 "hadoop.security.authentication": "simple",
 "hadoop.security.auth_to_local": "RULE:[2:$1@$0](jhs@.*EXAMPLE.COM)s/.*/mapred/ RULE:[2:$1@$0]([nr]m@.*EXAMPLE.COM)s/.*/yarn/ RULE:[2:$1@$0]([nd]n@.*EXAMPLE.COM)s/.*/hdfs/ DEFAULT",
 "dfs.datanode.kerberos.principal": "dn/_HOST@EXAMPLE.COM",
 "dfs.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM",
 "dfs.secondary.namenode.kerberos.principal": "nn/_HOST@EXAMPLE.COM",
 "commonNameForCertificate": ""
 }",
"isActive": true
}


•HIVE Example:

Code Block
themeFadeToGrey
languagejs
titleHIVE Example
linenumberstrue
collapsetrue
  {
"name": "hivedev_1",
 "description": "Hive Dev",
 "repositoryType": "Hive",
"config": "{
 "username": "policymgr_hive",
 "password": "policymgr_hive",
 "jdbc.driverClassName": "org.apache.hive.jdbc.HiveDriver",
 "jdbc.url": "jdbc:hive2://127.0.0.1:10000/default",
 "commonNameForCertificate": ""
 }",
"isActive": true
}

• HBASE Example:

 

Code Block
themeFadeToGrey
languagejs
titleHBASE Example
linenumberstrue
collapsetrue
{
name: "hbasedev"
description: "HBase Dev"
isActive: true
repositoryType: "hbase"
config: “{
 "username": "hbase",
 "password": "*****",
 "hadoop.security.authentication": "kerberos",
 "hbase.master.kerberos.principal": "hbase/_HOST@EXAMPLE.COM",
 "hbase.security.authentication": "kerberos",
 "hbase.zookeeper.property.clientPort": "2181",
 "hbase.zookeeper.quorum": "ip-172-31-38-49.ec2.internal",
 "zookeeper.znode.parent": "/hbase"
 }”
 }

• KNOX Example:

Code Block
themeFadeToGrey
languagejs
titleKNOX Exaple
linenumberstrue
collapsetrue
{
 "name": "knoxdev",
 "description": "Knox Repository",
 "repositoryType": "Knox",
"config": “{
 "username": "admin",
 "password": "*****",
 "knox.url": "https://ip-172-31-38-49.ec2.internal:8443/gateway/admin/api/v1/topologies",
 "commonNameForCertificate": ""
 }
"isActive": true
}

 • STORM Example:

Code Block
themeFadeToGrey
languagejs
titleSTORM Example
linenumberstrue
collapsetrue
  {
"name": "stormdev",
 "description": "Storm Repo..",
 "repositoryType": "Storm",
"config": “{
 "username": "storm",
 "password": "*****",
 "nimbus.url": "http://ip-172-31-38-49.ec2.internal:8080/index.html",
 "commonNameForCertificate": ""
 }”
"isActive": true
}
Response200-Application/Json

...

API NameSearch Policy
Request TypeGET
Request URLservice/public/api/policy
Request Params

Querry Params:

PageSize int The page size required

startindex int The start record index

 policyname string The Name of the policy

 columns strings The columns

 columnsFamilies string The column Families

tables string The tables

udfs string The udfs

databases string The databases

group name string The group

repository type string The repository type ("hbase","hdfs" etc)

isRecursive boolean TheisRecursives property ("true" or "false")

repository name string The repository name

userName string The user name

isEnabled boolean The enable/disabled property ("true" or "false")


Example =

pagesize25=25&startIndex=0

Response

200 - Application/jason

Example:

Code Block
themeFadeToGrey
languagejs
titleExample
linenumberstrue
collapsetrue
{
 "startIndex": 0,
 "pageSize": 1,
 "totalCount": 1,
 "resultSize": 1,
 "queryTimeMS": 1409646322022,
 "vXPolicies": [
 {
 "id": 3,
 "createDate": "2014-09-02T06:02:19Z",
 "updateDate": "2014-09-02T06:02:19Z",
 "owner": "Admin",
 "updatedBy": "Admin",
 "policyName": "hivedev_1409637739446_281_2-2-20140902060219",
 "resourceName": "/*/*",
 "repositoryName": "Hive Repo Updated_1409637741234_476_10",
 "repositoryType": "Hive",
 "tables": "",
 "columns": "",
 "databases": "*",
 "udfs": "**",
 "tableType": "Inclusion",
 "columnType": "Inclusion",
 "isEnabled": true,
 "isRecursive": false,
 "isAuditEnabled": true,
 "version": "0.1.0"
 }
 ]
}


...