Apache NIFI의 한계

scribbling 2018. 6. 29. 11:07



http://knight76.tistory.com/entry/Apache-NIFI



최근까지 NIFI를 상용에서 쓰고 있었지만.. 아주 간단한 곳에서 사용하고 있다. 

테스트했던 환경은 중량급 서버 (32 core, 64 Memory) 에 4대를 사용해서 테스트했다.


내가 내린 결론은 대용량(하루 최소 5T 용량) 또는 복잡한 환경에서는 쓰지 않기를 바란다.


현재 NIFI의 한계는 threashold가 넘어가는 클러스터링 장애가 발생하고 나서 복구가 무척 어렵다. (재시작 3번 해야 복구된다.) 따라서 로그가 유실되며 재처리할 수 있는 작업 컴포넌트가 현재 없다.

또한 로그가 현재 부실한 편이라 정확한 어떻게 하기 어렵다. 장애 발생 후 재시작 이후에 여전히 설정이 traffic을 받는 구조라 썩 좋지 않다.


그러나, 이런한 단점에도 NIFI는 계속 좋아질 가능성이 보이고 있으며,

소스 구조가 java bean에 맞춰 착실하게 개발되어 있어 컴포넌트 추가 개발이 쉽다는 큰 장점이 있다..



좋은 성능 튜닝 참조 자료

https://community.hortonworks.com/articles/7882/hdfnifi-best-practices-for-setting-up-a-high-perfo.html






Posted by '김용환'
,



ruby의 irb/pry 조합과 동일하게 사용할 수 있는 파이썬 조합이다.



1. ipython


찾은 링크는 다음과 같다. 

https://gist.github.com/Integralist/a2f01ab4aabb786268d5006da5013c9e


pip install ipython만 하면 된다.




[~] cat test.py

#!/usr/bin/env python


from IPython import embed


print("1")


embed()

print("2")

print("3")




pry처럼 정확히 


[~] ipython test.py

1

Python 3.6.0 (default, Sep 19 2017, 16:07:26)

Type 'copyright', 'credits' or 'license' for more information

IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.


In [1]:



2. pdb


https://docs.python.org/3/library/pdb.html


http://pythonstudy.xyz/python/article/505-Python-%EB%94%94%EB%B2%84%EA%B9%85-PDB



[~] cat test.py

#!/usr/bin/env python


import pdb


print("1")

pdb.set_trace()

print("2")

print("3")



[~] python -m pdb test.py



3. pudb


https://github.com/inducer/pudb


http://python -m pudb.run test.py





Posted by '김용환'
,






<기억 나는 대사>

우리는 모두 인생에서 선택을 해야 하지. 살아가면서 꼭 필요한 어려운 부분이지. 그리고 그걸 도와줄 사람은 아무도 없지.

하지만 진짜와 가짜중 하나만 선택하라고. 둘이 비슷해 보여도 같을 수가 없거든. 말도 안되는 가짜를 믿지 말라고

(하지만 영화는 황당 스토리였다. 말은 멋있지만 실제로는 말과 역설적인 상황에서 나오는 말..)

'영화를 보고' 카테고리의 다른 글

어벤져스 엔드게임 중에 좋았던 대사  (0) 2019.08.20
"아름다운 것들은 관심을 바라지 않지"  (0) 2018.11.21
레디 플레이어 원  (0) 2018.04.04
칠드런 오브 맨  (0) 2016.10.25
[마이크롭 앤 가솔린]  (0) 2016.07.02
Posted by '김용환'
,



 docker-compose up 커맨드는 모든 서비스를 결합한 표준 출력을 리턴한다. 


모든 로그의 표준 출력을 본다해도 거의 도움이 되지 않아서 


docker-compose up -d를 사용하는 것이 더 나은 선택이다. 


docker-compose up -d 커맨드를 사용하면 표준 출력을 리턴하지 않는다. 


https://docs.docker.com/compose/reference/up/

Posted by '김용환'
,



zookeeper 클러스터에 zookeeper 신규 서버 추가하기


아래 github gist를 참고하면 좋을 것 같다. 

(3.4 이후에서 잘 동작한다)

https://gist.github.com/miketheman/6057930


추가적으로 zookeeper 클러스터의 서버 대수보다 더 많은 서버 대수를 추가할 때는 조심하는 게 좋을 것 같다. 

항상 쿼럼을 유지해야 하니까..




정상적으로 클러스터링되었는지 확인하는 방법은 3가지가 있다.


1. 로그 파일을 통해 확인 (클러스터링 장비 중 하나에서 zookeeper 재시작 시  에러 난다)

zookeeper.log 


2. 각 장비의 data file system 파일이 동일하다. 


3. 다음 커맨드를 실행해서 클러스터링 상태를 확인할 수 있다.


상태 정보와 함께 Zxid, follower


$ echo stat | nc 장비 2181


Latency min/avg/max: 0/0/0

Received: 2

Sent: 1

Connections: 1

Outstanding: 0

Zxid: 0xa00000160

Mode: follower

Node count: 11467





이전 커맨드를 실행시 zookeeper 에서 다음 커맨드 에러가 발생한다면.. 정상적이지 않다는 것이다.


This ZooKeeper instance is not currently serving requests


https://github.com/apache/zookeeper/search?utf8=%E2%9C%93&q=ZK_NOT_SERVING&type=



다양한 원인이 있는데. 지금 제대로 동기가 안된 거일 수 있다. 그러나 다른 장비는 정상적이라면..

config/zoo.cfg 이슈일지 꼼꼼히 살펴본다.

Posted by '김용환'
,


YAML의 문자열(string)은 일반적으로 다음처럼 사용한다.







1
2
3
4
5
A string in YAML

'A singled-quoted string in YAML'

"A double-quoted string in YAML"



multi-line은 어떻게 표시할까? (사실 이번에 처음 알았다.. YAML에 multi line이 있을 줄이야..)

pipe(|) 또는 >를 사용한다. 



When a string contains line breaks, you can use the literal style, indicated by the pipe (|), to indicate that the string will span several lines. In literals, newlines are preserved:

1
2
3
|
  \/ /| |\/| |
  / / | |  | |__

Alternatively, strings can be written with the folded style, denoted by >, where each line break is replaced by a space:

1
2
3
4
5
>
  This is a very long sentence
  that spans several lines in the YAML
  but which will be rendered as a string
  without carriage returns.



출처 : http://symfony.com/doc/current/components/yaml/yaml_format.html

Posted by '김용환'
,


zookeeper node에 ttl 기능이 생길 예정이다. 아직 릴리즈 되지 않은 3.6.0에 추가되었다. 



https://issues.apache.org/jira/browse/ZOOKEEPER-1925


Here are only some problems with app-level cleaning:
– Slow for large trees. If the network latency is high it takes a very long time for the app to walk whole tree (e.g. 1M nodes).
– Risky. If the cleanup application crash (or becomes unreachable) it puts whole ZK cluster to danger.
– The implementation might be error-prone if multiple cleanup threads are used.

– Has to be implemented separately by each developer (until a proven implementation shared as a library).


여러 이슈가 있어서. 3.6.0으로 미룬 상태이다..


zookeeper에 ttl이 있고 성능만 좋다면 앞으로 많이 사용할 듯 싶다. 



Posted by '김용환'
,




commit/push한 local repository를 하나 뒤로 돌려서 수정하고 다시 commit/push할 때 유용하다.



$ git reset HEAD^  


코드 작업 


$ git add


$ git commit -m "이전 이름 커밋 메시지"



강제 리버트하고. 기존 히스토리 안남게 한다.


$ git push origin +master 


Posted by '김용환'
,

[git] no kex alg 이슈

Tool 2018. 6. 20. 12:06



GitHub 에서 OpenSSH 보안을 강화(버전 업)해서 발생하는 문제이다.


$ git ls-remote git@github.com:OpenTSDB/opentsdb

no kex alg

fatal: Could not read from remote repository.


Please make sure you have the correct access rights



클라 버번이 너무 하위 버전이거나..

openssh 버전이 너무 낮으면 no kex alg 에러가 난다.



$ cat /etc/redhat-release

CentOS release 5.8 (Final)



kex 알고리즘이 없어서 발생한것으로서.. 서버에서 kex 알고리즘을 추가해서 재시작하거나. 클라이언트 openssh을 최신으로 변경한다.


kex(key exchange) 알고리즘 중 일부가 insecure하다고 판단한 것으로 보인다.. 

(https://devcenter.heroku.com/changelog-items/1311)


kex 알고리즘에 대한 설명은 다음과 같다.


https://www.linuxquestions.org/questions/linux-networking-3/sshd-and-kex-algorithms-4175545359/


Posted by '김용환'
,




sudo -i

add-apt-repository ppa:linuxuprising/java

apt-get update

apt-get install oracle-java10-installer


proxy 이슈가 있다면 setproxy를 써서 설치한다.



Posted by '김용환'
,