๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ’ปTech160

[SOLVED] UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 80: ordinal not in range(128) ๐Ÿšซ ERROR hue์—์„œ hive ์‚ฌ์šฉํ• ๋•Œ ํ•œ๊ธ€์„ insert ํ•˜๋ ค๋ฉด ์ธ์ฝ”๋”ฉ ๊ด€๋ จ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š”๋ฐ์š”. UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 80: ordinal not in range(128) ๐Ÿ’ก SOLVED hue์—์„œ ์ฟผ๋ฆฌ๋ฅผ ์ฒ˜๋ฆฌํ• ๋•Œ ์‹คํ–‰๋˜๋Š” python ์ธ์ฝ”๋”ฉ ํƒ€์ž…์ด ascii๋กœ ์„ค์ •๋˜์–ด ์žˆ์–ด์„œ ๊ทธ๋ ‡์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ํŒŒ์ด์ฌ ์Šคํฌ๋ฆฝํŠธ ์ฐพ์•„์„œ ์ˆ˜์ • ํ›„ Hue ์žฌ๊ธฐ๋™ ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. (ascii > utf-8) vi /opt/cloudera/parcels/CDH/lib/hue/build/env/lib/python2.7/site.py ----------------------------------------------------.. 2020. 7. 6.
[SOLVED] KeeperErrorCode = ConnectionLoss for /hbase ๐Ÿšซ ERROR HBase์—์„œ ConnectionLoss ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ด์„œ zookeeper ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ด ๋ณด๋‹ˆ, Too many Connection ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๊ณ  ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ## Hbase Error KeeperErrorCode = ConnectionLoss for /hbase ## Zookeeper Error Too many connections from /x.x.x.x - max is 60 ๐Ÿ’ก SOLVED ๋‘ ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๋‹ค. 1. ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ zookeeper์— ์ ‘์†ํ•˜๋Š” ํ”„๋กœ์„ธ์Šค๋ฅผ ํ™•์ธํ•˜๋ฉด ์•„๋ž˜ ๊ฒฐ๊ณผ์™€ ๊ฐ™์ด ํ•˜๋‚˜์— ํ”„๋กœ์„ธ์Šค์—์„œ ๋งŽ์€ connection์„ ์žก๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ € ๊ฐ™์€ ๊ฒฝ์šฐ๋Š” Ranger์˜€๊ณ  Ranger ์žฌ๊ธฐ๋™ ํ›„ Zookeeper connection ์ˆ˜ 30 ๋ฐ‘์œผ๋กœ ์ค„์–ด ๋“ค์—ˆ์Šต๋‹ˆ.. 2020. 6. 17.
[zeppelin] hive interpreter ์—ฐ๋™ ๋ฐฉ๋ฒ• Zeppelin ์„ค์น˜ ํ›„ hive๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด interpreter๋ฅผ ์ถ”๊ฐ€ ํ•ด์ค˜์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ถ”๊ฐ€ํ•˜์ง€ ์•Š๊ณ  ์‚ฌ์šฉํ•˜๋ฉด ์•„๋ž˜ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. Error: Either no interpreter named hive or it is not binded to this note ์›์ธ : hive interpreter ์ƒ์„ฑํ•˜์ง€ ์•Š๊ณ  %hive ์‚ฌ์šฉ์‹œ ๋ฐœ์ƒ Error : zeppelin Unable to read HiveServer2 configs from ZooKeeper ์›์ธ : hive url ์ฃผ์†Œ๊ฐ€ ์ž˜๋ชป๋ผ์„œ ๋ฐœ์ƒ 1. Zeppelin ๋กœ๊ทธ์ธ 2. ์˜ค๋ฅธ์ชฝ ์ƒ๋‹จ์— Interpreter ํด๋ฆญ 3. Interpreter ํ™”๋ฉด 4. ์˜ค๋ฅธ์ชฝ ์ƒ๋‹จ์— create ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๊ณ  hive interpreter๋ฅผ ์„ค์ •ํ•ด ์ค๋‹ˆ.. 2020. 6. 12.
[Hive] metastore ์Šคํ‚ค๋งˆ ๋ฒ„์ „ ์—…๊ทธ๋ ˆ์ด๋“œ ์‚ฌ์šฉ ์ค‘์ด๋˜ hive ๋ฒ„์ „์„ ์˜ฌ๋ ธ์„ ๋•Œ metastore ์Šคํ‚ค๋งˆ๊ฐ€ ๋ณ€๊ฒฝ๋œ ๊ฒฝ์šฐ ์Šคํ‚ค๋งˆ๋„ ์—…๊ทธ๋ ˆ์ด๋“œ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ์—…๊ทธ๋ ˆ์ด๋“œํ•˜์ง€ ์•Š์œผ๋ฉด hive ์„œ๋น„์Šค ์‹คํ–‰ํ•  ๋•Œ ์•„๋ž˜์™€ ๊ฐ™์ด ํ•ด๋‹น ์ปฌ๋Ÿผ์„ ์ฐพ์„ ์ˆ˜ ์—†๋‹ค๋Š” ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. java.sql.BatchUpdateException: Unknown column 'DB_MANAGED_LOCATION_URI' in 'field list' ๐Ÿ’น ์—…๊ทธ๋ ˆ์ด๋“œ ๋ฐฉ๋ฒ• hive์—์„œ ์ง€์›ํ•˜๋Š” schemaTool์„ ์‚ฌ์šฉํ•˜์—ฌ ์—…๊ทธ๋ ˆ์ด๋“œ ์ง„ํ–‰ํ•ด ์ค๋‹ˆ๋‹ค. โ—พ ๋ฒ„์ „ ํ™•์ธ ๋ช…๋ น์–ด hive --service schemaTool -url jdbc:mysql://[HOSTNAME]:3306/metastore -userName hive --passWord hive -dbType mysql -info.. 2020. 6. 2.
[Hadoop] ์‚ฌ์šฉ์ž HDFS ์ ‘๊ทผ ๊ถŒํ•œ ์„ค์ • ๋ฐฉ๋ฒ• (Ranger๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ์œผ๋ฉด Ranger์—์„œ ๊ด€๋ฆฌํ•˜๋Š”๊ฒŒ ์ข‹์Šต๋‹ˆ๋‹ค) https://heum-story.tistory.com/146 Apache Ranger ์‚ฌ์šฉ๋ฒ• Ranger ๊ฐ ๊ธฐ๋Šฅ๋“ค ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๋Š”์ง€ ํ™•์ธํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. Ranger๋ž€? ํ•˜๋‘ก ์ „์ฒด ์„œ๋น„์Šค์— ๋Œ€ํ•œ ๋ณด์•ˆ ์ •์ฑ…์„ ์ ์šฉํ•  ์ˆ˜ ์žˆ๊ณ  ๊ด€๋ฆฌ ๋ฐ ์šด์˜ํ•  ์ˆ˜ ์žˆ๋Š” ํ”„๋ ˆ์ž„์›Œํฌ์ž…๋‹ˆ๋‹ค. ํ•˜๋‘ก์˜ ๋ณด์•ˆ๊ด€๋ จ ์กฐ heum-story.tistory.com ๋ฆฌ๋ˆ…์Šค ์‚ฌ์šฉ์ž๋ฅผ hdfs์— ์ ‘๊ทผ ๊ถŒํ•œ ์„ค์ •ํ•˜๋Š” ๋‘๊ฐ€์ง€ ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. 1. ACL ๋ช…๋ น์–ด ์‚ฌ์šฉ hdfs-site.xml ์•„๋ž˜ ์„ค์ • ๋ณ€๊ฒฝํ•ด์•ผ ACL ์‚ฌ์šฉ๊ฐ€๋Šฅ dfs.namenode.acls.enabled= true ## root user๋ฅผ hdfs /user ๊ฒฝ๋กœ์— ์ฝ๊ธฐ,์“ฐ๊ธฐ,์‹คํ–‰ ๊ถŒํ•œ์„ ์คŒ hadoop fs -setf.. 2020. 5. 12.
[Hadoop] Number of Under Replicated Blocks ํ•ด๊ฒฐ๋ฐฉ๋ฒ• ํ…Œ์ŠคํŠธ ์šฉ๋„๋กœ DataNode๋ฅผ 2๋Œ€๋กœ ๊ตฌ์„ฑํ–ˆ๋Š”๋ฐ, ์ดˆ๊ธฐ ์„ค์น˜ ๋•Œ ๊ธฐ๋ณธ replication ์„ค์ •์ด 3์ด๊ธฐ ๋•Œ๋ฌธ์— ๋ฐœ์ƒํ•œ ๋‚ด์šฉ์œผ๋กœ ์„ค์น˜ ํ›„ replication์„ 2๋กœ ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค. ## Under replicated ํŒŒ์ผ ๊ฒฝ๋กœ ๋ชฉ๋ก ์ €์žฅ $ hdfs fsck / | grep 'Under replicated' | awk -F':' '{print $1}' > /tmp/under_replicated_files ## ์ค‘๋ณต ํ–‰ ์ œ๊ฑฐ $ sort -u /tmp/under_replicated_files > /tmp/under_replicated_files_sort ## shell ์Šคํฌ๋ฆฝํŠธ ์ƒ์„ฑ $ vi run_set_replication.sh ----------------------------------------.. 2020. 4. 5.
[๋ฆฌ๋ˆ…์Šค] yum $releasever ๋ณ€๊ฒฝํ•˜๋Š” ๋ฐฉ๋ฒ• yum repository์—์„œ $releasever ๋ณ€์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๋ฐ ์ž˜๋ชป ์„ค์ •๋˜์–ด ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋Š”๋ฐ์š” /etc/yum/vars/releasever ์ƒ์„ฑ ๋˜๋Š” ๋ณ€๊ฒฝํ•˜์—ฌ ์กฐ์น˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๐Ÿšซ ERROR https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7.7-10.el7-x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found ๐Ÿ’ก SOLVED $ echo "7.7" > /etc/yum/vars/releasever ์กฐํšŒ ๋ฐฉ๋ฒ• $ python -c 'import yum, pprint; yb = yum.YumBase(); pprint.pprint(yb.conf.y.. 2020. 4. 1.
[Hive] ํ…Œ์ด๋ธ” JSON ํฌ๋งท ์‚ฌ์šฉ ๋ฐฉ๋ฒ• 1. JSON ๋ฐ์ดํ„ฐ ํ™•์ธ 2. Hive ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค/ํ…Œ์ด๋ธ” ์ƒ์„ฑ json ์ค‘์ฒฉ ๊ฐ์ฒด๊ฐ€ ์กด์žฌํ•  ๊ฒฝ์šฐ string์œผ๋กœ ์ฒ˜๋ฆฌ json ์ปฌ๋Ÿผ type ์ฃผ์˜ (arrary) - ์ปฌ๋Ÿผ List type์„ String์œผ๋กœ ์„ค์ •ํ•ด์„œ ์•„๋ž˜ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•จ. org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Field name expected CREATE DATABASE IF NOT EXISTS db_nm; CREATE EXTERNAL TABLE IF NOT EXISTS db_nm.tb_nm ( repotype string, repo string, requser string, tags array ) PARTITIONED BY (dt string) ROW.. 2020. 3. 27.