메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, Hadoop ecosystem, Semantic IoT등의 프로젝트를 진행중에 습득한 내용을 정리하는 곳입니다.
필요한 분을 위해서 공개하고 있습니다. 문의사항은 gooper@gooper.com로 메일을 보내주세요.


------ 전체 테이블 목록
select a.owner as tbl_owner, a.owner_type as tbl_owner_type,
a.tbl_name, a.tbl_type, B.DB_LOCATION_URI, b.name as db_name from  HIVE.TBLS a, HIVE.DBS b where a.db_id=B.DB_id;


------전체 코디네이터 목록
select a.id, a.name, dbms_lob.substr(a.description, 10000,1), B.USERNAME from HUE.DESKTOP_DOCUMENT2 a, hue.auth_user b
where a.owner_id=B.ID and type='oozie-coordinator2' and is_history=0 and is_trashed=0;


------전체 WF 목록
select a.name, dbms_lob.substr(a.description, 10000,1), B.USERNAME from HUE.DESKTOP_DOCUMENT2 a, hue.auth_user b
where a.owner_id=B.ID and type='oozie-workflow2' and is_history=0 and is_trashed=0;


---전체 코디네이터및 WF목록
select a.id, a.name, dbms_lob.substr(a.description, 10000,1), B.USERNAME, a.type, A.LAST_MODIFIED from HUE.DESKTOP_DOCUMENT2 a, hue.auth_user b
where a.owner_id=B.ID and type in('oozie-workflow2','oozie-coordinator2') and is_history=0 and is_trashed=0;


-----from_document2_id기준 전체

select b.lvl, a.id, (select k.username from hue.auth_user k where k.id=a.owner_id) as username, a.last_modified,
a.name, dbms_lob.substr(a.description, 10000,1) as remark, a.type
, (select c.name from hue.desktop_document2 c where c.id=b.from_document2_id) as from_work, b.from_document2_id as from_id
, (select d.name from hue.desktop_document2 d where d.id=b.to_document2_id) as to_work
, (select dbms_lob.substr(e.description, 10000,1) from hue.desktop_document2 e where e.id=b.to_document2_id) as to_work_remark
, b.to_document2_id as to_id
,b.isloop
from hue.desktop_document2 a,
(
  select level as lvl, id, from_document2_id, to_document2_id, connect_by_iscycle isloop from HUE.DESKTOP_DOCUMENT2_DEPENDENCIES
   -- start with from_document2_id=67292 -- 코디네이터
  connect by nocycle prior to_document2_id = from_document2_id
) b
where a.id=b.from_document2_id and is_history=0 and is_trashed=0 and type in ('oozie-coordinator2','oozie-workflow2');


-------코디네이터를 기준으로 코디네이터와 WF 구조 목록.
select b.lvl, a.id, (select k.username from hue.auth_user k where k.id=a.owner_id) as username, a.last_modified,
a.name, dbms_lob.substr(a.description, 10000,1) as remark, a.type
, (select c.name from hue.desktop_document2 c where c.id=b.from_document2_id) as from_work, b.from_document2_id as from_id
, (select d.name from hue.desktop_document2 d where d.id=b.to_document2_id) as to_work
, (select dbms_lob.substr(e.description, 10000,1) from hue.desktop_document2 e where e.id=b.to_document2_id) as to_work_remark
, b.to_document2_id as to_id
,b.isloop
from hue.desktop_document2 a,
(
  select level as lvl, id, from_document2_id, to_document2_id, connect_by_iscycle isloop from HUE.DESKTOP_DOCUMENT2_DEPENDENCIES
   -- start with from_document2_id=67292 -- 코디네이터
   start with from_document2_id in (select id from HUE.DESKTOP_DOCUMENT2
       where type='oozie-coordinator2' and is_history=0 and is_trashed=0)
  connect by nocycle prior to_document2_id = from_document2_id
) b
where a.id=b.from_document2_id and is_history=0 and is_trashed=0 and type in ('oozie-coordinator2','oozie-workflow2');



------HUE.DESKTOP_DOCUMENT2_DEPENDENCIES에는 없고 HUE.DESKTOP_DOCUMENT2에만 있는 코디네이터 혹은 워크플로우 목록
select a.*, b.username from HUE.DESKTOP_DOCUMENT2 a, hue.auth_user b
       where type in('oozie-coordinator2','oozie-workflow2') and is_history=0 and is_trashed=0
       and a.id not in ( select from_document2_id from HUE.DESKTOP_DOCUMENT2_DEPENDENCIES
                       union
                       select to_document2_id from HUE.DESKTOP_DOCUMENT2_DEPENDENCIES
                      )
       and a.owner_id=B.ID;              

번호 제목 글쓴이 날짜 조회 수
11 [Hue admin]Add/Sync LDAP user, Sync LDAP users/groups 버튼 기능 설명 gooper 2023.08.09 15
10 "bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')])" 오류는 CA인증을 하지 못해서 발생함 총관리자 2022.05.13 48
9 [TLS/SSL]Cloudera CDH6.3.4기준 Hue TLS설정 항목 총관리자 2022.05.13 89
8 [Hue]Hue의 메타정보를 담고 있는 desktop_document테이블과 desktop_document2의 관계 총관리자 2022.05.09 38
» hue메타 정보를 저장(oracle DB)하는 내부 테이블을 이용하여 전체 테이블목록, 전체 코디네이터 목록, 코디네이터기준 workflow구조를 추출하는 쿼리문 총관리자 2022.04.01 48
6 Hue impala에서 query결과를 HDFS 파일로 export시 AuthorizationException: User 'gooper1234' does not have privileges to access: db명.query_impala_123456 총관리자 2022.03.17 211
5 service name방식의 oracle을 메타정보 저장소로 사용할때 Hue Configuration설정하는 방법 총관리자 2022.02.12 15
4 hue.axes_accessattempt테이블의 username컬럼에 NULL 혹은 space가 들어갈수도 있음. 총관리자 2021.11.03 2838
3 Hue Load Balancer를 L4로 L/B하는 경우는 L4쪽 도멘인으로 발행된 인증서를 TLS/SSL항목에 설정해주어야 한다. 총관리자 2021.10.08 99
2 TLS/SSl설정시 방법및 참고 사항 총관리자 2021.10.08 82
1 you are accessing a non-optimized hue please switch to one of the available addresses 총관리자 2021.10.06 42

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로