메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

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


MariaDB의 study db에 접속하여 product 테이블의 내용을 가져다가 hive의 test db밑에 product라는 hive테이블로 자동생성하는 sqoop 명령문이다.
이때 MariaDB에서 가져온 내용에 저장되는 HDFS 위치는 hive에서 생성한 test db밑에 저장된다.
hive table을 자동으로 생성하는 경우는 --lines-terminated-by를 사용할 수 없는데... sqoop에서는 지정가능하지만 hive에서 '\n'만 지원하기 때문에 오류가 발생한다.
그리고 console등을 이용하여 자동생성하는 경우 hue에서 필요로 하는 정보가 등록되지 않아서 인지 데이타는 볼수 있으나 column명 및 속성은 조회되지 않는다. 
물론 describe를 이용하여 볼수는 있다.
sqoop에서 바로 hive table을 생성하면 컬럼에 newline(\n)이 들어 있어도 문제없이 데이타를 가져올 수 있다.

sqoop import \
--connect=jdbc:mysql://gsda3:포트/study \
--username=사용자id\
--password=패스워드\
--table=product \
--hive-table test.product  \
--create-hive-table  \
--hive-import  \
--hive-home test.db
번호 제목 날짜 조회 수
710 [Ranger]RangerAdminRESTClient Error gertting pplicies; Received NULL response!!, secureMode=true, user=rangerkms/node01.gooper.com@ GOOPER.COM (auth:KERBEROS), serviceName=cm_kms 2023.06.27 3518
709 [CDP7.1.3]Ranger WebUI에서 Error! Connection refused: Please check the KMS provider URL and whether the Ranager KMS is running발생시 조치 방법 2023.06.07 4687
708 [impala]insert into db명.table명 select a, b from db명.table명 쿼리 수행시 "Memory limit exceeded: Failed to allocate memory for Parquet page index"오류 조치 방법 2023.05.31 6326
707 Impala Admission Control 설정시 쿼리가 사용하는 메모리 사용량 판단 방법 2023.05.19 4841
706 [Atlas Server]org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions (user=atlas/node01.gooper.com@GOOPER.COM, scope=default:atlas_janus, params=[table=default:atlas_janus,], action-CREATE)] 2023.05.15 4520
705 [Solr in Cloudera]Solr Data Directory변경 방법/절차 2023.04.21 4393
704 [Ranger]계정에 admin권한(grant, create등)의 권한 부여 방법 2023.04.18 4297
703 [DataNode]org.apache.hadoop.security.KerberosAuthException: failure to login: for principal: hdfs/datanode03@GOOPER.COM from keytab hdfs.keytab오류 2023.04.18 9822
702 [KUDU] kudu tablet server여러가지 원인에 의해서 corrupted상태가 된 경우 복구방법 2023.03.28 4883
701 Hadoop Clsuter에 이미 포함된 host의 hostname변경시 처리 절차 2023.03.24 4446
700 [Kudu]ERROR: Unable to advance iterator for node with id '2' for Kudu table 'impala::core.pm0_abdasubjct': Network error: recv error from unknown peer: Transport endpoint is not connected (error 107) 2023.03.16 5211
699 hive의 메타정보 테이블을 MariaDB로 사용하는 경우 table comment나 column comment에 한글 입력시 깨지는 경우 utf8로 바꾸는 방법. 2023.03.10 4810
698 [Hive canary]Hive에 Metastore canary red alert및 hive log파일에 Duplicate entry '123456' for key 'NOTIFICATION_LOG_EVENT_ID'가 발생시 조치사항 2023.03.10 4777
697 호출 url현황 2023.02.21 2344
696 ./gradlew :composeDown 및 ./gradlew :composeUp 를 성공했을때의 메세지 2023.02.20 4411
695 [ftgo_application]Unable to infer base url오류 발생시 조치방법 2023.02.20 4826
694 [Impala TLS/SSL이슈]RangerAdminRESTClient.java:151] Failed to get response, Error is: TrustManager is not specified 2023.02.02 4339
693 [Kerberos]병렬 kinit 호출시 cache파일이 손상되어 Bad format in credentials cache 혹은 No credentials cache found 혹은 Internal credentials cache error 오류 발생시 2023.01.20 4582
692 [HA구성 이슈]oozie 2대를 L4로 HA구성했을때 발생하는 이슈 2023.01.17 4903
691 [Impala 3.2버젼]compute incremental stats db명.테이블명 수행시 ERROR: AnalysisException: Incremental stats size estimate exceeds 2000.00MB. 오류 발생원인및 조치방안 2022.11.30 4844
위로