- 2015.07.09
- hardware provisioning
- storage systems
- run on the same nodes as HDFS
- yarn
- with a fixed amount memory and cores dedicated to Spark on each node
- run on different nodes in the same local-area network as HDFS
- run computing jobs on different nodes than the storage system
- run on the same nodes as HDFS
- local disks
- 4-8 disks per node
- without RAID(just as separate mount points)
- noatime option
- configurate the spark.local.dir variable to be a comma-separated list of the local disks
- same disks as HDFS, if running HDFS
- memory
- 8 GB - hundreds of GB
- 75% of the memory
- if memory > 200 GB, then run multiple worker JVMs per node
- standalone mode
- conf/spark-env.sh
- SPARK_WORKER_INSTANCES: set the number of workers per node
- SPARK_WORKER_CORES: the number of cores per worker
- conf/spark-env.sh
- standalone mode
- netowrk
- >= 10 gigabit
- CPU cores
- 8-16 cores per machine, or more
- reference
- storage systems
- third-party hadoop distributions
- CDH
- HDP (recommended)
- inheriting cluster configuration
- spark-env.sh
- HADOOP_CONF_DIR
- hdfs-site.xml
- core-site.xml
- HADOOP_CONF_DIR
- spark-env.sh
- reference
- hardware provisioning
- 2015.06.04
- external tools
- cluster-wide monitoring tool
- Gangila
- OS profiling tools
- dstat
- iostat
- iotop
- JVM utilities
- jstack
- jmap
- jstat
- jconsole
- cluster-wide monitoring tool
- external tools
- 2015.05.15
- overview
- Apache Spark is a fast and general-purpose cluster computing system.
- It provides high-level APIs in Java, Scala and Python, and an optimized engine that supports general execution graphs.
- It also supports a rich set of higher-level tools including Spark SQL for SQL and structured data processing, MLlib for machine learning, GraphX for graph processing, and Spark Streaming.
- quick start
- modules
- reference
- 2015.05.14
- optimizationproblemconfiguration
out of memory sysctl -w vm.max_map_count=65535
spark.storage.memoryMapThreshhold 131072too many open files sysctl -w fs.file-max=1000000
spark.shuffle.consolidateFiles true
spark.shuffle.manager sortconnection reset by peer -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:ParallelGCThreads=12 -XX:NewRatio=3 -XX:SurvivorRatio=3 error communication with MapOutputTracker spark.akka.askTimeout 120
spark.akka.lookupTimeout 120 - use case
- Baidu real-time security product
- 2015.05.12
- configuration
- 75% of a machine's memory (standalone)
- minimum executor heap size: 8 GB
- maximum executor heap size: 40 GB / under 45 GB (watch GC)
- kryo serialization
- parallel (old) / CMS / G1 GC
- pypy > cpython
- notification
- memory usage is not same as data size (2x, 3x bigger)
- prefer reduceby than groupby
- there are limitations when using python with spark streaming (at least for now)
- configuration
Wednesday, July 29, 2015
Apache Spark
Apache HTTPD
- 2015.07.23
- introduction
- he Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.
- installation
- prerequisite
- libtool
- autoconf
- APR
- http://mungeol-heo.blogspot.kr/2015/07/apache-apr_29.html
- pcre
- gcc
- ntp
- perl
- wget http://mirror.apache-kr.org//httpd/httpd-2.4.16.tar.gz
- wget http://www.apache.org/dist/httpd/httpd-2.4.16.tar.gz.md5
- md5sum -c httpd-2.4.16.tar.gz.md5
- gzip -d httpd-2.4.16.tar.gz
- tar xvf httpd-2.4.16.tar
- cd httpd-2.4.16
- ./configure --with-included-apr
- make
- make install
- /usr/local/apache2/bin/apachectl -k start
- http://hostname
- /usr/local/apache2/bin/apachectl -k stop
- /usr/local/apache2/bin/apachectl -f /usr/local/apache2/conf/httpd.conf
- prerequisite
- reference
- introduction
Apache APR
- 2015.07.23
- introduction
- The mission of the Apache Portable Runtime (APR) project is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementations. The primary goal is to provide an API to which software developers may code and be assured of predictable if not identical behaviour regardless of the platform on which their software is built, relieving them of the need to code special-case conditions to work around or take advantage of platform-specific deficiencies or features.
- installation
- APR
- wget http://apache.tt.co.kr//apr/apr-1.5.2.tar.gz
- wget http://www.apache.org/dist/apr/apr-1.5.2.tar.gz.md5
- md5sum -c apr-1.5.2.tar.gz.md5
- gzip -d apr-1.5.2.tar.gz
- tar xvf apr-1.5.2.tar
- ln -s apr-1.5.2 apr
- APR-Util
- wget http://apache.tt.co.kr//apr/apr-util-1.5.4.tar.gz
- wget http://www.apache.org/dist/apr/apr-util-1.5.4.tar.gz.md5
- md5sum -c apr-util-1.5.4.tar.gz.md5
- gzip -d apr-util-1.5.4.tar.gz
- tar xvf apr-util-1.5.4.tar
- ln -s apr-util-1.5.4 apr-util
- APR
- reference
- introduction
Monday, March 30, 2015
Hive - "Execution failed with exit status: 3"
note: solutions for resolving "Execution failed with exit status: 3" error while using "hive.auto.convert.join=true" setting.
1. use "hive.auto.convert.join=false" or
2. reduce "hive.smalltable.filesize" or
3. increase maximum size for the Java process heap memory which will be passed to Java -Xmx. (If you happen to use cloudera manger, then it will be at 'hive -> configuration -> gateway default group -> resource management -> client java heap size in bytes')
I suggest to use option 3, if it is possible for your specific use case.
1. use "hive.auto.convert.join=false" or
2. reduce "hive.smalltable.filesize" or
3. increase maximum size for the Java process heap memory which will be passed to Java -Xmx. (If you happen to use cloudera manger, then it will be at 'hive -> configuration -> gateway default group -> resource management -> client java heap size in bytes')
I suggest to use option 3, if it is possible for your specific use case.
Monday, March 2, 2015
LogStash -> RabbitMQ Server -> ES 순서로 indexing 하기
- LogStash에서 output로 elasticsearch-river 사용
- 상세 내용: http://logstash.net/docs/1.4.2/outputs/elasticsearch_river
- RabbitMQ 서버 및 management 설치
- 상세내용: http://mungeol-heo.blogspot.kr/2015/01/rabbitmq.html
- elasticsearch-river-rabbitmq plugin 설치
- 상세내용: http://mungeol-heo.blogspot.kr/2015/01/elasticsearch-river-rabbitmq.html
- LogStash 실행 시 RabbitMQ와의 authentication 실패 에러 발생
- LogStash에서 기본으로 guest 계정으로 RabbitMQ와 통신하도록 설정
- RabbitMQ 새 버전에서 guest 계정은 localhost에서만 접속 가능
- 새 계정 생성
- sudo rabbitmqctl add_user test test
- sudo rabbitmqctl set_user_tags test administrator
- sudo rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
- RabbitMQ Management에 접속 테스트
- x.x.x.x:15672
- id:test
- pwd: test
- 접속 성공
- LogStash 설정에서 test 계정으로 RabbitMQ와 통신하도록 수정
- 통신 성공
- test 용 apache 로그를 indexing
- indexing 성공
Tuesday, February 3, 2015
java.lang.IllegalArgumentException: Invalid format: "XXX" is malformed at "XXX"
1. an example error
'java.lang. IllegalArgumentException: Invalid format:
"30/Jan/2015:15:01:03" is malformed at "Jan/2015:15:01:03"' error
2. check the LANG of system
echo $LANG
3. change it if it is not "en_US.UTF-8"
- For instance, at CentOS
- vi /etc/sysconfig/i18n
- LANG="en_US.UTF-8"
- restart the system
'java.lang.
"30/Jan/2015:15:01:03" is malformed at "Jan/2015:15:01:03"' error
2. check the LANG of system
echo $LANG
3. change it if it is not "en_US.UTF-8"
- For instance, at CentOS
- vi /etc/sysconfig/i18n
- LANG="en_US.UTF-8"
- restart the system
Monday, January 19, 2015
Security setting - Failed to start services on hadoop, such as name node.
Note: this is the one of the reasons why the services of hadoop fail to start.
1. The security setting of linux system might the reason why your services of hadoop fail to start while using, for example, CDH.
2. Some time, you have to apply "chmod" to commands, because of your security setting of linux system.
3. for instance,
chmod 755 df netstat dmesg find ps c++ g++ last make top w who whoami x86_64-redhat-linux-* ...
4. And, the commands you have to change are depends on your security setting.
5. As a example, remember to delete name node directory before restart name node. Otherwise it will keep failing.
1. The security setting of linux system might the reason why your services of hadoop fail to start while using, for example, CDH.
2. Some time, you have to apply "chmod" to commands, because of your security setting of linux system.
3. for instance,
chmod 755 df netstat dmesg find ps c++ g++ last make top w who whoami x86_64-redhat-linux-* ...
4. And, the commands you have to change are depends on your security setting.
5. As a example, remember to delete name node directory before restart name node. Otherwise it will keep failing.
Subscribe to:
Posts (Atom)
