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

๐Ÿ’ปTech160

[๋ฆฌ๋ˆ…์Šค] I/O Error ๋””์Šคํฌ ์ฐพ๋Š” ๋ช…๋ น์–ด ๋ฆฌ๋ˆ…์Šค ์„œ๋ฒ„ ์„œ๋น„์Šค ์ž‘๋™์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธฐ๊ฑฐ๋‚˜ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์—ฌ ์ฐพ์•„๋ณด๋ฉด ์žฆ์€ ๊ฒฝ์šฐ๋กœ Disk I/O Error๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ํ•ด๋‹น ๋””์Šคํฌ ์ ‘์†ํ•ด์„œ ls ๋ช…๋ น์–ด๋กœ ์ผ์ผ์ด ์กฐํšŒํ•ด๋ณด์ง€ ์•Š๊ณ  Error ๊ฒฝ๋กœ๊ฐ€ ๋ฐ”๋กœ ํ™•์ธ๋ฉ๋‹ˆ๋‹ค. ๐Ÿ’ก dmesg ๋ช…๋ น์–ด๋กœ ํ•œ ๋ฒˆ์— i/o error ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” Disk(/dev/sde) ํ™•์ธ dmesg๋Š” ์‹œ์Šคํ…œ ๋ถ€ํŒ… ๋ฐ ๋™์ž‘ ์ค‘์— ์ปค๋„(kernel)์—์„œ ์ƒ์„ฑ๋œ ๋กœ๊ทธ ๋ฉ”์‹œ์ง€๋ฅผ ํ‘œ์‹œํ•˜๋Š”๋ฐ ์‚ฌ์šฉ $ dmesg -T | grep 'I/O error' -------------------------------------------------------------------- EXT4-fs (sde): previous I/O error to superblock detected.. 2019. 5. 16.
[Hive] header ์ œ๊ฑฐ ์˜ต์…˜ hive์—์„œ ๋ฐ์ดํ„ฐ ์กฐํšŒ ์‹œ ํŒŒ์ผ์— ํ—ค๋”๊ฐ€ ์žˆ๋Š” ๊ฒฝ์šฐ ํŒŒ์ผ์—์„œ ์ง์ ‘ ํ—ค๋”๋ฅผ ์ œ๊ฑฐํ•˜์ง€ ์•Š๊ณ  ์•„๋ž˜ ์˜ต์…˜์œผ๋กœ ๋Œ€์ฒด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ์Šคํ‚ค๋งˆ ๋งˆ์ง€๋ง‰ ์ค„์— ์•„๋ž˜ ์˜ต์…˜ ์ถ”๊ฐ€ ํ•˜๊ฑฐ๋‚˜ ALTER TABLE ๋ช…๋ น์–ด๋กœ ์ ์šฉํ•ด ์ค๋‹ˆ๋‹ค. โ—พ ํ—ค๋” ์ œ๊ฑฐ ์˜ต์…˜ ์„ค์ • 1๋ฒˆ์งธ ๋ผ์ธ ์ œ๊ฑฐํ•˜๊ณ  ๋ฐ์ดํ„ฐ ์กฐํšŒ ๋ฉ๋‹ˆ๋‹ค. ALTER TABLE db_nm.tb_nm set tblproperties("skip.header.line.count"="1"); โ—พ ์ถ”๊ฐ€ํ•œ ์˜ต์…˜ ์ œ๊ฑฐ ALTER TABLE db_nm.tb_nm UNSET TBLPROPERTIES('skip.header.line.count'); 2019. 5. 16.
[๋ฆฌ๋ˆ…์Šค] ๊ณผ๊ฑฐ ๋ฐ์ดํ„ฐ ๊ธฐ๊ฐ„๋ณ„ ์‚ญ์ œ ๋ช…๋ น์–ด (find์‚ฌ์šฉ) ๋ฆฌ๋ˆ…์Šค ์„œ๋ฒ„ ๊ด€๋ฆฌํ•  ๋•Œ ํŠน์ • ๊ฒฝ๋กœ์— ๋ฐ์ดํ„ฐ๋ฅผ ์ฃผ๊ธฐ์ ์œผ๋กœ ์‚ญ์ œํ•˜๊ณ  ์‹ถ์„ ๋•Œ ์•„๋ž˜ ๋ช…๋ น์–ด crontab์— ๋“ฑ๋กํ•˜์—ฌ ์‚ฌ์šฉํ•˜์‹œ๋ฉด ์ข‹์Šต๋‹ˆ๋‹ค. ## 7์ผ ์ „ ํŒŒ์ผ ์‚ญ์ œ find /data1/data/log/* -type f -mtime +7 -exec rm -rf {} \; find /var/log/service/ -type f -mtime +7 -delete ## 7์ผ ์ „ ๋””๋ ‰ํ† ๋ฆฌ ์‚ญ์ œ find /data1/data/log/* -type d -mtime +7 -exec rm -rf {} \; 2019. 5. 16.
[๋ฆฌ๋ˆ…์Šค] shell ์Šคํฌ๋ฆฝํŠธ ๋กœ๊ทธ ์ถœ๋ ฅ์—†์ด ๋ฐฑ๊ทธ๋ผ์šด๋“œ ์‹คํ–‰ โ—พ ์‹คํ–‰ ๋ช…๋ น์–ด์— &>/dev/null ๋ถ™์—ฌ ์ฃผ์‹œ๋ฉด ๋กœ๊ทธ ์ถœ๋ ฅ ์—†์ด ์Šคํฌ๋ฆฝํŠธ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค $ sh test.sh &>/dev/null & โ—พ CLI์— ๋กœ๊ทธ ๋‚จ๊ธฐ์ง€ ์•Š๊ณ  ํŒŒ์ผ์— ๋กœ๊ทธ ์ €์žฅํ•˜๋Š” 2๊ฐ€์ง€ ๋ฐฉ๋ฒ• ์ง€์ •ํ•œ ํŒŒ์ผ์— ๋กœ๊ทธ ์ €์žฅ nohup ํŒŒ์ผ์— ๋กœ๊ทธ ์ €์žฅ $ sh test.sh > test.log 2>&1 & $ nohup sh test.sh & 2019. 5. 16.
[MySQL] Workbench ๋‹ซ์€ ํƒญ์ด ๊ณ„์†ํ•ด์„œ ์—ด๋ฆฌ๋Š” ํ˜„์ƒ ํ•ด๊ฒฐ Mysql Workbench ์ž‘์—… ์‹œ ํƒญ์„ ๋‹ซ๊ณ  ์žฌ์‹œ์ž‘ํ–ˆ์„ ๋•Œ ๊ณ„์†ํ•ด์„œ ์ด์ „์— ์ž‘์—…ํ•œ ํƒญ์ด ์—ด๋ฆฌ๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋Š”๋ฐ์š” ์•„๋ž˜ ์„ค์ • ์ ์šฉํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค Edit -> Preferences -> SQL Editor -> Save snapshot of open editors on close (์ฒดํฌ ํ•ด์ œ) 2017. 12. 16.
[Hadoop] ๋ช…๋ น์–ด GC overhead limit exceeded hadoop ๋ช…๋ น์–ด ์ˆ˜ํ–‰ ์ค‘ GC overhead limit exceeded ์™€ ๊ฐ™์€ ์—๋Ÿฌ ๋ฐœ์ƒ๋  ๊ฒฝ์šฐ hadoop-env.sh ์„ค์ •ํŒŒ์ผ์—์„œ ๋ฉ”๋ชจ๋ฆฌ ๋ณ€๊ฒฝ export HADOOP_CLIENT_OPTS="-XX:-UseGCOverheadLimit -Xmx1024m" 2017. 10. 18.
Hive ๋ช…๋ น์–ด ์ •๋ฆฌ โ—พ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ƒ์„ฑ CREATE DATABASE IF NOT EXISTS db_nm; โ—พ ํ…Œ์ด๋ธ” ์ƒ์„ฑ External : hive์—์„œ ํ…Œ์ด๋ธ” dropํ•  ๊ฒฝ์šฐ hdfs ๊ฒฝ๋กœ ๋ฐ ํŒŒ์ผ ๋ณด์กด HDFS ๊ฒฝ๋กœ์˜ ๋ฐ์ดํ„ฐ ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ Amazon, Azure ๋“ฑ์˜ ํด๋ผ์šฐ๋“œ ์Šคํ† ๋ฆฌ์ง€๋กœ ์ง€์ • ๊ฐ€๋Šฅ Managed : hive์—์„œ ํ…Œ์ด๋ธ” dropํ•  ๊ฒฝ์šฐ hdfs ๊ฒฝ๋กœ ๋ฐ ํŒŒ์ผ ์‚ญ์ œ -- External Table CREATE EXTERNAL TABLE IF NOT EXISTS db_nm.table_nm ( a string comment 'a', b string comment 'b', c string comment 'c' ) comment 'table comment' PARTITIONED BY (DT STRING) ROW .. 2017. 2. 15.
[svn] java is out of date disable ์ดํด๋ฆฝ์Šค์—์„œ svn commit ์•ˆ๋˜๋ฉด์„œ java is out of date disable ์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋‚  ๊ฒฝ์šฐ ํ”„๋กœ์ ํŠธ ์˜ค๋ฅธ์ชฝ ๋ฒ„ํŠผ > Team > CleanUP 2017. 2. 9.