메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


curl -u 'xxxx':'xxxx' 'http://CM_server.domain.com:7180/api/v11/clusters/cluster/services/impala/impalaQueries?from=2017-10... statement RLIKE ".*fawzea.*"' >>f.json


http://CM-server.domain.com:7180/api/v19/clusters/cluster/services/impala/impalaQueries?statment%20RLIKE%20%22.*test.*%22




*참고 : https://cloudera.github.io/cm_api/apidocs/v19/index.html

Introduction

This document describes the Cloudera Manager REST API. All requests and responses are presented in Javascript Object Notation (JSON).

The API resources listed below follow standard Create-Read-Update-Delete (CRUD) semantics where the HTTP request path defines the entity to be acted on and the HTTP method expresses the type of action to perform.

HTTP MethodOperation
POSTCreate entries
GETRead entries
PUTUpdate or edit entries
DELETEDelete entries

All collections in the API use plural names, 'users', instead of the singular, 'user'. To address a specific user in the system, expand the URL path to include the user identifier. For example, '/users/foo' identifies user 'foo' and '/users/bar' identifies user 'bar'.

CollectionPOST (create)GET (read)PUT (update)DELETE (delete)
/usersCreate a new userList all users in the systemBulk update all usersDelete all users
/users/fooerrorRead information about user 'foo'If user 'foo' exists, update their information; otherwise, error.Delete user 'foo'

Keep in mind that not all collections support all operations. For example, events in the system are read-only; you cannot create new events with the API.

You can list the entries in a collection using one of two views: 'summary' or 'full'. The default 'summary' view provides the core information about each entry. The 'full' view is more heavyweight and provides a fully expanded view of each entry. The view is controlled by a query parameter called 'view' e.g. 'GET /users?view=full'.

HTTP requests should set the "Content-Type" header to "application/json" for most calls, unless specified otherwise.

Authentication

The Cloudera Manager API uses HTTP basic access authentication. It accepts the same user credentials as the web interface. Different users may have different levels of access, as defined by their roles. (See the user management API calls for more.) With every authenticated request, the server returns a session cookie, which can be subsequently used for authentication.

Error Code

The API returns HTTP code in the 400s and 500s upon errors:

  • 400 — Invalid request parameters; Malformed requests
  • 401 — Authentication failure
  • 403 — Authorization failure
  • 404 — Object not found
  • 500 — Internal API error
  • 503 — Response temporarily unavailable; caller should retry later

See /tools/echoError for a discussion on the body of an error response.

API Usage Tutorial

Tutorial link.

API Version

The API can be queried for the latest version it supports. By making a GET request to the '/version' URL, a string will be returned with the highest supported version (for example, "v2").

Note that servers that only support API v1 do not support this call. In that case, a 404 error will be returned, and can be used to detect that the server only supports v1.

The version should be prepended to the path of the REST resources listed below. The documentation of the different resources lists the version which added the particular functionality.

REST Resources

This API supports a Representational State Transfer (REST) model for accessing a set of resources through a fixed set of operations. The following resources are accessible through the RESTful model:

There is also a WADL document describing the REST API.

Data Model

All endpoints act on a common set of data. The Cloudera Manager API uses JSON.

Data Elements

번호 제목 날짜 조회 수
387 oozie 에서 sqoop action실행 에러 - 컬럼개수 차이 2014.07.17 3441
386 FAILED: IllegalStateException Variable substitution depth too large: 40 오류발생시 조치사항 2014.08.19 4587
385 hadoop의 data디렉토리를 변경하는 방법 2014.08.24 4179
384 java.util.NoSuchElementException발생시 조치 2014.08.27 4231
383 sqoop작업시 hdfs의 개수보다 더많은 값이 중복되어 oracle에 입력되는 경우가 있음 2014.09.02 6935
382 banana pi에 hive 0.13.1+mysql(metastore)설치 file 2014.09.09 4858
381 root가 localhost에서 mysql로 접근하지 못하는 경우의 해결방법(패스워드) 2014.09.10 4610
380 lateral view 예제 2014.09.18 3905
379 kafka의 re-balance를 이용하여 consumer를 multi thread로 돌려서 topic의 partitions을 활용 2015.03.31 4015
378 SASL configuration failed: javax.security.auth.login.LoginException: java.lang.NullPointerException 오류 해결방법 2015.04.02 3813
377 scan의 startrow, stoprow지정하는 방법 2015.04.08 4972
376 bananapi 5대(ubuntu계열 리눅스)에 yarn(hadoop 2.6.0)설치하기-ResourceManager HA/HDFS HA포함, JobHistory포함 2015.04.24 22227
375 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable원인 2015.04.27 4460
374 zookeeper 3.4.6 설치(3대) 2015.04.28 4710
373 Hadoop - 클러스터 세팅및 기동 2015.04.28 4002
372 HBase 0.98.12(1.2.5) for hadoop2 설치-5대에 완전분산모드 (HDFS HA상테) 2015.04.29 4435
371 hive 0.13.1 설치 + meta정보는 postgresql 9.3에 저장 2015.04.30 4113
370 oozie 4.1 설치 - maven을 이용한 source compile on hadoop 2.5.2 with postgresql 9.3 2015.04.30 4144
369 hadoop 2.6.0 기동(에코시스템 포함)및 wordcount 어플리케이션을 이용한 테스트 2015.05.05 6537
368 java.lang.IllegalArgumentException: Does not contain a valid host:port authority: master 오류해결방법 2015.05.06 2779
위로